[sqlite] Appending Text to a Column

2009-04-14 Thread centipede moto

I am trying to append text to a field within my database - sothat if a user has 
stored 'search, tools' into the Tags column of tblEntry, they can add more tags 
later like:

update tblEntry set Tags = Tags + ' new text' where RowID = 13

But whenever I try to do this I end up with 0 in the column. I've done searches 
and found discussions on

concat(..) or append(..)

but when I try to use these sqlite doesn't recognize them. How do I go about 
adding a value to the end of an existing value? Do I need to retrieve it and 
append it in my Java code as opposed to in the sql statement?

Thanks!

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] C++ Samples

2009-04-03 Thread centipede moto

I am new to c++ (I know php, c# etc), and thanks to this list I've gotten 
sqlite3 to open a db connection without failing to find its libraries. But now 
that I have an open db connection I am lost, I can work my way through the c++ 
itself but I'm having a hard time finding c++ sqlite3 samples, demonstrating 
basic querying and updating, table creation etc. I've seen straight sqlite3 
samples but haven't really found any noobie c++ samples / tutorials for 
sqlite3. Are there any great resources out their for c++ & sqlite3 greenhorns?

Thank you SO much!!

_
Rediscover Hotmail®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread centipede moto

> >#include 
> >#include 
> >#include 
> >#include 
> >#include 
> >
> >int main()
> >{
> >// create the database
> >sqlite3 *db;
> >int rc;
> >
> >rc = sqlite3_open("cmx.db", );
> >}
> 
> This code will not create a database file, because there is
> no schema to store.
> You have to create at least one table in the database to
> convince sqlite it's worth to create it.


This code is just BAREBONES code that will produce the error I'm getting.

> 
> >What folders should I be looking in to verify that 
> >sqlite3 is where it needs to be on my system?
> 
> Try:
> 
> find / -name '*sqlite*' -ls | more
> 
> It will take quite a while, but if it's your personal system
> it won't hurt anybody.


it is my personal machine - I'll give that a try. I've searched for other 
standard c++ header files - I'll try this search see what comes up.


thanks!

_
Rediscover Hotmail®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread centipede moto

I keep getting:

undefined reference to `sqlite3_open'

Errors. I have seen forum posts etc on this but none of the suggestions are 
helping. I've tried including the sqlite3.c file in my compile but I get tons 
of errors and it won't build. I've tried adding -lsqlite3 to my compile code, 
then I get:

/usr/bin/ld: cannot find -lsqlite3

I am running Ubuntu, I've installed sqlite3 through apt-get and my compile code 
looks like this:

g++ -Wall cmxmc.cpp -lsqlite3 -o cmxmc

Here is my app code:

#include 
#include 
#include 
#include 
#include 

int main()
{
// create the database
sqlite3 *db;
int rc;

rc = sqlite3_open("cmx.db", );
}


What folders should I be looking in to verify that sqlite3 is where it needs to 
be on my system?

Thanks!

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users