folks, I have the following db file set up:
> sqlite> .dump > BEGIN TRANSACTION; > CREATE TABLE test1(i INTEGER, a INTEGER, b INTEGER, c INTEGER, d > INTEGER); > INSERT INTO "test1" VALUES(0,1,2,3,4); > INSERT INTO "test1" VALUES(1,10,20,30,40); > INSERT INTO "test1" VALUES(2,100,200,300,400); > INSERT INTO "test1" VALUES(3,1000,2000,3000,4000); > INSERT INTO "test1" VALUES(4,10000,20000,30000,40000); > INSERT INTO "test1" VALUES(5,100000,200000,300000,400000); > CREATE TABLE test1a(i INTEGER, a INTEGER, b INTEGER); > INSERT INTO "test1a" VALUES(0,100000,200000); > INSERT INTO "test1a" VALUES(1,100001,200001); > CREATE TABLE test1b(i INTEGER, c INTEGER, d INTEGER); > INSERT INTO "test1b" VALUES(0,300000,400000); > CREATE UNIQUE INDEX id ON test1b (d ASC); > CREATE UNIQUE INDEX ic ON test1b (c ASC); > COMMIT; I issue the following command and I get the expected error message. > sqlite> INSERT INTO test1b SELECT i, c, d FROM test1 WHERE i = 2; > sqlite> INSERT INTO test1b SELECT i, c, d FROM test1 WHERE i = 2; > SQL error: column c is not unique However, if I run this same insert via a prepared stmt in C code, sqlite3_errmsg() returns only "constraint failed". Why am I not getting the same error message that is being returned in the console client? I looked at the source code to sqlite3_exec. It calls sqlite3_errmsg to gets its error message. I should be getting the same message. -James _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users