Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ado x ODBC
Message
From
07/02/2002 16:44:27
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00616861
Message ID:
00617032
Views:
29
This message has been marked as a message which has helped to the initial question of the thread.
Claro.. aí vai o exemplo...
lcStrConn = "driver=sql server;server=lassalanotebook;database=pubs;uid=sa;pwd=;"
lcSelectSQL = "select * from authors"

*** exemplo com SPT
lnHandle = SQLStringConnect(lcStrConn)
SQLExec(lnHandle, lcSelectSQL)
SQLDisconnect(lnHandle)

*** exemplo com ADO
LOCAL loConn as adodb.connection
loConn = CreateObject("adodb.connection") 
loConn.Open(lcStrConn)

LOCAL loRS as adodb.recordset
loRS = CreateObject("adodb.recordset") 
loRS.Open(lcSelectSQL, loConn)

? loRS.Fields("au_lname").Value
Claudio Lassala
Previous
Reply
Map
View

Click here to load this message in the networking platform