[sqlite] SQLITE Binding Issue when using [] brackets

2012-04-02 Thread ap

http://sqlite.org/c3ref/bind_blob.html

Brackets are recommended for attribute names in some cases, it seems the
binding for :VVV does not permit :[VVV]. Is this the case?



I prefer the dictionary binding if possible. Normally no issues, however
when I introduce brackets there may be an issue. Is this the appropriate
syntax?  ([c1],[c2]) VALUES ( :[c1], :[c2] )

>>> recdct
{'[c1]': 1, '[c2]': 2}

>>> cur.execute("""INSERT INTO merge ([c1],[c2]) VALUES ( :[c1], :[c2] 
>>> )""",recdct)
Traceback (most recent call last):
  File "", line 1, in 
cur.execute("""INSERT INTO merge ([c1],[c2]) VALUES ( :[c1], :
[c2] )""",recdct)
OperationalError: unrecognized token: ":"
>>>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] ATTACH DATABASE .tables .schema ?

2011-06-13 Thread ap
When I attach additional DB's with ATTACH DATABASE how can I view the schema
or tables in the (non main) databases?

 

ATTACH DATABASE 'C:\temp\test.db' AS T

.schema  T

.tables T

 

Produce no results.

 

Thanks.

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users