Error No 3709 Vb
Contents |
be..... If this is your first visit, be sure to check out the runtime error 3709 vb6 FAQ by clicking the link above. You may have to
Run Time Error 3709 The Search Key Was Not Found
register before you can post: click the register link above to proceed. To start run-time error '3709' requested operation requires an ole db viewing messages, select the forum that you want to visit from the selection below. Results 1 to 11 of 11 Thread: Run-time error '3709'
Run-time Error '3709' The Connection Cannot Be Used To Perform
The connection cannot be..... Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Nov 23rd, 2010,03:00 PM #1 Patoh View Profile View Forum Posts Thread Starter Lively Member Join Date Nov 2010 Posts 71 Run-time error '3709' error 3709 the connection cannot be used to perform this operation The connection cannot be..... Hey people! Watsup! i need your help am getting a Run-time error '3709': (The connection cannot be used to perform this operation. Its either closed or invalid in this context) when this code tries to execute. Can anyone see the problem i have tried re writing the sql to no avail. please help Code: Private Sub lvButtons_H1_Click() Dim MyCon As New ADODB.Connection Dim MyRs As New ADODB.Recordset 3709 Error Code: MyRs.Open "SELECT plans.Number, plans.plan, patients.fname, patients.lname , plans.phone number, plans.card number, plans.vcode, plans.expiry FROM plans LEFT JOIN patients ON plans.payerid = patients.number WHERE plans.plan='" & Me.Combo1.Text & "'" With DataReport9.Sections("Section1").Controls 'section1 mean that section you create in datareport .Item("rptpayid").DataField = MyRs("payerid").Name .Item("rptplan").DataField = MyRs("plan").Name .Item("rptname").DataField = MyRs("fname").Name .Item("rptlname").DataField = MyRs("lname").Name .Item("rptphone").DataField = MyRs("phone number").Name .Item("rptcard").DataField = MyRs("card number").Name .Item("rptvcode").DataField = MyRs("vcode").Name .Item("rptexp").DataField = MyRs("expiry").Name End With Reply With Quo
? Ask a question, help others, and get answers from the community Discussions Start a thread and discuss today's topics with top experts Blogs Read the latest
Run Time Error 3709 Vba
tech blogs written by experienced community members How to fix run-time error
Runtime Error 3709 Excel Vba
3709 with my computer beginner1 5 pts. Tags: Thanks! We'll email youwhen relevant content isadded and updated. Following run time error 3709 database connection problem Follow Visual Basic 6 Thanks! We'll email youwhen relevant content isadded and updated. Following Follow Visual Basic Error Messages When I try to run my program it says run-time http://www.vbforums.com/showthread.php?633744-Run-time-error-3709-The-connection-cannot-be error 3709 the connection cannot be used to perform this action, it is either closed or invalid in this context. mean while I used a module in which i put the following codes : Public cn As ADODB.Connection Public Sub Main() Dim cn As ADODB.Connection Set cn = New ADODB.Connection cn.ConnectionString = "C:UsersLab2c28DocumentsAuthors databaseauthors.mdb" cn.Open Form1.Show End Sub and then http://itknowledgeexchange.techtarget.com/itanswers/how-to-fix-run-time-error-3709-with-my-computer/ I put the following codes in a save button : Private Sub cmdsave_Click() Dim rsauthors As New ADODB.Recordset Set rsauthors = New ADODB.Recordset With rsauthors: ActiveConnection = cn Source = ("SElect * From authors") . LockType = adLockOptimistic Open End With With rsauthors: AddNew Fields("Book ID_") = Text1.Text Fields("Name") = Text2.Text Update End With End Sub Please help meSoftware/Hardware used: VB6 Asked: October 11, 20122:08 PM Last updated: October 24, 201312:21 PM Related Questions Error in Select Statement How to connect Access database to a Visual Studio 2005? Runtime error: server has not yet been opened Crystal reports Runtime error: server has not yet been opened Crystal reports Error when tried to update the SSOledbGrid connected to with Sybase Server Database Answer Wiki Last updated: October 24, 201312:21 PM GMT Ametuer30 pts. History Contributors Ordered by most recent Ametuer30 pts. Michael Tidmarsh48,865 pts. beginner15 pts. Thanks. We'll let you know when a new response is added. You could use something like i have done below.Public adoDatabase As New ADODB.ConnectionDim rst As ADODB.Recordset Private Sub Form_Load()Set rs
Forum Visual Basic Programming Visual Basic 6.0 Programming Run time error '3709' If this is your first http://forums.codeguru.com/showthread.php?29067-Run-time-error-3709 visit, be sure to check out the FAQ by clicking the link http://www.dreamincode.net/forums/topic/289490-run-time-error-3709/ above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 12 of 12 Thread: Run time error time error '3709' Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode March 11th, 2002,06:39 PM #1 pre_wreck View Profile View Forum Posts Member Join Date Feb 2002 Posts 295 Run time error '3709' Here's My Set of codes, but i've got a problem in time error 3709 my record "rs.open SQL, SETCONNECT, adOpenKeyset, adLockOptimistic" But still the same problem. I ve got this error. Run-time error '3709' the connection cannot be used to perform this operation. it is either closed or invalid in this context. Please help me reconstruct my codes. ----------------- CODES ----------------- Module1 ------------------ Option Explicit Public rs As ADODB.Recordset Private cn As ADODB.Connection Sub Main() Dim cmd As String cmd = "ODBC;DATABASE=ems_ho1;UID="";PWD="";DSN=ems_ho1" Set cn = New ADODB.Connection With cn .ConnectionString = cmd .open End With End Sub Public Sub SETCONNECT() Set Form1.CURRENTCONNECT = cn End Sub ------------------------ FORM1 ------------------------ Option Explicit Public SETCONNECT As ADODB.Connection Dim rs As ADODB.Recordset Public Property Set CURRENTCONNECT(Setting As ADODB.Connection) Set SETCONNECT = Setting End Property Private Sub loadinfo() Dim SQL As String Set rs = New ADODB.Recordset SQL = "SELECT master.CARD_CODE, master.FIRSTNAME, master.LASTNAME, master.TITLE, master.DEPARTMENT, master.MI, master.Course, master.Photograph_File_Name, verification.Dept, verification.Acctg, verification.Reg, verification.DO, verification.LRC, verification.Guid, verification.Foreign, verification.IClab, verification.ITC, verification.OTHERS, verification.Status, verification.Remarks FROM master LEFT JOIN verification ON master.CARD_CODE = verification.ID_num WHERE (((master.CARD_CODE)='" + txt_StudNo.Text + "'));" rs.open SQL, SETCO
8 Replies - 12796 Views - Last Post: 21 September 2012 - 07:19 AM Rate Topic: #1 thefifthhjohn New D.I.C Head Reputation: 0 Posts: 11 Joined: 13-July 12 run time error 3709 Posted 20 August 2012 - 06:18 AM please help me I'm having error in rs.Open "SELECT * FROM [tbladmin] WHERE [username]= '" & txtUsername.Text & "'", con, adOpenStatic, adLockOptimistic I think my code is right I dunno where I went wrong. Dim strUserName As String, strPassword As String Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub cmdlogin_Click() OpenCon rs.Open "SELECT * FROM [tbladmin] WHERE [username]= '" & txtUsername.Text & "'", con, adOpenStatic, adLockOptimistic If rs.RecordCount <> 0 Then If rs![Password] = txtPassword.Text Then If rs![user_type] = "Principal" Then MsgBox "The Principal has login", vbOKOnly + vbInformation, "LOGIN" frmMain.Transaction.Visible = True frmMain.Maintenance.Visible = True frmMain.Reports.Visible = True frmMain.Exit.Visible = True frmMain.Others.Visible = True frmMain.Files.Visible = True Login1 = 1 'frmMain.Text3 = Text1.Text 'frmMain.Text4 = TimeValue(Now) End If End If End If End Sub Attached image(s) Is This A Good Question/Topic? 0 Back to top MultiQuote Quote + Reply Replies To: run time error 3709 #2 raziel_ Like a lollipop Reputation: 469 Posts: 4,265 Joined: 25-March 09 Re: run time error 3709 Posted 21 August 2012 - 12:42 PM the error says all. either you dont open your connection or the string for the connection is invalid. if you could show us the code where you open the connection we may give you better help Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #3 thefifthhjohn New D.I.C Head Reputation: 0 Posts: 11 Joined: 13-July 12 Re: run time error 3709 Posted 25 August 2012 - 06:53 PM raziel_, on 21 August 2012 - 12:42 PM, said:the error says all. either you dont open your connection or the string for the connection is invalid. if you could show us the code where you open the connection we may give you better help Public con As New ADODB.Connection Public Sub OpenCon() Set con = New ADODB.Connection con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & App.Path & "\database\enrollment.mdb" End Sub Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #4 maj3091 D.I.C Lover Reputation: 327 Posts: 1,945 Joined: 26-March 09 Re: run time error 3709 Posted 26 August 2012 - 02:10 AM Try checking if the connection