Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OBDC setup
Message
De
11/08/1997 15:22:49
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
11/08/1997 11:33:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00043986
Message ID:
00044079
Vues:
31
>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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform