On Tue, Feb 3, 2009 at 12:04 AM, Oleg Broytmann <phd@...> wrote:
> On Mon, Feb 02, 2009 at 10:46:42PM +0100, Stef Mientki wrote:
> > now I think there's a slash too much :-(
> > Now I wonder, is SQLObject suited for MS-Windows ?
> My company sells commercial programs for w32; some of these programs use
> SQLObject pretty heavily. On the server side we use SQLite for small
> and PostgreSQL for bigger ones.
> Well, we use sqlite:///path/to/data.base syntax with ':' replaced by
> '|': sqlite:///C|program/data.db. This is how we do it:
> cwd = os.getcwd()
> cwd_uri = cwd.replace(os.sep, '/')
> if os.name == 'nt':
> cwd_uri = '/' + cwd_uri.replace(':', '|')
This is absolutely weird, I've never seen this in my whole live !
Must be a Linux trick ;-)
> > ValueError: The table test__create2 ws not found in the database. Load
> > failed
> > Now it's creating an extra underscore ???
> No idea. I am sure it is not an SQLObject's error.
As I've nowhere typed 2 underscores in my 5 lines of code,
and I only use SQLObject,
despite I don't have any understanding of SQLObject,
I definitely say it's a SQLObject bug !!
If on the error line, I explictly fill in the correct tablename (with just 1
the program runs a bit further, and now stops here:
# This isn't strictly true, since we *could* use backquotes or
# " or something (database-specific) around column names, but
# why would anyone *want* to use a name like that?
# @@: I suppose we could actually add backquotes to the
# dbName if we needed to...
if not forceDBName:
assert sqlbuilder.sqlIdentifier(name), 'Name must be SQL-safe
(letters, numbers, underscores): %s (or use forceDBName=True)' \
assert name != 'id', 'The column name "id" is reserved for SQLObject
use (and is implicitly created).'
assert name, "You must provide a name for all columns"
There seems to have been more problems with table names and columns names,
but the above states clear that underscores are allowed.
The error complains about invalid column names,
so apparently it has read the table information,
and the table names are so simple 'Field1', 'Field2' , etc
Or I'm doing something completely wrong,
or I do things different from other users ( e.g. starting with already
or no-one has really tested SQLObject with sqlite3.
Any other possibilities ? ;-)
> Oleg Broytmann http://phd.pp.ru/ phd@...
> Programmers don't die, they just GOSUB without RETURN.
> Create and Deploy Rich Internet Apps outside the browser with
> software. With Adobe AIR, Ajax developers can use existing skills and code
> build responsive, highly engaging applications that combine the power of
> resources and data with the reach of the web. Download the Adobe AIR SDK
> Ajax docs to start building applications today-
> sqlobject-discuss mailing list