Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win XP and ODBC Controller 1

Status
Not open for further replies.

bigdad

Programmer
Jul 17, 2001
34
VE
Hi everybody Ihope someone can help me withj this one:

I need to do a ODBC conection but I don´t know how can I do it at Windows XP PRO. This is because I use the SQLSTRINGCONNECT to do the conection but I don´t know how in XP

Thank´s a lot if somebody may help me


Bigdad
 
Bigdad,
There is no difference between the SQLSTRINGCONNECT requirements in XP compared to any other OS. What are you using, and why don't you think it's working in XP? Note: You will still need the same security rights no matter what OS you are running, does the XP workstation and your logon not qualify?

Rick
 
to be more specific: this is my code conection:

conex=SQLSTRINGCONNECT('DSN=Visual FoxPro Database;UID=;PWD=;SourceDB=myfolder\mydatabase.dbc;SourceType=DBC;Exclusive=No;BackgroundFetch=Sí;Collate=Machine;Null=Sí;Deleted=Sí;')

conex2=SQLSTRINGCONNECT('DSN=Visual FoxPro Database;UID=;PWD=;SourceDB=C:\myfolder\mydatabase.dbc;SourceType=DBC;Exclusive=No;BackgroundFetch=Sí;Collate=Machine;Null=No;Deleted=No;')
IF conex<0 then
MESSAGEBOX(&quot;Thew conection with your server is incomplete&quot;,48,&quot;Error 0002&quot;)
thisform.Release
ELSE
another thing
ENDIF
both variables (conex,conex2) are to separate the delete registry from the undelete for some reason. Well my problem is taht this work in all my other OS but in XP don´t doit. Always show me the messagebox...
Bigdad
 
BigDad,
First I'll assume that the SourceDB in 'conex' has a typo and really has 'c:\' in it.

Did you explictly install the VFP ODBC driver on this XP workstation? It doesn't come installed on XP - it hasn't been included since MDAC 2.5. If you don't have the latest (last) ODBC version of the VFP driver (6.1.8629.1) version, go to and get it.

Rick
 
is not an error 'c:\', this is just because I firts do it the local program (in my PC) and after I change the path with my network path. I´ll go to treat with this ODBC version, to be honest I didn´t know this about ODBC
 
bigdad,

Create an new empty text document on your computer and rename it &quot;ConStr.udl&quot; (this is a Microsoft Data Link file extension), then double-click on it and set up your data connection exactly as you need it in the dialog that pops up (test connection) click OK to save and close udl file. Then open that udl file up with Notepad and Copy & Paste the connection string out of it into your code.

Slighthaze = NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top