Link to home
Start Free TrialLog in
Avatar of jason101799
jason101799

asked on

Error Transaction cannot start while in firehose mode

I am having these error :

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Transaction cannot start while in firehose mode.

line 95

---------------------------------------------------------
conn.Errors.clear
Err.Clear
conn.BeginTrans <--------LINE 95

For i=1 To cnt
ChkLstID(i) = Request.Form("Lic017_CChkLstID")(i)
  If LicStatus = "A" Then
    sqlInsertChkLstID = "INSERT INTO LFXLic_StoreChkLst (Lic_App_RefNo, Lic_No, CheckList_ID, Lic_App_Type, Lic_Type, Create_User_ID, Update_User_ID, Create_TimeStamp, Update_TimeStamp) values ('" _
          &  LicAppRefNo & "','" _
          &  LicNo & "','" _
          &  ChkLstID(i) & "','" _
          &  LicAppType & "','" _
          &  LicType & "','" _
          &  userId & "','" _
          &  userId & "','" _
          &  timeStamp & "','" _
          &  timeStamp & "')"
     Else      
          sqlInsertChkLstID = "INSERT INTO LFXLic_StoreChkLst(Lic_App_RefNo, CheckList_ID, Lic_App_Type, Lic_Type, Create_User_ID, Update_User_ID, Create_TimeStamp, Update_TimeStamp) values ('" _
          &  LicAppRefNo & "','" _
          &  ChkLstID(i) & "','" _
          &  LicAppType & "','" _
          &  LicType & "','" _
          &  userId & "','" _
          &  userId & "','" _
          &  timeStamp & "','" _
          &  timeStamp & "')"
     End If    
     
     conn.execute sqlInsertChkLstID
Next

If err.Number > 0 or conn.errors.count > 0 Then
   conn.rollbackTrans
   Response.Write DB1002
Else
   conn.CommitTrans
end if

---------------------------------------------------------

Can anyone help me on this. Attached will be my source codes.Thank you.


Cheers
Avatar of _marko_
_marko_

Fire hose mode: read-only and forward-only cursors.

Check your cursors...

-Marko
Avatar of jason101799

ASKER

MArko,

I am inserting record into table. No cursor is involved.


Cheers
Avatar of Michel Sakr
did you close a previous transaction in the same connection??
I have only one begin transaction which is at line 95. Thats all. If I have a execute statement before line 95, will it affect the program?


Cheers
in the same connection? try to either include it in the transaction or use another connection..
jason,

i was facing the same problem, but i came to know..
you've to close all the recordsets and destroy it. if u r opening before Line No. 95. And Let me know what code u r writing b4 the Line No. 95. If you are opening any recordsets then you've to close and destroy it.. then only it'll work perfectly..

Cheers
YamihO
How do you open the connection? Please show the line for it...

-Maeko
ASKER CERTIFIED SOLUTION
Avatar of yamiho
yamiho

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial