Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
VB.net Insert Customer Code |
Author |
Message |
|
Posted : 2008-06-11 03:01:35 |
I'm not sure what I'm doing wrong here. I am trying to insert into the Quickbooks Customer file using your example person with with VB.NET:
Try
Dim cnIns As New OdbcConnection
cnIns.ConnectionString = ("DSN=HaneyOne")
Dim commIns As OdbcCommand
commIns = New OdbcCommand("Insert into Customer(Name,LastName,FirstName,BillAddressAddr1,BillAddressCity,BillAddressState,BillAddressPostalcode)Values('Zuniga, Daphne','Zuniga','Daphne','561 W 4th St.','Carlsbad','CA','92009'", cnIns)
cnIns.Open()
CommIns.ExecuteNonQuery()
cnIns.Close()
Catch ex As Exception
Me.lblInsMsg.Text = "Error: " & ex.ToString()
End Try
lblInsMsg.Text = "Insert Successful"
I am getting the error: ERROR [42000] [QODBC] Expected lexical element not found. What am I missing? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-06-11 10:16:46 |
The values are missing the closing )
commIns = New OdbcCommand("Insert into Customer(Name,LastName,FirstName,BillAddressAddr1,BillAddressCity,BillAddressState,BillAddressPostalcode)Values('Zuniga, Daphne','Zuniga','Daphne','561 W 4th St.','Carlsbad','CA','92009')", cnIns) |
|
|
|
|
Posted : 2008-06-12 00:16:09 |
|
|
|
|