Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How read&write vfp tables over the internet via dsnless
Message
From
17/05/2004 10:25:10
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00904435
Message ID:
00904565
Views:
8
I have been using a simular process for the last year. In a striped down fashion, here it is.

First create a ASP page on the web server like so
<%

'--------------------
' Execute SQL statement, and return GetString result
'--------------------
dim cResult, cSQL, rs
cResult = ""
cSQL = unescape(request.QueryString)
if cSQL>"" then 

	cPath = Request.ServerVariables("PATH_TRANSLATED")
	cPath = left( cPath, instrrev(cPath,"\") ) 
	dbLocation = cPath + "data"
	db = "DBQ=" +dbLocation+ "\links.mdb"
	db = db + ";Driver={Microsoft Access Driver (*.mdb)}"

	on error resume next 
	Set Conn = Server.CreateObject("ADODB.Connection") 
	Conn.Open( Db )

	set rs = Conn.Execute( cSQL )
	if not rs.eof then
		' returns a Tab (column) and CRLF (row) delimited string
		cResult = rs.GetString(2,1000000)
	end if

	set rs = nothing 
	set Conn = nothing
end if
response.Clear 
response.write cResult

%>
Greg Reichert
Previous
Reply
Map
View

Click here to load this message in the networking platform