SQLExecDirect Not throwing error if a statement in

  • Hi all,

    I am facing one Problem with SQLExecDirect call.

    Suppose consider the scenario the table "TableOne" has two columns [Key] int not null, [Value] int allow null.

    In the SQLExecDirect Call I am passing the following statements as a single string.

    insert into TableOne (key,value) values (1, 1000)

    insert into TableOne (value) values (2000)

    Since the Second statement (i.e insert into TableOne (value) values (2000) ) won't work because the table "TableOne" won't allow Null for column I am expecting a error from SQLExecDirect.

    But error is not coming, SQLExecDirect is returning SQL_SUCCESS.

    I want to capture the error for the above scenario.

    Help in this regard.

    Thanks in advance.

    Karthi

  • Strange indeed. Might want to try the newsgroups on this one.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

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

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