You're trying identifier replacement, not literal replacement. It's
not allowed. You have to write table name without binding.

Pavel

On Fri, Jun 19, 2009 at 9:58 AM, Shaun Seckman
(Firaxis)<[email protected]> wrote:
> I'm trying to add some literal replacements in my prepared SQL statement
> but I'm currently getting a SQL syntax error.
>
> Here's a snippit of what I'm trying to do:
>
>
>
> ...
>
> sqlite3_stmt* stmt;
>
> sqlite3_prepare_v2(db, "Select * from ?", -1, &stmt, NULL);   <-- near
> "?": syntax error
>
> sqlite3_bind_text(stmt, 1, tableName, -1, SQLITE_TRANSIENT);
>
> ...
>
>
>
> Any idea what I'm doing wrong?
>
>
>
> -Shaun
>
>
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to