And here is the log from the console: SQLite version 3.7.14 2012-09-03 15:42:36 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> INSERT INTO playersdrafted VALUES( 125, 1, ( SELECT ownerid FROM owners WHERE ownername = "Team 1" AND id = 1 ), 38, 1, "OF" ); sqlite> SELECT * FROM playersdrafted; 125|1|53|38.0|1|OF
I can give a remote access to solve this mistery... Thank you. On Fri, Apr 26, 2013 at 12:31 AM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, ALL, > > On Thu, Apr 25, 2013 at 2:41 PM, Random Coder <random.co...@gmail.com>wrote: > >> On Tue, Apr 23, 2013 at 8:47 PM, Igor Korot <ikoro...@gmail.com> wrote: >> >> > query = wxString::Format(...); >> > if( ( result = sqlite3_prepare_v2( m_handle, query, -1, &stmt, 0 ) ) != >> > SQLITE_OK ) >> > >> >> It's been a while since I've worked with wxWidgets, but when I did, >> wxString didn't support an implicit conversion like you're using here. >> >> You need to do something like this for your sqlite_prepare_v2 call: >> >> sqlite3_prepare_v2(m_handle, (const char*)query.mb_str(wxConvUTF8), -1, >> &stmt, 0); >> >> Though, I suppose if I'm right, this should have failed in some other way >> much sooner. >> > > Here is the table description: > > sqlite> .dump playersdrafted > PRAGMA foreign_keys=OFF; > BEGIN TRANSACTION; > CREATE TABLE playersdrafted(playerid integer, id ineteger, ownerid > integer, draftprice double, draftorder integer, draftposition char(2), > foreign key(playerid) references players(playerid),foreign key(id) > references leagues(id), foreign key (ownerid) references owners(ownerid)); > CREATE INDEX id_playerid ON playersdrafted(playerid,id); > COMMIT; > > All primary keys are exist by the time the INSERT INTO.. happens. > > I even tried to do with sqlite3_exec(), but it is still failing.... > > Any idea? > > Thank you. > >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users