The following code reports the wrong column type in the SQLite Database. The DatabaseColumnType() always returns 0 (#PB_Database_StaticCursor). I am using PB 5.73 64bit.
Code: Select all
UseSQLiteDatabase()
If CreateFile(0,"myTest.sqlite")
CloseFile(0)
EndIf
If OpenDatabase(0,"myTest.sqlite","","",#PB_Database_SQLite)
If DatabaseUpdate(0,"create table if not exists mytable (field1 int not null,field2 real not null,test3 text not null);")
If DatabaseQuery(0,"pragma table_info('mytable')")
While NextDatabaseRow(0)
For ln = 0 To DatabaseColumns(0) - 1
Select DatabaseColumnType(0,ln)
Case #PB_Database_String
Debug DatabaseColumnName(0,ln)+" String"
Case #PB_Database_Long
Debug DatabaseColumnName(0,ln)+" Long"
Case #PB_Database_Double
Debug DatabaseColumnName(0,ln)+" Double"
Case #PB_Database_Quad
Debug DatabaseColumnName(0,ln)+" Quad"
Case #PB_Database_Float
Debug DatabaseColumnName(0,ln)+" Float"
Default
Debug DatabaseColumnName(0,ln)+" "+Str(DatabaseColumnType(0,ln))
EndSelect
Next
Wend
EndIf
EndIf
FinishDatabaseQuery(0)
CloseDatabase(0)
EndIf