[sqlite] sqlite3_free_table question

2006-06-29 Thread Richard Boyd
apologies for that... Thanks again, Richard. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 28 June 2006 21:46 To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_free_table question Richard Boyd wrote: > Basically I have a structure I use to hold data resu

RE: [sqlite] sqlite3_free_table question

2006-06-28 Thread Richard Boyd
Dennis, Ok thanks for the quick response. I'll persevere with that then and get back if I still have problems. Thanks, Richard.

[sqlite] sqlite3_free_table question

2006-06-28 Thread Richard Boyd
Hi all, Firstly, forgive me for a slightly naïve question; I don’t normally code in C and I’m having problems freeing up memory. Basically I have a structure I use to hold data results: //= typedef struct { char *sqlStatement; // Either the sqlstatement to be executed or

RE: [sqlite] quotes around text in returned data?

2005-11-03 Thread Richard Boyd
Thanks all! I'll give those a go. -Richard.

RE: [sqlite] quotes around text in returned data?

2005-11-03 Thread Richard Boyd
>>Use the built-in quote() function. -- Ok I think I found it. (http://www.sqlite.org/lang_expr.html) I'm not really familiar with this method of calling a function in an expression. Is there away to have it only quote the TEXT columns and not the INTEGER columns, or does it do this anyway by

RE: [sqlite] quotes around text in returned data?

2005-11-03 Thread Richard Boyd
>>Use the built-in quote() function. -- Just what I'm after (huge sigh of relief) Is it sqlite3_quote? I had a search through the documentation and didn't come up with anything. Obviously I didn't look hard enough. I'll go back and look again. Thanks very much for the quick response and

[sqlite] quotes around text in returned data?

2005-11-03 Thread Richard Boyd
Hi, Is there anyway to get Sqlite to add 'quotes' around text strings when it is returning data from a select command? For example: I have a table called table0 which is created using CREATE TABLE table0 (col1 INTEGER, col2 TEXT, col3 INTEGER); I have a row in the table 1|this is a text

RE: [sqlite] Function to find the size returned data size from a SELECT??

2005-09-22 Thread Richard Boyd
OK Thanks for your reply. Yeah, I know that sqlite3_get_table() allocates the memory for me, but thanks for the heads up any way! I think the possibility of checking the number of rows will be sufficient for my purposes... If I don't check is there not a possibility of there not being enough

[sqlite] Function to find the size returned data size from a SELECT??

2005-09-21 Thread Richard Boyd
Hi, I was wondering if there was a way to find the size of data that will be returned before actually making the call to sqlite3_get_table which will return a pointer to a malloc'd memory location. My question is really: can I find the required memory size before the call? Thanks in advance,

RE: [sqlite] correct use of sqlite3_get_table

2005-03-03 Thread Richard Boyd
: [sqlite] correct use of sqlite3_get_table Richard Boyd wrote: > Hi all, > > I’m trying to use sqlite3_get_table() to execute SQL commands on a > database. I’ve included a code snippet below. > > The problem I’m having is that when I execute the "SELECT > MAX(time_stamp) FR

[sqlite] correct use of sqlite3_get_table

2005-03-02 Thread Richard Boyd
Hi all,   I’m trying to use sqlite3_get_table() to execute SQL commands on a database. I’ve included a code snippet below.   The problem I’m having is that when I execute the "SELECT MAX(time_stamp) FROM table32;” command using sqlite3_get_table() I only get one column and 1 row

RE: [sqlite] Best way to check for existence of a table?

2005-02-14 Thread Richard Boyd
Original Message- From: D. Richard Hipp [mailto:[EMAIL PROTECTED] Sent: 13 February 2005 23:46 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Best way to check for existence of a table? On Sun, 2005-02-13 at 22:58 +, Richard Boyd wrote: > > > I need a way to check if a

[sqlite] Best way to check for existence of a table?

2005-02-13 Thread Richard Boyd
Hi,   I need a way to check if a table exists from some C code. I wrote some code to try to select a row from a table and then checked the error result. However, the error code is always ‘1’ (which is just a general SQLITE_ERROR) if the table does not exist. Is there any way I can

[sqlite] basic sql question: Is there a way of entering multiple rows in a table?

2005-02-11 Thread Richard Boyd
Hi,   I know I can create a temporary table and insert them from that or use a for loop in C and get it to update the table one row at a time, but is there a ‘nicer’ way??    I basically have a string of text which I’ve obtained from another (remote) Sqlite database which I want to

[sqlite] Accesing database remotely

2005-01-31 Thread Richard Boyd
Hi,   I’m writing a database that will be accessed remotely over Ethernet. I had started to write a protocol that would float on top of TCP/IP but after reading some posts here it seems that it would be overkill. Is it practical to access the database file remotely and run commands on it

RE: [sqlite] joining a table to the end of another table

2005-01-31 Thread Richard Boyd
Many thanks for the replies. I knew it must be something simple!! Cheers, R. -Original Message- From: John LeSueur [mailto:[EMAIL PROTECTED] Sent: 31 January 2005 21:27 To: sqlite-users@sqlite.org Subject: Re: [sqlite] joining a table to the end of another table Richard Boyd wrote

[sqlite] joining a table to the end of another table

2005-01-31 Thread Richard Boyd
Hi,   I’m inexperienced with databases so forgive me if this is a silly question.   What I want to do is join to separate tables together into one table. This is to enable me to synchronize databases held on remote systems. I would use a master table which would have the dates of each

RE: [sqlite] synchronising two databases

2004-12-14 Thread Richard Boyd
Piskorski [mailto:[EMAIL PROTECTED] Sent: 13 December 2004 14:24 To: [EMAIL PROTECTED] Subject: Re: [sqlite] synchronising two databases On Mon, Dec 13, 2004 at 02:00:05PM -, Richard Boyd wrote: > My question is this: Is it possible for me to copy across the database file > and then

[sqlite] synchronising two databases

2004-12-13 Thread Richard Boyd
Hi all, I have an application where I need to access a database remotely (using TCP/IP). I had thought of just calling sqlite commands (possibly using RPC) and getting database data returned. However, as I will only periodically access the remote database, I need to effectively keep a copy of the

[sqlite] cross compiling for Linux running on an ARM

2004-10-12 Thread Richard Boyd
Hi, I'm trying to run sqlite on Linux running on an embedded ARM processor on a development board. I'm using Linux (running on a PC) as my development environment. What is the simplest way to approach this? Can I modify the configuration files supplied in the build to do this or should I start