U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Sqlite Column Types
Sqlite Column Types [message #1487] Mon, 06 March 2006 15:16 Go to next message
abarilla is currently offline  abarilla
Messages: 9
Registered: March 2006
Promising Member
I changed some code in my copy of the Sqlite3upp.cpp file to correctly assign a column type for use in the the GetColumnInfo() function.

In the procedure:
Vector<SqlColumnInfo> Sqlite3Session::EnumColumns(String database, String table)


Replace:
info.type = STRING_V;


With this:
switch (sqlite3_column_type(s, i)) {
    case 1:
        info.type = INT_V;
        break;
    case 2:
        info.type = DOUBLE_V;
        break;
    default:
        info.type = STRING_V;
}


This sets blobs to STRING_V still because I don't see a blob type constant in upp.
Re: Sqlite Column Types [message #1488 is a reply to message #1487] Mon, 06 March 2006 16:13 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Thanks.

Blob is String, that is OK.

Mirek
Previous Topic: Sqlite3 sample in linux [SOLVED]
Next Topic: Sqlite Rows Processed
Goto Forum:
  


Current Time: Tue Apr 28 14:14:53 GMT+2 2026

Total time taken to generate the page: 0.00457 seconds