Re: [sqlite] how to check the file is a sqlite database file?

2005-09-05 Thread Kurt Welgehausen
Read the first 31 bytes of the file (or the first 15 bytes
in V3).

Regards


[sqlite] how to check the file is a sqlite database file?

2005-09-05 Thread YOGESH
Hello All,

Is there any way to know whether a certain file is sqlite database file or not?

I am using sqlite 2.8.16.

My requirement is , I give user an option to select a file as a sqlite database 
file, so if user makes a mistake in selecting a proper sqlite database file,I 
want to prevent the further processing and prompt the user to select correct 
file.

(I don't want to give any extension to the database file.)

Is there any sqlite api /code snippet which tells me whether the file is of 
sqlite database type or not?

Thanking you in advance..

Regards,
Yogesh Joshi