|
|
Home » U++ Library support » U++ SQL » sqlite3 plugin documentation
sqlite3 plugin documentation [message #3970] |
Tue, 11 July 2006 22:42 |
Ordog
Messages: 13 Registered: July 2006
|
Promising Member |
|
|
hello, id love to read about all those usefull things you can do with that plugin.
My planned task is as follows:
id like to read in a .db file created by another sqlite db (what im coding is a external module for that project.).
I tried to get bihind the usage by looking at the example over and over, tweaking here and there but without sucess(my bad).
So before i rush into try n error or try to get behind it reading the code behind the plugin (which i am going to do now) im asking here for a solution covering all to enough odds that might hit me.
Thanks in advance.
edit: try n error luck
now i have to dig into the syntax for reading stuff from it again the only help is assist++ first question is regarding sql.fetch(Fields)
how do i throw a field in there? sqlid style? would result in ambigius overloaded function call because of string is not within scope hm?
[Updated on: Wed, 12 July 2006 05:35] Report message to a moderator
|
|
|
|
|
|
Re: sqlite3 plugin documentation [message #3994 is a reply to message #3974] |
Thu, 13 July 2006 20:48 |
Ordog
Messages: 13 Registered: July 2006
|
Promising Member |
|
|
When i comment that Assertion out, table_list.GetCount() returns 0 as expected when theres no current_stmt (its 0 or NULL). current_smtm_string is set like it should though ("select tbl_name from sqlite_master where Type='table'").
If thats a bug in the plugin it would have occured to more people i guess so could somebody explain to me what i am doing wrong there?
I managed to get the SQlite3 reference example running but the only thing thats different is in the simple.h
#define SCHEMADIALECT <plugin/Sqlite3/Sqlite3Schema.h>
#define MODEL <SQL_Sqlite3/simple.sch>
#include "Sql/sch_header.h"
and in simple.cpp
#include <Sql/sch_source.h>
those are afaik only used to create the .db file so even using those isnt helping me 8/ can somebody tell me when current_stmt is NULL within a fetch() ? there must be a pretty simple reason...
i have attached the .db file im working with, apparently it has no tables when i use it with the sqlite example. Might be related to the MODEL define which isnt matching our build, which leads me to my next question:
do i need to define a MODEL when im just reading a db file?
[Updated on: Thu, 13 July 2006 21:23] Report message to a moderator
|
|
|
|
|
|
|
Re: sqlite3 plugin documentation [message #4073 is a reply to message #3970] |
Wed, 19 July 2006 14:10 |
Ordog
Messages: 13 Registered: July 2006
|
Promising Member |
|
|
uhm yes it starts, but even without it it wont fetch anything from the database.
I tried to use an SQLWrapper instead of the plugin thats why the lib was still there (forgot to remove it) when i remade the plugin using implmentation to post here.
[Updated on: Wed, 19 July 2006 14:15] Report message to a moderator
|
|
|
|
|
|
|
|
Re: sqlite3 plugin documentation [message #4099 is a reply to message #4097] |
Thu, 20 July 2006 00:58 |
|
luzr wrote on Wed, 19 July 2006 17:55 | Meanwhile, in other thread, sqlite seems to work fine...
|
The database I am using was actually created by U++'s SqLite package. While I was testing it out, at one point I was using a SqLite db created elsewhere. I could not get it to work (may be due to version incompatability, may be something else) so I moved on to something different. I eventually ended up using the example program to create my tables in a new database.
|
|
|
|
Re: sqlite3 plugin documentation [message #4142 is a reply to message #4099] |
Tue, 25 July 2006 10:34 |
aroman
Messages: 18 Registered: November 2005
|
Promising Member |
|
|
rbmatt wrote on Wed, 19 July 2006 15:58 |
The database I am using was actually created by U++'s SqLite package. While I was testing it out, at one point I was using a SqLite db created elsewhere. I could not get it to work (may be due to version incompatability, may be something else) so I moved on to something different. I eventually ended up using the example program to create my tables in a new database.
|
It may be a versioning problem, but you should also be aware that there are two main versions of sqlite. Sqlite2 and Sqlite3, and the API and databases are not compatible between them. The UPP plugin code is Sqlite3, but an old version. If you want the newest version, see my recent post on updating the sqlite3 plugin.
EDIT: I downloaded your file and tested it out. The old sqlite plugin version was 3.2.7, I believe, which did not read your db file. The new version is 3.3.6 and does read your db file. So upgrade to the newer version and you should be fine.
- Augusto
[Updated on: Tue, 25 July 2006 10:40] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jun 08 10:39:50 CEST 2024
Total time taken to generate the page: 0.01786 seconds
|
|
|