Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a connection to SQL with ADO from VFP 6.0
Message
From
23/05/2002 11:16:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/05/2002 11:06:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00660507
Message ID:
00660517
Views:
27
>Hi, I'm program with VFP 6.0, but now a trying to conect to SQL and i don't know how to do it.
>
>There's anybody that can help me. Thanx.

If you're really asking for ADO :
oRecordset  = NewObject("adodb.recordset")
oConnection = NewObject("adodb.connection")
With oConnection
  .ConnectionString = 'Provider=SQLOLEDB;Data Source=servernamehere;Trusted_connection=Yes' && Or user id and password
  .Open
ENDWITH
oRecordset.Open("SELECT * from pubs.dbo.titles", oConnection )
do while !orecordset.eof()
? oRecordset.Fields(1).Value
oRecordset.MoveNext
enddo
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform