Note that there are some explanatory texts on larger screens.

plurals
  1. POConnection String in Textbox
    primarykey
    data
    text
    <p>I'am new in programming and my problem is. i have put my ado db connection string into a text box how can i call that text box? i'm creating my program in vb 6 and here's my code.</p> <pre><code>Private Sub lvButtons_H2_Click() On Error GoTo errtrap If Label47.Caption = "True" Then MsgBox "INITIAL SETTING FOR SHIP ACCOUNT IS BEING PERFORMED", vbOKOnly, "ABORT" Exit Sub End If Dim conas As New ADODB.Connection, rs01 As New ADODB.Recordset, rsx1 As New ADODB.Recordset, RS9 As New ADODB.Recordset conas.Connectio`enter code here`nString = Text1155.Text conas.Open Set RS9 = New ADODB.Recordset RS9.ActiveConnection = conas RS9.CursorType = 3 RS9.LockType = 3 RS9.Open ("SELECT * FROM [SHIPACCOUNT].[dbo].[SPARE PART LIST BOND 29 MONTHLY] WHERE NAMECODE = " &amp; Text2.Text &amp; "") Set DataReport2.DataSource = RS9 DataReport2.Sections("Section2").Controls.item("LABEL12").Caption = Text1.Text DataReport2.Sections("Section2").Controls.item("LABEL11").Caption = Text3.Text DataReport2.Sections("Section1").Controls.item("TEXT1").DataField = RS9![PARTSNAME].Name DataReport2.Sections("Section1").Controls.item("TEXT2").DataField = RS9![Price].Name DataReport2.Sections("Section1").Controls.item("TEXT3").DataField = RS9![unit].Name DataReport2.Sections("Section1").Controls.item("TEXT4").DataField = RS9![QTYAPPLY].Name DataReport2.Sections("Section1").Controls.item("TEXT5").DataField = RS9!QTYAPPROVE.Name DataReport2.Sections("Section1").Controls.item("TEXT6").DataField = RS9![AMOUNTAPPROVE].Name DataReport2.Sections("Section1").Controls.item("TEXT7").DataField = RS9![Date].Name DataReport2.Show 1 Exit Sub errtrap: MsgBox Err.Description, vbCritical, "The system encountered an error" End Sub </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload