Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP with VFP Data
Message
 
À
29/07/2004 11:08:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00929228
Message ID:
00931323
Vues:
14
are you running in IE? if so can you turn off friendly error messages in internet options and provide some more information?
the way i have done my web linkups, i have created an asp page and included it at the top of all of the pages that uses the data tables. in the connection page i have just the following code.
<%
Dim objConn, ConnStr
Set objConn = Server.CreateObject("ADODB.connection")
ConnStr= "Driver=Microsoft Visual Foxpro Driver; " + _
"UID=;SourceType=DBC;SourceDB=c:\Inetpub\wwwroot\data\database.dbc"
objConn.Open ConnStr 'This can be a datasource name or a connect string
%>
Slán
~M


>Hi,
>I have a simple ASP code as below to access VFP data. However, the code only run fine once. I will get "unspecified error" for second and the following time. To recover, I got to wait for timeout. any ideas? I have install the latest ODBC and OLEDB.
>
>
>&lt;%
>
>dim Myconn, MyRS, dbpath, SQL
>
>set Myconn = Server.CreateObject ("ADODB.Connection")
>
>SQL= "SELECT * FROM sign_up where isnull(level)"
>
>dbpath = "Driver={Microsoft FoxPro VFP Driver (*.dbf)};" & _
>"UID=;PWD=;SourceDB=C:\FLEA2004july\admin\admin.DBC;" & _
>"SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;" & _
>Collate=Machine;Null=Yes;Deleted=Yes;"
>
>Myconn.open dbpath
>
>set myrs = myconn.execute(sql)
>
>if myrs.eof then
>	response.write "No new applicant found!"
>	myrs.close()
>	myconn.close()
>	set myrs = nothing
>	set myconn = nothing
>	return
>end if
>	
>do while not myrs.eof
>	response.write "<tr><td width='50%'>" & myrs.fields("firstname").value & _
>	"</td><td width='50%'>" & myrs.fields("tdate").value & "</td></tr>"
>
>	myrs.movenext()
>loop
>	
>myrs.close()
>myconn.close()
>set myrs = nothing
>set myconn = nothing
>
>
>
>
>Thank you
Go raibh maith agat

~M
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform