Patches item #1904948, was opened at 2008-02-29 23:46
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1904948&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Vitalije Milosevic (vitalije)
Assigned to: Oleg Broytmann (phd)
Summary: sqlite URI is not handled right on windows
Initial Comment:
On Windows machine when I try to connect to some sqlite database file, I am
receiving error message that says it was not possible to create (or open)
file.
I was inspecting code and found that path which is parsed from given URI
starts with '/', and on Windows no valid path starts with '/'.
I send in attachment new version of sqliteconnection.py
with three lines which on windows platform strips unwanted '/' from the
left of path.
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2008-03-03 16:56
Message:
Logged In: YES
user_id=4799
Originator: NO
It is not possible to use relative path, and I don't want to add the
feature to SQLObject.
But it is possible to use a full path with drive letter - just use a
vertical bar as a separator instead of colon:
db_uri = "sqlite:/C|/path/to/my.db"
If that doesn't work for you - show the URI that causes problem.
----------------------------------------------------------------------
Comment By: Vitalije Milosevic (vitalije)
Date: 2008-03-03 16:47
Message:
Logged In: YES
user_id=2023531
Originator: YES
Thank you for explanation that '/' is root of the current disk. I didn't
know that so I have tried all kinds of paths that were including disk name.
Still, it seems to me that it is impossible to make connection to the file
that exists on some other disk. Neither it is possible to make connection
to the file given by its relative path.
Ok, I know it is possible to find absolute path from relative one, than
strip disk part of absolute path, but it seems too complicated.
Anyway, thank you for your response.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2008-03-03 16:05
Message:
Logged In: YES
user_id=4799
Originator: NO
What DB URI causes a problem for you?
PS. On Windows there are valid paths that start with '/' because / is the
root of the current disk.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1904948&group_id=74338
|