Topic Starter
Posts: 49 From: Canada, eh? Status: offline
|
ASP problems - 3/30/2001 20:00:00
I'm having some problems with what I thought was my server, but now it may be how FP connects to the database. I'm just wondering if anyone else has had this problem. For instance on some clients' sites they have admin screens that for example allow them to enter in a new Fishing Tournament into the event database. Once this is completed, if you go back to the event listings, the browser has to be refreshed in order to show the new event. Sometimes the header disappears and the page looks like a mess, and sometimes I have to delete my temp files and then refresh, its getting to be a real problem. I posted a message on a newsgroup, and thought I would bring my problem to you. Here is the response I got, sorry this message will be so long....Hi, It sounds to me that it is a ASP/Database issue, and nothing to do with the servers, refreshing, cookies or HTTP configs. When you say the user has to close the browser and re-open - this starts a new server session, therefore data will be written to the database, and the user will see it. We had this problem - inserting, or deleting data from a database, then go to another page to view the result - and get the old data. The problem was down to our connection to the database. For example .... Dim objConn Dim objRst Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") Set objRst = Server.CreateObject("ADODB.Recordset") objConn.Open "DBQ=" & Server.Mappath("../../../databases/PCM.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" ' strSQL = "YOUR SQL STATEMENT HERE" objRst.Open strSQL, objConn , 1, 3 <#### objRST.CacheSize = 1 The line that I've marked above "objRst.Open strSQL, objConn , 1, 3 " it the line that opens the recordset, sets the cursor, and connection type. To me, it sounds like you've set your cursor wrong. The above line sets the Cursor to 3, meaning dynamic. That way I can go up and down the recordset, and view changes to the DB in real time. It's all to do with how you connect to the database
|