Incorrect syntax near '3'.

Posted by Cibin under VB.NET on 7/18/2013 | Points: 10 | Views : 3715 | Status : [Member] | Replies : 2
Hi,

When i retrieve data from one table in access database and insert to another table in sql database , the following error will occur.." Incorrect syntax near '8' " . For small number of records there is no error. but when copy a large amount of data with WHERE clause , it shows the error. Anyone please help to solve this error..

Thanks in advance.




Responses

Posted by: Palraj001 on: 7/31/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Cibin ,
I guess You are taking string values from access and trying to insert in SQL.
in SQL we use '' (single codes) to insert Varchar values.
when you read and insert from the access you forgot to to format the string.
This is my Guess. check the data to SQL Query.

Regards,
Palraj M



Cibin, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 7/31/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Can you post the WHERE condition logic and datatypes of respective columns in the table

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Cibin, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response