Re: [sqlite] PRAGMA doesn't support parameter binds?
As an alternative, you can use the WinDgb tool from MSFT. It is not the nicest debugger in the world, but understands all the MSFT PDB formats. It is free for download from the MSDN site. While it is a bit slow with large source files like the SQLite amalgamation, it does handle them fine. m...@mwlabs.de wrote: > How to debug the SQLite amalgation with Visual Studio 2008. > > To get the debugger going you need to strip out the comments and empty lines > from the sqlite.c source file. > This can be done easily with two regular expressions for search and replace: > > First replace (Ctrl+H) > > (/\*(\n|.)@\*/)|(//.*$) > > With to get rid of comments, then replace > > ^$\n > > With to get rid of the empty lines. > > This brings down the sqlite.c to less than 60,000 lines, and the debugger > will work again. > > > 'Hope this helps. > > -- Mario > > > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Vinnie > Sent: Monday, April 13, 2009 12:53 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] PRAGMA doesn't support parameter binds? > > > Sorry for only posting when I have a problem...but... > > I'm doing > > PRAGMA user_version=?; > > And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). Of > course I can't step into the sqlite3.c code because the Visual Studio 2008 > debugger gets hopelessly confused when confronted with a file whose line > number representations exceed the capacity of an unsigned 16 bit integer. > > ___ > 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
Re: [sqlite] PRAGMA doesn't support parameter binds?
How to debug the SQLite amalgation with Visual Studio 2008. To get the debugger going you need to strip out the comments and empty lines from the sqlite.c source file. This can be done easily with two regular expressions for search and replace: First replace (Ctrl+H) (/\*(\n|.)@\*/)|(//.*$) With to get rid of comments, then replace ^$\n With to get rid of the empty lines. This brings down the sqlite.c to less than 60,000 lines, and the debugger will work again. 'Hope this helps. -- Mario -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Vinnie Sent: Monday, April 13, 2009 12:53 PM To: sqlite-users@sqlite.org Subject: [sqlite] PRAGMA doesn't support parameter binds? Sorry for only posting when I have a problem...but... I'm doing PRAGMA user_version=?; And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). Of course I can't step into the sqlite3.c code because the Visual Studio 2008 debugger gets hopelessly confused when confronted with a file whose line number representations exceed the capacity of an unsigned 16 bit integer. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA doesn't support parameter binds?
On Apr 13, 2009, at 5:52 PM, Vinnie wrote: > > Sorry for only posting when I have a problem...but... > > I'm doing > > PRAGMA user_version=?; > > And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). > Of course I can't step into the sqlite3.c code because the Visual > Studio 2008 debugger gets hopelessly confused when confronted with a > file whose line number representations exceed the capacity of an > unsigned 16 bit integer. > > So I check the syntax diagram and a pragma-value only has { signed- > number, name, string-literal } as choices. Whereas an "expression" > in the syntax diagram (used in a SELECT statement for example) has > { ..., bind-parameter, ... }. > > I would prefer to use parameter binds to keep the number of > functions in my wrapper down (and eliminate the need for a printf- > style API to sqlite3) so can anyone confirm or deny that parameter > binds do in fact not work for PRAGMA statements? Bound parameters do not work with pragma statements. Dan. > > > Thanks! > > ___ > 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
[sqlite] PRAGMA doesn't support parameter binds?
Sorry for only posting when I have a problem...but... I'm doing PRAGMA user_version=?; And getting result code SQLITE_ERROR (1) from sqlite3_prepare_v2(). Of course I can't step into the sqlite3.c code because the Visual Studio 2008 debugger gets hopelessly confused when confronted with a file whose line number representations exceed the capacity of an unsigned 16 bit integer. So I check the syntax diagram and a pragma-value only has { signed-number, name, string-literal } as choices. Whereas an "expression" in the syntax diagram (used in a SELECT statement for example) has { ..., bind-parameter, ... }. I would prefer to use parameter binds to keep the number of functions in my wrapper down (and eliminate the need for a printf-style API to sqlite3) so can anyone confirm or deny that parameter binds do in fact not work for PRAGMA statements? Thanks! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users