|
-
Jun 17th, 2011, 01:18 PM
#1
Thread Starter
New Member
help about code VB6
I downloaded a source code VB6 about pharmacy program and its work but i always got this error
Run-time error 3709
The connection cannot be used to perform this operation. It is either closed or invalid in this contextand after i click on Debug i found this code
Code:
rs.Open "Select Billno from Orders", cn, adOpenKeyset, adLockOptimistic
and this is the complete code
Code:
Private Sub NewMode()
rs.Open "Select Billno from Orders", cn, adOpenKeyset, adLockOptimistic
If rs.EOF Or rs.BOF Then
Me.Text1(0).Text = 1
Else
rs.MoveLast
Text1(0).Text = rs.Fields(0) + 1
End If
Text1(1) = Date
Text1(2) = ""
Text1(3) = 0
Text1(4) = 0
Text1(5) = 0
iGrid1.Clear True
Set rs = Nothing
End Sub
The source code which i downloaded in this website
http://www.planet-source-code.com/vb...68020&lngWId=1
-
Jun 17th, 2011, 08:51 PM
#2
Re: help about code VB6
welcome to the forum,
in that website there are lots of things, but u told simply this is the complete code????
-
Jun 17th, 2011, 11:20 PM
#3
Re: help about code VB6
Have you modified the Data Link to reflect the location of your Database? As distributed it expects the Database to be at: 'D:\VB PROJECTS\Pharmacy\Pharmacy.mdb'. The (many) 'On Error Resume Next' statement(s) is / are stopping you from seeing problems.
-
Jun 18th, 2011, 02:31 AM
#4
Re: help about code VB6
Have a read of the Database Development FAQ which, contains the answers you may need as well as useful examples too.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
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
|