SAGE line 50 v 11 and VB.NET

  • Thread starter Thread starter gurdeeptoor via AccessMonster.com
  • Start date Start date
G

gurdeeptoor via AccessMonster.com

Hi Folks,
I am building an application in VB.NET... It connects to 2 databases MS SQL
SERVER 2005 and MS ACCESS 2003 .. It works all fine with SQL but It only
reads the record from the ACCESS table which is linked with SAGE ACCOUNTING
SOFTWARE V 11... Now When i Update or add record to the ACCESS linked table
then i got the Error..... INVALID KEYWORD SPECIFICATION... My Code looks like.
...

' ----------------------------------------------------------------------------
-------------------------------------------------------------------

Dim connectiontring As String = "Provider=Microsoft.Jet.OLEDB.4.
0;DSN=SageLine50v11;Driver={Sage Line 50v11}
;Server=SHAYK;Databse=Line50Link;uid=manager;pwd=;"

conSage = New OdbcConnection(connectiontring)

conSage.Open()

str = "Insert into SALES_LEDGER (NAME, ACCOUNT_REF, WEB_ADDRESS) values ("
_
& "'" & txtCustAcName.Text & "'," _
& "'" & txtCustAcNo.Text & "'," _

& "'" & txtCustWeb.Text & "');"

cmdSageAddSL = New OdbcCommand(str, conSage)

Dim returnValue As Integer

returnValue = cmdSageAddSL.ExecuteNonQuery()

' ----------------------------------------------------------------------------
-------------------------------------------------------------------

The error is -->

INVALID KEYWORD SPECIFICATION

On the Following line -->

returnValue = cmdSageAddSL.ExecuteNonQuery()

Can anybody Plz Help.... Or Is there any other method i should use for SAGE...
????

Thanks
 
Just a guess: could it be the filed name "Name"? Try to use [Name], see what
happens.
 
I suppose that you should follow closely the documentation that comes with
SAGE.

In your connection string, you are using the JET OLEDB Provider for Access,
followed by an ODBC DSN, and ODBC Driver and after that, you are using a
..NET ODBC connection objet. I don't know if this is the proper way of
accessing a SAGE database but I doubt it.

You should ask this in a newsgroup about SAGE. If you are following one of
their exemple, you should indicate it and if you have decided to make
modifications on it, you should also indicate where you have made these
modifications, too.
 
Back
Top