"Abshagen, Martin RD-AS41"
<[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> I wrote the following simple test and wonder why
> sqlite_bind_parameter_count() returns the value 2 (as expected) while
> the subsequent four sqlite_bind_parameter_*() functions all return 0.

> char sSqlPrepareWrite[] = "INSERT INTO Table0 VALUES (?, ?)";
>
>    ret = sqlite3_prepare_v2( hDb, sSqlPrepareWrite, -1, &stmt, 0 );
>    ret = sqlite3_bind_parameter_count( stmt );
>    ret = sqlite3_bind_parameter_index( stmt, "sKey" );
>    ret = sqlite3_bind_parameter_index( stmt, "sVal" );
>    p = sqlite3_bind_parameter_name( stmt, 1 );
>    p = sqlite3_bind_parameter_name( stmt, 2 );

Both parameters in that statement are anonymous. For more details, see

http://sqlite.org/c3ref/bind_parameter_name.html

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to