No, it's impossible. The main idea of prepared statements and binding
is that the statement has to be compiled only once into the virtual
machine code that is then executed when you run sqlite3_step. This
works only as long as the compiled form isn't affected by the bound
data. Binding column names, ASC/DESC, etc. would change the meaning of
the query and the compiled code wouldn't be reusable (eg. using ASC or
DESC could result in use of different index and so on).

Best regards,
Filip NAvara

On Sat, Oct 25, 2008 at 6:54 PM, mfujisaw <[EMAIL PROTECTED]> wrote:
> Hi, guys,
>
> I am developping allication with SQLite3 functions.
> When I will use sqlite3_bind and wild card for some SQL, it wouldn't work 
> well.
>
> 1. SELECT ? FROM records WHERE age=30
> I want to set some table name into ? every time.
>
> 2. SELECT * FROM records WHERE age=30 ORDER BY ?
> I want to set some order target into ? every time.
>
> 3. SELECT * FROM records WHERE age=30 ORDER BY weight ?
> I want to select ASC/DESC into ? every time.
>
> In every those 3 cases, I cant get correct results.
> Does any one help me?
> Can I make these parameter wildcard?
>
>
> 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

Reply via email to