Gurdeep

Gurdeep

  • NA
  • 31
  • 0

Sage line 50 v 11 and VB.NET connection

Apr 13 2007 8:42 AM

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


Answers (1)