views:

191

answers:

1

I have a situation where a simple query against a table is returning incorrect values in Flex, but not in other GUI front-ends to SQLite.

select title from ttl where ttl.ttl = 140 // ttl is also the column name of the PK column

is returning the title that belongs to the row whose PK = 1400.

ttl.ttl is defined as int datatype.

Again, the problem manifests itself only in Flex, not in other GUI front-ends to SQLite, which are returning the correct title value.

I'd like to know as much low-level info about this table as possible, to help troubleshoot the problem. How can I query the internals?

A: 

I am definitly not a guru ,but hopeful can provide some useful information.

a. sqlite command line tools

If you are running the sqlite3 command-line access program you can type ".tables" to get a list of all tables. Or you can type ".schema" to see the complete database schema including all tables and indices.

b. By code

SELECT name FROM sqlite_master
WHERE type='table'
ORDER BY name;

see Here.


EDIT:

After reading your post on Adobe forum, I think your problem is here:

You should declare your ttlid AS INTEGER PRIMARY KEY but NOT INT PRIMARY KEY.

By delcaring ttlid AS INTEGER PRIMARY KEY , it will become an alias of rowid which is autogeneratedrimary key.

See Here

.

pierr
Thanks for the reply. I've identified the basic problem (Adobe Flex appears to be ignoring my integer PK and creating its own!) My postings on the Adobe forums are not receiving any reply from Adobe so far at least.http://forums.adobe.com/thread/508060?tstart=0
Tim
@Tim. See my edited answer.
pierr