Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an ODBC via VFP.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01109907
Message ID:
01109936
Vues:
22
This message has been marked as a message which has helped to the initial question of the thread.
Try this:
? SQLSTRINGCONNECT([Driver={SQL Server};Server=METAFRAME;Database=excepciones;Uid=USER_NAME_HERE;Pwd=PASSWORD_HERE])
** or if you use Trusted connection
? SQLSTRINGCONNECT([Driver={SQL Server};Server=METAFRAME;DATABASE=excepciones;Trusted_Connection=yes;])
>mmm I set all the parameters... but it doesn't work.. I changed the values:
>
>
>  strAttributes = "SERVER=METAFRAME" + Chr(0)
>  strAttributes = strAttributes + "DESCRIPTION=Temp DSN " + Chr(0)
>  strAttributes = strAttributes + "DSN=DSN_TEMP " + Chr(0)
>  strAttributes = strAttributes + "DATABASE=excepciones " + Chr(0)
>  strAttributes = strAttributes + "UID=" + Chr(0)
>  strAttributes = strAttributes + "PWD=" + Chr(0)
>  intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_DSN, strDriver, strAttributes)
>
>
>But IntRet returns 0 (zero)
>
>Any further help???
>
>>>Is it possible to define / create and ODBC with VFP programming? I need to develope a new program with access to an existing SQL Server database and I would not like to go to each PC to create the ODBC by myself, instead of that, I would like to create an option on the program's menu for creating the needed connection to the SQL Database.
>>
>>To make a programmatic connection to an ODBC driver, without using a DSN, you use the SQLStringConnect() function:
>>http://fox.wikis.com/wc.dll?Wiki~VFPCommandSQLStringConnect
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform