|
-
Jan 24th, 2006, 06:57 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Error 3705...........
VB Code:
Private Sub cbovendname_Click()
Dim intVendorId As Integer
intVendorId = cbovendname.ItemData(cbovendname.ListIndex)
[B]Set adoRs.ActiveConnection = adoCn[/B]
With adoRs
adoRs.LockType = adLockReadOnly
adoRs.CursorType = adOpenKeyset
adoRs.Open "Select * From Vendor Where ID = " & intVendorId
End With
txtlocation = adoRs!Location & ""
'adoCn.Close
End Sub
Error on Bold line
Error No 3705
Operation is not allowed when object is open
When
cbovendname_click then Corresponding Location from Datbase Shown
at first instance showing Correct but when i select the IInd Time then It shows Above Error
-
Jan 24th, 2006, 06:59 AM
#2
Re: Error 3705...........
 Originally Posted by vaishali
When cbovendname_click then Corresponding Location from Datbase Shown at first instance showing Correct but when i select the IInd Time then It shows Above Error
And that makes perfect sense. Why are you trying to open a connection that is already open?
-
Jan 24th, 2006, 07:01 AM
#3
Re: Error 3705...........
remove or comment the line. bcoz the connection you have already opened.
instead of opening like that could u try this
sql="Select * From Vendor Where ID = " & intVendorId
adoRs.Open sql,adoCn,adOpenKeyset,adLockOptimistic
-
Jan 24th, 2006, 07:02 AM
#4
Thread Starter
Addicted Member
Re: Error 3705...........
Dear Hack Sir,
What to modify...........
-
Jan 24th, 2006, 07:03 AM
#5
Re: Error 3705...........
 Originally Posted by vaishali
Dear Hack Sir,
What to modify...........
Open it once, leave it alone, and close it only when your application ends.
-
Jan 24th, 2006, 07:12 AM
#6
Thread Starter
Addicted Member
Re: Error 3705...........
Thank u so much
Hack & Ganeshmoorthy
Resolved
Dear Hack can u check out MSflexgrid Problem Posted by Vaishali
-
Jan 24th, 2006, 07:13 AM
#7
Re: Error 3705...........
 Originally Posted by vaishali
Thank u so much
Hack & Ganeshmoorthy
Resolved
Dear Hack can u check out MSflexgrid Problem Posted by Vaishali

Sure.
If this is resolved, please pull down the Thread Tools menu and click the Mark Thread Resolved button. That will let everyone know that you have your answer.
Thank you.
-
Jan 24th, 2006, 07:13 AM
#8
Re: Error 3705...........
Mr. Hack is right. do not open the connection often. open it once and close it when ur app is closed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|