DIGIT-ARC read-only archive · snapshot: July 23, 2026

VB6 + ORACLE HELP NEEDED URGENT

5 posts · originally from https://geek.digit.in/community/threads/vb6-oracle-help-needed-urgent.119806/

ajaybc
ajaybc Original post #1
Jul 29, 2009 at 8:01 PM
I have made a database in oracle with the fields Name and marks.
Iam making a frontend program in VB6 for inputting values into it.
But it is VB is showing syntax error.Please help

Dim cn As New ADODB.Connection
Private Sub cmdAdd_Click()
cn.Execute "INSERT INTO MARKLIST(NAME,MARKS) VALUES('"txtNAME.Text"',"txtMarks.text")"
End Sub

Private Sub Form_Load()
cn.ConnectionString = "Provider=MSDAORA.1;Password=ajaybc;User ID=SYSTEM;Data Source=VIRTUALAJAY;Persist Security Info=True"
cn.Open
End Sub
furious_gamer
Jul 30, 2009 at 1:07 PM
^^
Why dont u put your table structure and exact error message here, so that we can understand what's really going on..
ajaybc
ajaybc #3
Jul 30, 2009 at 1:45 PM
^never mind got the solution.
cn.Execute "INSERT INTO MARKLIST(NAME,MARKS) VALUES('" & txtNAME.Text & "'," &txtMarks.text & ")"
furious_gamer
Jul 30, 2009 at 1:47 PM
^^

Thats coool... Atleast i learnt something
ajaybc
ajaybc #5
Jul 30, 2009 at 10:13 PM
:)