Microsoft OLE DB Provider for ODBC Drivers error ''80040e07''

  • Hi

      I'm trying to insert the value into the SQL database and i got the error of:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

     

    [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'Y' to a column of data type int.

    Actually, (the column of data type int that mention in above error) the column in my database field name is nvarchar. But why i can't insert this value into it.

    I tried this SQL statement

    "insert into xxx select * from xxx" . Then i got the error.

    But when i tried to insert in sql query analyzer like this

    "insert into xxx(col1,col2) values ('Y' , 'nnn') and it works.If anybody has an idea, please let me know. Thank you.

  • ppa - the order of columns in your "insert into" table may be different from the column order in your "select from"...at any event, it's always good practice to explicitly specify the columns so maybe you could change your query to:

    "insert into xxx(col1, col2)

    select col1, col2 from yyy"







    **ASCII stupid question, get a stupid ANSI !!!**

  • Thank you so much. I got it.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply