getRecordSet problems...

Results 1 to 3 of 3

Thread: getRecordSet problems...

  1. #1
    mark Guest

    Default getRecordSet problems...

    I have the following code:<BR><BR>Set DataConn = Server.CreateObject("ADODB.Connection")<BR> DataConn.ConnectionTimeout = 1<BR> DataConn.CommandTimeout = 1<BR> DataConn.Open DB_CONNECTIONSTRING&#039;,"",""<BR> DataConn.CursorLocation = 3<BR> DataConn.CursorType="adOpenDynamic"<BR> DataConn.LockType="adLockOptimistic"<BR> Set objRSGetRecordset = Server.CreateObject("ADODB.RecordSet")<BR> <BR> objRSGetRecordset.Open sSQL, DataConn,,,adCmdTable<BR> <BR> Set GetRecordset = objRSGetRecordset<BR><BR>I then have some code after this:<BR><BR>dim rsEventRecordSet<BR> dim sSQL<BR> sSQL = "Select * From Events"<BR> set rsEventRecordset = GetRecordset(sSQL) (**)<BR><BR>BUT the page freezes at the last line (**). Can anyone tell me why? (sorry to put code in my question but ..)(DB_CONN is in an include).<BR><BR>Thanks for any help or suggestions,<BR><BR>Mark

  2. #2
    Join Date
    Dec 1969

    Default RE: getRecordSet problems...

    You&#039;re using the wrong command type: it should be adCmdText to execute a SQL query, not adCmdTable.<BR><BR>Don&#039;t apologise for posting code - it&#039;s usually essential! It&#039;s just when someone posts massive amounts of irrelevant code that people get irritated.<BR><BR>Dunc

  3. #3
    Join Date
    Dec 1969

    Default RE: getRecordSet problems...

    Hello,<BR><BR>I tried that but it still died. (I had also tried objRSGetRecordset.Open sSQL, DataConn, ,adOpenStatic ,adLockOptimistic with no joy). It dies at the line: set rsEventRecordset = GetRecordset(sSQL) and leaves an .ldb file as well.. It&#039;s doing my head in! We have ADO2.5 installed if that helps?<BR><BR>Thanks,<BR><BR>Mark

Posting Permissions

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