|
supporting multiple databases |
Iniciado por Martin Brekhof, 12,jul. 2004 09:21 - 6 respuestas |
| |
| | | |
|
| |
Publicado el 12,julio 2004 - 09:21 |
I'm starting with my first trial project in WinDev ( and sofar have chosen Hyperfile as the database. I would, however, like to be able to switch between HyperFile, MySQL, MSSQL and Oracle (all using the native drivers). There seems to be no documentation (at least I can not find it) about how to switch between drivers/databases etc. Has anyone some/any example how to go about (or a link where to find this kind of documentation)? tia, Martin |
| |
| |
| | | |
|
| | |
| |
Publicado el 12,julio 2004 - 14:23 |
In WD 7.5 you can do it using this instructions(copy from the help of HDescribeConnection) // Describe the new connection HDescribeConnection("MyConnection", "", "",... "Server_SQLServer", "dbo", hOledbSQLServer, hOReadWrite, "") // Open the new connection HOpenConnection("MyConnection") // Indicate that "Salaries" use the new connection HChangeConnection("salaries", "MyConnection")
Martin Brekhof <martin@brekhof.nl> wrote:
I'm starting with my first trial project in WinDev ( and sofar have chosen Hyperfile >as the database. I would, however, like to be able to switch between HyperFile, MySQL,
MSSQL and Oracle (all using the native drivers). There seems to be no documentation (at least I can not find it) about how to switch between drivers/databases etc. >Has anyone some/any example how to go about (or a link where to find this kind of documentation)?
tia, Martin
|
| |
| |
| | | |
|
| | |
| |
Publicado el 12,julio 2004 - 16:00 |
When you change the connection type from hyperfile to mysql/oracle native access, you get a brief notice that you need to convert the data manually. Much to my chagrin, it seems that manually means just that - I could not find a utility to do it... hcreation() will create the correct tables in mysql/oracle, but that still leaves the data... There are probably some other tricks as well, but I solved this by making a set of procedures which generate a SQL script with insert statements to recreate the data in the new database. You can find them at http://windev.unitas.nl/26 They're not perfect yet, but they work for me. The table creation statements are MySQL specific, but it they are simple to change. Be sure to use transactions while transfering data, otherwise the insert statements will be painfully slow (i.e. max 200 statements a second on a 15000RPM scsi disk...)
I'm starting with my first trial project in WinDev ( and sofar have chosen Hyperfile as the database. I would, however, like to be able to switch between HyperFile, MySQL, MSSQL and Oracle (all using the native drivers). There seems to be no documentation (at least I can not find it) about how to switch between drivers/databases etc. Has anyone some/any example how to go about (or a link where to find this kind of documentation)? tia, Martin |
| |
| |
| | | |
|
| | |
| |
Publicado el 12,julio 2004 - 16:05 |
Use the command HChangeConnection to (dynamic) switch from database. We have good experience with the MySQL native driver. The MSSQL native driver instead doesn't work well. For MSSQL we use the OLEDB driver.
I'm starting with my first trial project in WinDev ( and sofar have chosen Hyperfile as the database. I would, however, like to be able to switch between HyperFile, MySQL, MSSQL and Oracle (all using the native drivers). There seems to be no documentation (at least I can not find it) about how to switch between drivers/databases etc. Has anyone some/any example how to go about (or a link where to find this kind of documentation)? tia, Martin |
| |
| |
| | | |
|
| | |
| |
Publicado el 12,julio 2004 - 16:26 |
Hi Jeroen, that's also my expierence. The MSSQL Native driver - the last I did test of course - does use DBLIB (which is access method of SQL Server 6.5 and outdated since SQL Server 7). It's fast but has some limitations (only 255 characters are returned in a result set for varchars). Regards Raimund
Use the command HChangeConnection to (dynamic) switch from database. We have good experience with the MySQL native driver. The MSSQL native driver instead doesn't work well. For MSSQL we use the OLEDB driver.
http://www.invitec.com |
| |
| |
| | | |
|
| | |
| |
Publicado el 12,julio 2004 - 19:25 |
| |
| |
| | | |
|
| | |
| |
Publicado el 13,julio 2004 - 23:25 |
Use the command HChangeConnection to (dynamic) switch from database. We have good experience with the MySQL native driver. The MSSQL native driver instead doesn't work well. For MSSQL we use the OLEDB driver.
I ended up with the native driver for Oracle (9i) and HDescribeConnection/HopenConnection and a HChangeConnection for every file I use (isn't there a way to tell the system ' for all files' ?). My RAD generated program seems to function mostly ok on either Hyperfile and Oracle, although I saw some error messages that I didn't see ever when working with Oracle from Delphi. This results is some other questions: - Is there a way I can give the indices a name I like? - Is there a way to customize the constraint-error messages (there was a lot of French text in a popupbox that didn't make any sense)? regards, Martin |
| |
| |
| | | |
|
| | | | |
| | |
|