Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Frontpage 2000 and VFP DB
Message
 
To
02/12/2002 05:22:27
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00728533
Message ID:
00728813
Views:
20
I use the following code in a file called connection.asp and include that at the start of all the asp pages that i reference a database


Dim objConn, ConnStr
Set objConn = Server.CreateObject("ADODB.connection")
ConnStr= "Driver=Microsoft Visual Foxpro Driver; " + _
"UID=;SourceType=DBC;SourceDB=c:\location_of_database\database.dbc"
objConn.Open ConnStr 'This can be a datasource name or a connect string



this code is at the top off all my pages using the database



i reference the database a couple of ways, one is as follows

Dim adm_RS3, adm_SQL3

Set adm_RS3=Server.CreateObject("ADODB.Recordset")
adm_SQL3 = "SELECT * FROM loginlog"
set adm_RS3 = objConn.Execute(adm_SQL3)

HTH

~M
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform