Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5, ODBC, ADO, OLEDB, Confused
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00759246
Message ID:
00759254
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all
>
>I use Report Manager for reporting. RM uses ADO for querying data from the DBC's, MS suggests that we should use OLEDB (correct?) to query data as ODBC drivers for VFP is discontinued in 2.6/7.
>
>Can ADO use OLEDB? Right now I have to open Data Sources (ODBC) to specify DSN and then use it in RM. How to make things future proof with exisiting stuff.
>
>Please clarify as I have things workign alright but theories in my head is not clear.

Sorry, I'm not an expert, but you can use either of them. Here is a message from Thomas Whiteley (though I didn't make it with OLE DB - will try again later on):
Dim strConn

'strConn = "Provider=SQLOLEDB; Data Source=" & _
' Request.ServerVariables("SERVER_NAME") & _
' "; Initial Catalog=pubs; User ID=sa; Password="

' ODBC DSN-less connection...
''strConn = "Driver={SQL SERVER};SERVER=LOCALHOST;DATABASE=Test;UID=SA;PWD=;"

'strConn = "Provider={SQL SERVER};Persist Security Info=True;UID=UserID;PWD=Password;Initial Catalog=QMDS;Data Source=TVS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=SomeID;Use Encryption for Data=False;Tag with column collation when possible=False"

strConn = "Driver={SQL SERVER};SERVER=VSQ;DATABASE=Test;UID=UserID;PWD=Password;"

'strConn = "Driver={SQL SERVER};SERVER=TDEV;DATABASE=Test;UID=UserID;PWD=Password;"

'OLEDB DSN-less connection...
'strConn = "Provider=SQLOLEDB.1;Server=TDEV;Database=Test;UID=sa;PWD=;"
Try using each one to see the difference by commenting out all but the one in use. It includes OLEDB and ODBC with DSN-less connections.
===========================================================
I hope I don't reveal the important UserIDs and Passwords (I replaced them with UserID, Password keywords)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform