none
Related to ADO library msado26.tlb update statement RRS feed

  • Question

  • I am updating  a table through Ado library msado26.tlb .I need to triggered the update with primary column only but it get the column which are changed and changed columns as included in set fields and in where condition also.If it possible remove those columns in where condition and i need that update statement should triggerd with id column only because the id column is mentioned as primary key in the table
    sample of the update statement triggered while updating 
    exec sp_executesql N'UPDATE "tablename ".."table1 " SET "c"=@P1,"co"=@P2,"da"=@P3,"la"=@P4,"en"=@P5,"ef"=@P6 WHERE "id"=@P7 AND "c" IS NULL AND "co" IS NULL AND "da"=@P8 AND "la" IS NULL AND "en"=@P9 AND "ef"=@P10',N'@P1 datetime,@P2 datetime,@P3 datetime,@P4 int,@P5 datetime,@P6 smallint,@P7 uniqueidentifier,@P8 datetime,@P9 datetime,@P10 smallint','2017-06-27 12:25:00','2017-06-27 06:55:00','2017-06-27 12:25:00',1,'2017-06-27 06:55:00',4,'A7F90D59-8C5A-4979-9F6C-371A4A10000A','2017-06-27 12:24:32','2017-06-27 06:54:00',3 
    • Moved by Bill_Stewart Friday, August 4, 2017 9:39 PM Unanswerable drive-by question
    Friday, June 30, 2017 4:45 AM

All replies

  • I am updating  a table through Ado library msado26.tlb .I need to triggered the update with primary column only but it get the column which are changed and changed columns as included in set fields and in where condition also.If it possible remove those columns in where condition and i need that update statement should triggerd with id column only because the id column is mentioned as primary key in the table
    sample of the update statement triggered while updating 
    exec sp_executesql N'UPDATE "tablename ".."table1 " SET "c"=@P1,"co"=@P2,"da"=@P3,"la"=@P4,"en"=@P5,"ef"=@P6 WHERE "id"=@P7 AND "c" IS NULL AND "co" IS NULL AND "da"=@P8 AND "la" IS NULL AND "en"=@P9 AND "ef"=@P10',N'@P1 datetime,@P2 datetime,@P3 datetime,@P4 int,@P5 datetime,@P6 smallint,@P7 uniqueidentifier,@P8 datetime,@P9 datetime,@P10 smallint','2017-06-27 12:25:00','2017-06-27 06:55:00','2017-06-27 12:25:00',1,'2017-06-27 06:55:00',4,'A7F90D59-8C5A-4979-9F6C-371A4A10000A','2017-06-27 12:24:32','2017-06-27 06:54:00',3 
    • Merged by Bill_Stewart Friday, June 30, 2017 1:04 PM Duplicate
    Friday, June 30, 2017 4:45 AM
  • You need to post this in the SQLServer forum.  This is not a SQL forum.


    \_(ツ)_/

    Friday, June 30, 2017 5:17 AM