[EMAIL PROTECTED] wrote:
Hi (...at the first time... ;-)

My App (up to 1500 Users, up to 15 Million Records in some tables in a SQL-Server-DB) offers as a specially feature Data-Export. The Export-Functionally is one of the most-used feature by Users. Exports are controlled and done by a Report, controlled and done by a Tableview and last by a feature I named “query-container”. This query-container can connect to a SQL-Server-DB, to a Access-MDB, to Schema-Ini-guided Text-Files and to a SQLite-DB. Here can the user perform user-defined sql-select-queries, which result first will be displayed in a table, optionally followed by the export to one or more files (more files = separate files if select the query blob-colums (as bitmaps).

The exported Data goes (rarely) to a Oracle-DB, often to CSV-Textfiles and a Excel-Sheet, to a portable Access-MDB on Laptops and now (I want) to a Sqlite-DB to offer the Data displayed by a Browser on a Pocket-PC (Windows-
Mobile (Win CE)).
If the user performs a user-defined Query I don’t know, which colums he select and which Type the columns are - while ever it’s a __user-defined__ query such as “select fieldone as name from customer ….” and so on.

The query-container creates a SQLite-DB and export Data with correct type. But the Browser on Pocket-PC never knows, what the User has done. And now display a Bitmap in a Blob-Type- Column in a Formview-Text-Control as Text, while sqlite3_column_type returns SQLITE_TEXT for a Blob-Type.

How can I eliminate this problem… ?... I think, to know the correct columntype is fundamental, significant…

Can anyone help me?

Best Greetings from Germany
Anne


Anne,

We have a similar function to yours and use XML as the transfer medium because of its extreme generality. The column names are returned by the Sqlite API as the queries are executed and are then used as XML entities. All data are stored in text format as required by XML.

You could use CSV to go to Excel, SQL to Oracle etc. As for type you can place whatever type you choose into your transfer data stream, but the formats you would generally use would all require the data to be transformed into TEXT. Sqlite returns the actual data type to make that possible. You can make whatever transformation is needed by your destination using atoi, atof and sprintf at the destination.

If you don't want to use the Sqlite API then you have probably chosen the wrong software tool. Sqlite is aimed at embedded systems where it is linked into applications, not as a replacement for enterprise SQL servers.
JS

Reply via email to