Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OBDC setup
Message
De
11/08/1997 17:18:43
 
 
À
11/08/1997 15:22:49
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00043986
Message ID:
00044101
Vues:
37
Thanks Bob,

A look at what I had in there indicated that the System DSN's are kept in HKEY_Local_Machine, which makes sense, since it's available to all users of the machine. Now it's registry hacking time: I guess it's time to find some registry hacking routines.

Hank


>>I'm using an OCX which needs a DSN set up in OBDC. Doing it manually is no problem. The question is: how to do it programatically. I will have the directory or dbc available (either might be the case). So the question is, how does one programatically create an OBDC DSN?
>>
>>TIA,
>>
>>Hank
>
>
>You will have to add some new entries to the Registry. If you look under HKEY_CURRENT_USER\Software\ODBC\ODBC.INI you will see a number of subdirectories. Your new DSN will have to be added to the list under \Odbc Data Sources. Then you will have to create a new subdirectory with that name under odbc.ini. You will have to add all of the keys required for the particular DSN type (SQL Server, Oracle??) that you are creating. This should be fairly easy using Registry functions to write and read from the registry. I use some now to make sure that the ODBC parameters of the SQL Datasource the user is connecting to has the proper setting (in our system ANSINPW MUST BE SET TO 'No" so I make sure everytime the user logs in and set it if necessary, otherwise some SQL statements don't work, but no error is generated!)
>
>Bob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform