Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a system DSN
Message
 
 
À
30/08/2001 17:11:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00551109
Message ID:
00551157
Vues:
27
This message has been marked as a message which has helped to the initial question of the thread.
Randy,

There's file#9749 'ODBC DSN Class' in download section.
Also did you consider using DSNless connections?

>Is anyone reliably creating System DSN's through code?
>The following fragment:
>
>DECLARE Integer SQLConfigDataSource In odbccp32.dll Integer, ;
> Integer, String, String
>dbms=trim(dbmsname)+chr(0)
>if "."$odbcservername
> settings="DSN="+trim(odbcservername)+chr(0)+"SERVER="+trim(odbcservername);
> +chr(0)+"DATABASE="+trim(odbcdatabase)+chr(0)+"NETWORK=DBMSSOCN"+chr(0)
>else
> settings="DSN="+trim(odbcservername)+chr(0)+"Description="+trim(dbmsname);
> +chr(0)+"SERVER="+trim(odbcservername)+chr(0)+"DATABASE=";
> +trim(odbcdatabase)+chr(0)
>endif
>retval = SQLConfigDataSource(0,4,@dbms,@settings)
>
>gives me a dialog with ODBC Installer on the title bar and the following message:
>
> ODBC can't load the resource \dev\odbcpps\
>
>where \dev\odbcpps\ is the current path, and contains ODBCCP32.DLL
>
>Any Ideas? MSDN is mum on this one.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform