Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an ODBC via VFP.
Message
 
 
To
03/04/2006 08:23:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01109907
Message ID:
01109934
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform