PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD8] Dynamic ODBC
[WD8] Dynamic ODBC
Débuté par Raimund Schuldhaus, 30 mar. 2004 20:07 - 3 réponses
Posté le 30 mars 2004 - 20:07
Hi all,
is there a way to use a dynamic ODBC connection or to change the ODBC parameters at runtime?
I have the need to read a TOPSPEED file, but the name and directory has to be defineable at runtime.
I played a little bit with HDescribeConnection and HDescribeFile but without luck.
Raimund
Posté le 30 mars 2004 - 10:39
Like Pter said, you can create a DSN-file.
The DSN-file is a file in Ascii-format.
We create our own DSN-files.
Search your computer with "*.dsn".
With an ACII-editor you can open the DSN-files to examine the format.
For more info you van search www.microsoft.com\msdn\
greetings,
Joop van der Linden
Member of the Dutch speaking WinDev Developer Group (WDG)

Hi you,
is there a way to use a dynamic ODBC connection or to change the ODBC
parameters at runtime?
I have the need to read a TOPSPEED file, but the name and directory has to be
defineable at runtime.
I played a little bit with HDescribeConnection and HDescribeFile but without
luck.
I think you have to go to a more lower level, change or create a DSN ?

Do you know where the parameters are stored? Registry?
Peter



New-Way Automation b.v.
Posté le 30 mars 2004 - 14:26
I think you have to go to a more lower level, change or create a DSN ?
Do you know where the parameters are stored? Registry?
Peter

Thanks Peter and Joop,
I found a solultion without dealing/handling with DSN files and/or Registry settings. My idea comes from the ADO connect string. And what a supprise, it works!
myParam is string = "DRIVER=Topspeed Developer version; NullEmptyStr=N; Oem=N; Extension=LTF; DBQ=D:\CWAB\ICP_cz.ltf\!"
HDescribeConnection("New", myParam)
HChangeConnection(UNNAMED, "New")
Best regards
Raimujnd

http://www.invitec.com
Posté le 31 mars 2004 - 01:07
Hi you,
is there a way to use a dynamic ODBC connection or to change the ODBC
parameters at runtime?
I have the need to read a TOPSPEED file, but the name and directory has to be
defineable at runtime.
I played a little bit with HDescribeConnection and HDescribeFile but without
luck.

I think you have to go to a more lower level, change or create a DSN ?
Do you know where the parameters are stored? Registry?
Peter