Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an ODBC via VFP.
Message
 
À
03/04/2006 08:23:55
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:
01109934
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform