PxPlus User Forum

Main Board => Discussions => Wish List => Topic started by: Thomas Bock on June 26, 2019, 10:29:07 AM

Title: Database Conversion Utility
Post by: Thomas Bock on June 26, 2019, 10:29:07 AM
I took a look at the new DCU. Here are some wishes concerning this tool.

And this one seems to be an issue:
The standard option DATEFMT=JUL-0000 doesn't work. We use julian values, but after loading the table there are nothing but NULL values in the date fields.
Title: Re: Database Conversion Utility
Post by: Len Vassos on June 26, 2019, 10:47:49 AM
Thomas,

We will look into the issue with DATEFMT and will review your wishlist items.
Title: Re: Database Conversion Utility
Post by: Mike King on June 26, 2019, 10:55:59 AM
Thomas

Note that a numeric defined in the PxPlus data dictionary with a length of "10" will be assumed to have no decimals.  You should have defined it in the PxPlus data dictionary as 10.2 or similar.

If you don't specify any decimals in the PxPlus data dictionary then our ODBC interface will also report no decimal which could cause trouble for other programs.
Title: Re: Database Conversion Utility
Post by: Stéphane Devouard on June 27, 2019, 02:11:35 PM
Len,

I second Thomas wishes.

**EDIT**
Other ones I’ve run into today :
- varchar(max) is not an allowed syntax with a MySQL database and should be replaced by text
- If you have named your primary keys in the data dictionary (such as PK_TableName), the generated primary key constraint is PK_TableName_TableName. This could probably be improved.

Regards
Title: Re: Database Conversion Utility
Post by: Thomas Bock on June 28, 2019, 02:46:56 AM
I want to modify my #3.

There should be a possibility to dynamically define the company number and year like in the ODBC-DD.
And there should be a possibility to dynamically define the complete connection data. So in case of changes on the DB-side we can just reconfigure these values in our application parameters. This will avoid the need to rewrite the complete prefix file.
Title: Re: Database Conversion Utility
Post by: Mike King on June 28, 2019, 06:31:44 PM
Thomas,

A couple of thoughts about making the connection more dynamic;

If you are using ODBC then you simply need to specify a DSN which can then be changed on the server/workstation.  This would be the preferred method when running on Windows

For non-ODBC connections most of the value provided in the OPT= string can be set in the INI file so things such as Host name, port, userid and password can be placed in the INI file as opposed to the PREFIX file.  This allows you to leave most setting out of the Prefix file so simple changes can be made to the INI file.
Title: Re: Database Conversion Utility
Post by: Stéphane Devouard on June 29, 2019, 01:09:50 PM
Another issue that could be improved in the DCU

Setup (Windows 10 system):

When using the DCU, the prefix file entry is created as DATA\PHYSICAL (since the key has the uppercase option set)

Therefore, if you do something like :

Code: [Select]
OPEN DICTIONARY
PREFIX FILE "prefixdb"
OPEN (nn) TABLE "logical"

ProvideX translates logical to data/physical (as set in the dictionary)
And thus does not find the entry in the PREFIX FILE and does not open the SQL table but rather the keyed file

Two possible solutions :

Thanks,
Title: Re: Database Conversion Utility
Post by: Thomas Bock on July 04, 2019, 02:02:03 AM
As it turns out, DATEFMT=DDMMYY seems to be an issue as well.
In this case the date columns have values, but they are all wrong.

311218 becomes 0013-11-07
140119 becomes 0013-11-21
Title: Re: Database Conversion Utility
Post by: Thomas Bock on July 04, 2019, 02:16:30 AM
Correction

311218 becomes 0018-12-31
140119 becomes 0019-01-14