sshrum Posted February 20, 2009 Share Posted February 20, 2009 (edited) I'm using the _SQLite UDFs and I have a database created with a empty table defined. Here is my query code: $iResult = _SQLite_GetTable2d (-1, $sSQL, $aResult, $iRows, $iCols) When I run a query on an 1 record table I get back $iResult = 0 $iRows = 1 $iCols = 29 When I run the same query on a empty table I get $iResult = 0 $iRows = 0 $iCols = 0 I'm getting back a completely empty $aResult. I was expecting Rows = 0 and Cols = 29 (containing the field names). How do you extract field names from an empty table? Is this a bug or the expected reaction (I'm voting bug). EDIT: I played with the sqlite.au3 file....looks like SQLite is returning back 0 columns so it doesn't look like a issue specifically with the UDF. TIA Edited February 20, 2009 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
sshrum Posted February 20, 2009 Author Share Posted February 20, 2009 I figured it out...(took me about 2 hours to find this) :-p $sSql = "pragma table_info('table_name_here')" This return a array with the table info. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now