[Tutor] SQLite database creation bafflement
Alan Gauld
alan.gauld at btinternet.com
Mon Aug 20 12:14:17 CEST 2007
"Che M" <pine508 at hotmail.com> wrote
> don't. For example, this will create a brand new database on the
> desktop:
>
> conn = sqlite3.connect('C:\Documents and
> Settings\user\Desktop\mydatabase.db')
>
> But running *this*--only thing different is the database's
> name--gives the
> error, as shown:
>
> conn = sqlite3.connect('C:\Documents and
> Settings\user\Desktop\adatabase.db')
Could be that you are hitting the DOS naming issue.
Try making your path names raw strings or use forward slashesinstead
of backslashes. Python/SQLite may not like the \a character...
But I'm guessing.
HTH,
Alan G.
More information about the Tutor
mailing list