How can I judge whether a file is a database file? Is there a function that I
can use for this purpose?
Help!
Hope for you reply.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 14 Aug 2012, at 2:57am, daedae11 daeda...@126.com wrote:
How can I judge whether a file is a database file? Is there a function that I
can use for this purpose?
You can use the SQLite library call to open it and see whether you get an error
back. But it might be better to open the file
In linux I use the command 'file yourfilenamehere' and I get as an
answer something like 'yourfilenamehere: SQLite 3.x database' if it
is an Sqlite3 database.
Regards,
Luis
On Tue, Aug 14, 2012 at 09:57:33AM +0800, daedae11 wrote:
How can I judge whether a file is a database file? Is there a
Thank you. I got it. And I have another question. Does function sqlite3_exec
support UTF-16?
At 2012-08-14 10:01:13,Simon Slavin slav...@bigfraud.org wrote:
On 14 Aug 2012, at 2:57am, daedae11 daeda...@126.com wrote:
How can I judge whether a file is a database file? Is there a function
On 14 Aug 2012, at 3:05am, daedae11 daeda...@126.com wrote:
Thank you. I got it. And I have another question. Does function sqlite3_exec
support UTF-16?
No. sqlite3_exec() is a wrapper around sqlite3_prepare_v2(), and
sqlite3_prepare_v2() expects UTF-8. For UTF-16 you should be using
If I use the group of:
sqlite3_prepare16_v2()
sqlite3_step()
andsqlite3_finalize()
how can I get the names of a table's columns from a SELECT sql sentence?
At 2012-08-14 10:11:31,Simon Slavin slav...@bigfraud.org wrote:
On 14 Aug 2012, at 3:05am, daedae11 daeda...@126.com wrote:
Thank you.
daedae11 daeda...@126.com wrote:
If I use the group of:
sqlite3_prepare16_v2()
sqlite3_step()
andsqlite3_finalize()
how can I get the names of a table's columns from a SELECT sql sentence?
sqlite3_column_name[16]
--
Igor Tandetnik
___
On 14 Aug 2012, at 4:14am, daedae11 daeda...@126.com wrote:
If I use the group of:
sqlite3_prepare16_v2()
sqlite3_step()
andsqlite3_finalize()
how can I get the names of a table's columns from a SELECT sql sentence?
To get the names of columns of a table, use the SQL command
PRAGMA
Thank you. And I found these functions:
const char *sqlite3_column_database_name(sqlite3_stmt*,int);
const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
const char *sqlite3_column_table_name(sqlite3_stmt*,int);
const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
const char