Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sha_agrawal
Starting Member
24 Posts |
Posted - 2010-02-01 : 08:17:47
|
| I am using SQL Server 2000 and VB6. Below given code works fine for the first time and next time it raises error that 'object is open' at last line. I have already closed RS(RecordSet), is there any way to close Command(CmdForSP) too.If RS.State = 1 Then RS.CloseCmdForSP.CommandText = "SPToShowPrevMonthAtStartUp"CmdForSP.CreateParameter 'year parameter is to passedCmdForSP.Parameters.Append CmdForSP.CreateParameter("sp_yr", adInteger, adParamInput, , Val(TxtPrvYr.Text))RS.CursorType = adOpenDynamicRS.LockType = adLockOptimisticRS.Open CmdForSP.ExecutePls.help me. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-01 : 08:46:31
|
| you've not given rs.open inside any condition so even if its already open it will again try to open it. is above code inside any loop? |
 |
|
|
|
|
|