Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting VFP DB
Message
From
27/11/2002 22:50:08
 
 
To
27/11/2002 22:32:55
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00727851
Message ID:
00727853
Views:
7
In the past, I used FoxPro Databases to store web information. Back then this is how I it was done:

logfile_dbc=server.mappath("/data/datafile.dbc")
Set oConn = Server.CreateObject("ADODB.connection")
ConnStr= "Driver=Microsoft Visual FoxPro Driver; " + _
"SourceType=DBC;SourceDB=" & logfile_dbc & ";BackgroundFetch=No;"
oConn.Open ConnStr
set RS = server.CREATEOBJECT("ADOR.Recordset")
Rs.cursortype = 1 'adOpenKeyset
Rs.cursorlocation = 2 'adUseServer
Rs.locktype = 3 'adLockOptimistic
Query="select top 1 * from table"
Rs.OPEN Query,oConn
rs.addnew
rs.fields("fieldname")="12345"
rs.update
RS.Close
oConn.Close
set rs=nothing
set oConn=nothing

Now OLEDB is faster. I switched to MSSQL 2000 to store my data but still use the web and FoxPro for my frontend. I have used OLEDB, I might have something on my forum about it. You can search at www.planot.com. Anyway, the above will open a FoxPro database and select the first record in the table. Then it adds a new record to the table.

Good Luck....

Tim Boccaleri
Previous
Reply
Map
View

Click here to load this message in the networking platform