Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13975
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: Mon Apr 29 04:28:31 CEST 2024

Total time taken to generate the page: 0.02012 seconds