I use the following code to get column type, but it gives the "column type" not the "value type"? So it gives 0 (zero) for a NULL value but it is not the same thing. (zero has different meaning in my database)
a function like DatabaseFieldType() would be nice,
Any idea?
Code: Select all
While NextDatabaseRow(0)
For i=0 To DatabaseColumns(0)-1
t = ""
Select DatabaseColumnType(0,i)
Case #PB_Database_Long
t = Str(GetDatabaseLong(0,i))
Case #PB_Database_Quad
t = StrQ(GetDatabaseQuad(0,i))
Case #PB_Database_Float
t = StrF(GetDatabaseFloat(0,i),5)
Case #PB_Database_Double
t = StrD(GetDatabaseFloat(0,i),5)
Case #PB_Database_String
t = GetDatabaseString(0,i)
EndSelect
WriteString(f, t , #PB_Ascii)
Next
Wend