Any help appreciated...

Results 1 to 2 of 2

Thread: Any help appreciated...

  1. #1
    Zachary Maas Guest

    Default Any help appreciated...

    I am just starting ASP and have already come across one annoying little problem in my barely travelled journey...<BR><BR>I am able to retrieve data and output it to the screen once but it seems I am not able to re-output the data until 60 seconds later from the time the database was last queried (ie. if i refresh it fails). I find this quite strange, any clues or help?<BR><BR>My setup:<BR><BR>Windows 2000 - IIS - ODBC System DSN Database called test<BR><BR>Here is the error message:<BR><BR>Error Type:<BR>Provider (0x80004005)<BR>Unspecified error<BR>/test.asp, line 12<BR><BR>Here is the code:<BR><BR>&#060;%<BR>SQL="SELECT firstname FROM test ORDER BY firstname"<BR>set conn=Server.CreateObject("ADODB.Connection")<BR>co "test"<BR>set testing=conn.execute(SQL)<BR>%&#062;<BR><BR>&#060; % do while not testing.eof %&#062;<BR>&#060;%= testing(0) %&#062; <BR><BR>&#060;% testing.movenext <BR>loop %&#062;<BR>&#060;% testing.close %&#062;<BR><BR>Thanks,<BR>Zachary Maas.

  2. #2
    Join Date
    Dec 1969

    Default RE: Any help appreciated...

    Try changing this to a recordset instead of a connection object. Since that is what you are dealing with. As well, you should Set your objects back to nothing after you are through with them. I have also taken out many of the Script Delimiters, as to reduce the "load" on the server.<BR><BR>&#060;%<BR>SQL="SELECT firstname FROM test ORDER BY firstname"<BR><BR>set rst=Server.CreateObject("ADODB.Recordset")<BR>rst. open SQL, "DSN=Test"<BR><BR>do while not rst.eof<BR>= rst(0)<BR><BR>rst.movenext <BR>loop<BR><BR>rst.close<BR>Set rst = Nothing<BR>%&#062;<BR><BR><BR>HTH<BR><BR>Jerry<BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts