Nov 23, 2001 #1 sohjai Programmer Nov 23, 2001 8 HK What I want to know is, how can I check whether a recordset is closed or not?? This is my first time to write VB code, I guess this might be a very simple question, but I really have no idea how to do it at the moment.........
What I want to know is, how can I check whether a recordset is closed or not?? This is my first time to write VB code, I guess this might be a very simple question, but I really have no idea how to do it at the moment.........
Nov 23, 2001 #2 Yazster Programmer Sep 20, 2000 175 CA check the STATE of your recordset. if recordset.STATE=0 then your recordset is closed. Upvote 0 Downvote
Nov 23, 2001 #3 Terpsfan Programmer Dec 8, 2000 954 US Dim objRec as ADODB.Recordset Set objRec = New ADODB.Recordset objRec.Open "Select * From Accounts",objConn,adOpenDynamic, adLockOptimistic,adCmdText If objRec.State = adStateClosed Then MsgBox "Recordset could not be opened" End If Upvote 0 Downvote
Dim objRec as ADODB.Recordset Set objRec = New ADODB.Recordset objRec.Open "Select * From Accounts",objConn,adOpenDynamic, adLockOptimistic,adCmdText If objRec.State = adStateClosed Then MsgBox "Recordset could not be opened" End If
Nov 24, 2001 #4 Guest_imported New member Jan 1, 1970 0 Thank you for your help, one more question please Then how can I check whether the recordset is set to Nothing? Upvote 0 Downvote
Thank you for your help, one more question please Then how can I check whether the recordset is set to Nothing?