Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems refreshing data from a Fox table in ASP
Message
De
15/08/2001 15:19:51
 
 
À
15/08/2001 12:32:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00544163
Message ID:
00544274
Vues:
21
This might be related to IIS caching your page. It usually happens for the same user and session.

Check this FAQ on aspfaq.com and see if this is the problem: http://www.aspfaq.com/faq/faqShow.asp?fid=21
HTH

>I have an ASP page that uses an ado recordset object to a foxpro table (DBF), which has only one record. The table is getting updated every few seconds by a foxpro app. When I first wrote the page, it seemed to work fine, but then I noticed that it always displayed the data from the first time it was run. I am fairly new at both ASP and Foxpro and I find myself stuck at this point. Any pointers on how to refresh the data in my ASP page would be of great help.
>
>Here is the code where I set up my connection:
>
>Set adoRecordSet = Server.CreateObject("ADODB.Recordset")
>Set adoSQL = Server.CreateObject("ADODB.Connection")
>adoRecordSet.Source = "SELECT myfield1 AS Expr1, myfield2 AS Expr2, myfield3 AS Expr3 FROM mytable"
>strConnection = "DSN=Visual FoxPro Tables;SourceDB=f:\mydirectory"
>adoRecordSet.ActiveConnection = strConnection
>adoRecordSet.CursorType = 1
>adoRecordSet.LockType = 3
>adoRecordSet.Open
>
>And here is where I actually use the data:
>
>Select Case adoRecordSet.Fields("Expr1")
>	Case True
>		Response.Write "Something"
>	Case Else
>	    Response.Write adoRecordSet.Fields("Expr1")
>		Response.Write "Something Else"
>End Select
>
>Select Case adoRecordSet.Fields("Expr2")
>	Case True
>		Response.Write "Another thing"
>	Case Else
>		Response.Write adoRecordSet.Fields("Expr2")
>		Response.Write "Another other thing"
>End Select
>
>Response.Write "Active=" & adoRecordSet.Fields("Expr3")
>
>Thanks
>Phillip
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform