RE: [sqlite] Enabling SQLITE_ENABLE_MEMORY_MANAGEMENT on Visual Studio.Net

2006-07-27 Thread Hilal Shaath

Hello Brandon:
  Thanks for your replay. Can you tell me what directive you use in the 
make file in Linux to enable that.


  I am trying to reduce the memory usage of SQL. DO you have any ideas 
about how I can do that on Windows (other thank using 
SQLITE_ENABLE_MEMORY_MANAGEMENT )


 Thanks for your help and reply

Hilal




[sqlite] sqlite using whole-file (not byte-range) locking

2006-07-27 Thread Adam Megacz

I'm interested in using SQLite with AFS (the Andrew FileSystem).
Unlike NFS, AFS has solid, reliable support for *whole-file* advisory
locking across the network.

AFS does some very sophisticated caching, so an SQLite database in AFS
accessed by a single reader/writer would be very efficient.  A second
reader/writer would cause performance to degrade by breaking callbacks
quite often, but as long as whole-file locking is used, no corruption
should occur.

I think a scenario where a database is accessed mostly by a single
process but occasionally updated by other clients (for example, for
administration) would work really well.  In a lot of applications
(like the one I'm considering) this would eliminate the need for an
"administration API" implemented on the main reader/writer --
administration could be done using the sqlite3 binary directly on the
database across AFS.

I read through the locking code:

  http://www.srcdoc.com/sqlite_3.2.2/os__unix_8c-source.html#l00911

It looks like it would be possible to do the locking with whole-file
locks on three separate files (less elegant, certainly) rather than
byte range locks if one gave up support for old versions of Windows.

Does this sound like it would work?  Can anybody see any way to do it
with less than three files?  AFS offers both read-locks and
exclusive-write-locks on all platforms via fcntl().

  - a

-- 
PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380



RE: [sqlite] Enabling SQLITE_ENABLE_MEMORY_MANAGEMENT on Visual Studio.Net

2006-07-27 Thread Brannon King
You'll have to change that in the makefile before building the
"target_source" code, which means you'll need Linux or a similar build
environment on Windows. I don't think you want to do that anyway. MS's
memory handlers don't like that at all. For proof (once you get it enabled)
put this into your code and the sqlite code for debug compiles:

#define _CRTDBG_MAP_ALLOC
#include  // make sure this is the last header

// and then at the top of your main function:
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF |
_CRTDBG_CHECK_ALWAYS_DF);


> Hello There :
>Does any one know how to enable 
> SQLITE_ENABLE_MEMORY_MANAGEMENT  on visual studio.net. I 
> tried by adding this macro to the preprocessor with no luck
> 
> Thanks
> Hilal
> 
> 



[sqlite] Enabling SQLITE_ENABLE_MEMORY_MANAGEMENT on Visual Studio.Net

2006-07-27 Thread Hilal Shaath

Hello There :
  Does any one know how to enable SQLITE_ENABLE_MEMORY_MANAGEMENT  on
visual studio.net. I tried by adding this macro to the preprocessor with no
luck

Thanks
Hilal




[sqlite] Problem parsing comments from SQL?

2006-07-27 Thread Jeff Nokes
Hi,
I've run into a weird situation where SQLite seems to not like in-line comments 
depending on where they are placed.  I'm using the following:

DOS CLP 3.3.6

Best to show via an example:


If I have the following DDL/DML:
--

BEGIN TRANSACTION; -- Begin transaction including table creation and data 
population.

CREATE TABLE General_Postal_Reference (
   PK  INTEGER  PRIMARY KEY,  -- Primary Key
   Postal_Code TEXT NOT NULL,
   State   TEXT NOT NULL,
   CityTEXT NOT NULL,
   County  TEXT NOT NULL,
   Sequence_Number INTEGER  NOT NULL, -- 1=primary city for that zip 
(based on population.  counts), 2 is secondary, etc.
   USPS_Code   TEXT NOT NULL, -- P=primary city, A=acceptable 
city, N=not acceptable
   Latitude   REAL NOT NULL,
   Longitude   REAL NOT NULL,
   USPS_Type   TEXT NOT NULL, -- g=general delivery (could be 
PO Box), b=business/government private zip code,
  -- e=PO Box only, m=military only
   Last_Modified_Time  INTEGER  NOT NULL  -- Seconds since Unix epoch, 
let's us know how old each record is.
);

INSERT INTO General_Postal_Reference (Postal_Code, State, City, County, 
Sequence_Number, USPS_Code, Latitude, Longitude, USPS_Type, Last_Modified_Time)
 VALUES ("00501", "NY", "Holtsville", "Suffolk", 1, "P", 40.81518, 
-73.0455, "b", 1153966130);

COMMIT;

--

Everything works fine.  But, if I have a comment immediately after the COMMIT 
statement:

   COMMIT;  -- End transaction.

... it doesn't:


This will give the following in the DOS CLP output:

   Incomplete SQL: COMMIT;  -- End transaction.


Not sure if this is a bug, but thought I should point it out.

Thanks,
- Jeff





[sqlite] Re: Project

2006-07-27 Thread Cesar David Rodas Maldonado

If a SQLite Db is LOCKED can i exec an TRIGER?


[sqlite] invite to OSCAMP SQLite discussion in E146

2006-07-27 Thread Darren Duncan
Richard Hipp, and anyone else now at OSCON,

Sorry for the late notice, but starting at 1:30pm today and possibly 
through to 5pm (to 3:15 at least) is a discussion on SQLite in E146, the 
OSCAMP room.  You are invited to attend.

While I didn't create the session, I will be participating.

Hoping you get this in time.

We will be around probably all afternoon if you come later.  Or email a 
reply if you can suggest an alternate meeting time or when you might like 
to come.

Good day. -- Darren Duncan



[sqlite] Project

2006-07-27 Thread Cesar David Rodas Maldonado

Now i have another question! Is any way to serialize all the dates given a
preference to SELECT and  delay the insert and update.

I am building a Small Library in C & SQLite that will be under GPL , is
something like Lucene. Please help me how to give a preference to SELECT and
a delay to INSERT or update.


Thanks to all!


RE: [sqlite] User function in WHERE clause

2006-07-27 Thread Robert Simpson
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 27, 2006 8:33 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] User function in WHERE clause
>
> "param MYFUNCTION Name" is equivalent to 
> "MYFUNCTION(Name, param)" onoly if MYFUNCTION 
> is one of:
> 
> LIKE   GLOB   REGEXP   MATCH
> 
> Only LIKE and GLOB are defined by default.  MATCH is
> not in 3.3.6, but is in the source tree.
> 
> Note that you can use sqlite3_create_function() to
> replace the build-in LIKE or GLOB function to do
> whatever it is you want.  REGEXP is undefined, so you
> can define it to do whatever you need, though as you
> can probably guess, it is intended for regular
> expression matching.

Ah that explains things a bit.  I just happened to have overridden REGEXP
without realizing it was pre-defined to allow you to call it that way.  Am I
mistaken, or did you recently check-in a patch that fixes the parameters so
that 
"a REGEX b" is the same as "REGEX(a,b)" ?

Robert




Re: [sqlite] UTF8

2006-07-27 Thread Cesar David Rodas Maldonado

Thanks Daniel!

Now i have another question! Is any way to serialize all the dates given a
preference to SELECT a delay to the insert.

I am building a Small Library in C & SQLite that will be under GPL, is
something like Lucene. Please help me how to give a preference to SELECT and
a delay to INSERT or update.


Thanks to all!


Re: [sqlite] UTF8

2006-07-27 Thread Daniel van Ham Colchete
Cesar David Rodas Maldonado wrote:
> I wanted to ask how can i know if a given text is UTF8 or ISO-8859-1?
Well, there might be a way if you only want to know if the text is UTF-8
or ISO-8859-1 (it means that you already know that is one is the other).

There are some invalid UTF-8 sequences. If you have something like 0xE5
0x61, that in ISO-8859-1 means 'áa' = 'áa', you have an invalid
UTF-8 sequence and then you know that it is not an UTF-8 charset.

How do you test it? If you're using Linux you can try to convert your
string from UTF-8 to UTF-16 using glibc's iconv. If it is an ISO-8859-1
text and you are lucky enough to be an invalid UTF-8 (most likely) then
you have it!

If you are not using Linux then you should learn how unicode chars are
encoded in UTF-8 (like in http://en.wikipedia.org/wiki/UTF-8) to make
your own algorithm.

There is a very good chance it will work fine for you. Every ISO-8859-1
document with non-ASCII chars I try to open with UTF-8 editors gives me
errors.

What do you think?

Besides that, I know that there are a few probabilistic methods to
determine the charset a text is encoded. Mozilla Firefox uses them a
lot. There are many papers on this subject on the internet. Google is
your friend.

Best regards,
Daniel Colchete



Re: [sqlite] retrieving integers and long

2006-07-27 Thread Wyan

Ah!  That helps.  At least I have a hint.  Thanks for the pointer.

-- wyan

On Jul 26, 2006, at 4:07 PM, John Stanton wrote:


Wyan wrote:
I'm calling sqlite3_column_type() to get the type, and, for a  
number (20), it returns SQLITE_INTEGER.  I'm guessing this covers  
int, long,  and long long.  Is there any way to distinguish which  
one it is, so I  can know to call the right sqlite3_column_()  
function?  I've got some  higher level code over this, and I'd  
like to be able to get the type  that's actually in the database.

Thanks,
-- wyan
You can also retrieve the declared type, which (thanks to manifest  
typing) is not necessarily the same as the actual stored type.  If  
you are interfacing to another system you are very likely to need  
the declared type and sometimes perform conversions to reverse out  
what Sqlite decided to do based on the actual data.


Re: [sqlite] Please unsubscribe me from sqlite

2006-07-27 Thread Christian Smith

prabhu kumaravelu uttered:


Please unsubscribe me from sqlite



Try sending an email to this address:
  [EMAIL PROTECTED]

And stop spamming the list.








From: "Igor Tandetnik" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: "SQLite" 
Subject: [sqlite] Re: User function in WHERE clause
Date: Thu, 27 Jul 2006 10:47:35 -0400

Stan <[EMAIL PROTECTED]> wrote:

is there a way to create user function similar to LIKE?
I'd like to use my function in clause WHERE. E.g. this selection:
SELECT * FROM Table WHERE Name MYFUNCTION param
Param is integer.


Not like this, but you can create a function and use it this way:

SELECT * FROM Table WHERE MYFUNCTION(Name, param)

Igor Tandetnik


_
Fall in Love... Get married! Join FREE! 
http://www.shaadi.com/ptnr.php?ptnr=msnhottag




--
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


Re: [sqlite] User function in WHERE clause

2006-07-27 Thread drh
"Robert Simpson" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, July 27, 2006 7:48 AM
> > To: SQLite
> > Subject: [sqlite] Re: User function in WHERE clause
> > 
> > Stan <[EMAIL PROTECTED]> wrote:
> > > is there a way to create user function similar to LIKE?
> > > I'd like to use my function in clause WHERE. E.g. this selection:
> > > SELECT * FROM Table WHERE Name MYFUNCTION param
> > > Param is integer.
> > 
> > Not like this, but you can create a function and use it this way:
> > 
> > SELECT * FROM Table WHERE MYFUNCTION(Name, param)
> 
> Actually with a userdef function, 
> 
> SELECT * FROM Table WHERE MYFUNCTION(Name, param) 
> 
>  is identical to:
> 
> SELECT * FROM Table WHERE param MYFUNCTION Name
> 

"param MYFUNCTION Name" is equivalent to 
"MYFUNCTION(Name, param)" onoly if MYFUNCTION 
is one of:

LIKE   GLOB   REGEXP   MATCH

Only LIKE and GLOB are defined by default.  MATCH is
not in 3.3.6, but is in the source tree.

Note that you can use sqlite3_create_function() to
replace the build-in LIKE or GLOB function to do
whatever it is you want.  REGEXP is undefined, so you
can define it to do whatever you need, though as you
can probably guess, it is intended for regular
expression matching.

--
D. Richard Hipp   <[EMAIL PROTECTED]>



[sqlite] Re: Re: User function in WHERE clause

2006-07-27 Thread Igor Tandetnik

Robert Simpson <[EMAIL PROTECTED]>
wrote:

-Original Message-
From: Igor Tandetnik [mailto:[EMAIL PROTECTED]
Not like this, but you can create a function and use it this way:

SELECT * FROM Table WHERE MYFUNCTION(Name, param)


Actually with a userdef function,

SELECT * FROM Table WHERE MYFUNCTION(Name, param)

... is identical to:

SELECT * FROM Table WHERE param MYFUNCTION Name


Are you sure? This works:

select * from test where ifnull(field,1);

These produce syntax error

select * from test where field ifnull 1;
select * from test where 1 ifnull field;

I've just tried with a user-defined function - same result.

Igor Tandetnik 



RE: [sqlite] Please unsubscribe me from sqlite

2006-07-27 Thread Robert Simpson
Send e-mail to [EMAIL PROTECTED]  to unsubscribe

> -Original Message-
> From: prabhu kumaravelu [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 27, 2006 7:53 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Please unsubscribe me from sqlite
> 
> 
> Please unsubscribe me from sqlite
> 




RE: [sqlite] Re: User function in WHERE clause

2006-07-27 Thread Robert Simpson
> -Original Message-
> From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 27, 2006 7:48 AM
> To: SQLite
> Subject: [sqlite] Re: User function in WHERE clause
> 
> Stan <[EMAIL PROTECTED]> wrote:
> > is there a way to create user function similar to LIKE?
> > I'd like to use my function in clause WHERE. E.g. this selection:
> > SELECT * FROM Table WHERE Name MYFUNCTION param
> > Param is integer.
> 
> Not like this, but you can create a function and use it this way:
> 
> SELECT * FROM Table WHERE MYFUNCTION(Name, param)

Actually with a userdef function, 

SELECT * FROM Table WHERE MYFUNCTION(Name, param) 

... is identical to:

SELECT * FROM Table WHERE param MYFUNCTION Name

Robert




[sqlite] Please unsubscribe me from sqlite

2006-07-27 Thread prabhu kumaravelu


Please unsubscribe me from sqlite



From: mycmos <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
CC: Vivek R <[EMAIL PROTECTED]>
Subject: [sqlite] re£º [sqlite] Retriving data from SQLite
Date: Thu, 27 Jul 2006 15:31:24 +0800 (CST)


--- Vivek R <[EMAIL PROTECTED]>дµÀ:

> Hi ,
>  I am new bee to SQLite, I am using SQLite in one of
> the embedded
> applications. What I wanted to know how to retrive
> the data from table once
> the query is exected?  how to store the results of
> the query executed.
>
> Regards,
>   Vivek R
>

int sqlite_get_table(
  sqlite *db,
  const char *zSql,
  char ***pazResult,
  int *pnRow,
  int *pnColumn,
  char **pzErrMsg
)

All results of the query executed is stored in
*pazResult.







___
Mp3·è¿ñËÑ-иèÈȸè¸ßËÙÏÂ
http://music.yahoo.com.cn/?source=mail_mailbox_footer


_
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN 
Search http://server1.msn.co.in/Profile/bipashabasu.asp




[sqlite] Please unsubscribe me from sqlite

2006-07-27 Thread prabhu kumaravelu

Please unsubscribe me from sqlite




From: Peter van Dijk <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] "SQL Error: near 'Table': Syntax error"
Date: Thu, 27 Jul 2006 08:44:59 +0200


On Jul 26, 2006, at 5:33 PM, Dennis Cote wrote:


John Newby wrote:


Is there any other names I need to look out for other than the  "sqlite_" 
and
"table" that SQLite doesn't like as being a table name that anyone  knows 
of?



John,

All keywords need to be quoted to use them as identifiers. There is  a 
comprehensive list of keywords at http://www.sqlite.org/ 
lang_keywords.html


I would also suggest that you stick with the SQL standard method of  
quoting identifiers using double quotes (rather than the other  extensions 
that SQLite accepts for compatibility with other non- standard database 
systems).


Using double quotes to quote identifiers in sqlite is dangerous, as  
mistyping

a fieldname will not yield an error. Currently the only safe way to  quote
identifiers is using backticks, as in MySQL.

Cheers, Peter.


_
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN 
Search http://server1.msn.co.in/Profile/bipashabasu.asp




[sqlite] Please unsubscribe me from sqlite

2006-07-27 Thread prabhu kumaravelu

Please unsubscribe me from sqlite





From: "Igor Tandetnik" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: "SQLite" 
Subject: [sqlite] Re: User function in WHERE clause
Date: Thu, 27 Jul 2006 10:47:35 -0400

Stan <[EMAIL PROTECTED]> wrote:

is there a way to create user function similar to LIKE?
I'd like to use my function in clause WHERE. E.g. this selection:
SELECT * FROM Table WHERE Name MYFUNCTION param
Param is integer.


Not like this, but you can create a function and use it this way:

SELECT * FROM Table WHERE MYFUNCTION(Name, param)

Igor Tandetnik


_
Fall in Love... Get married! Join FREE! 
http://www.shaadi.com/ptnr.php?ptnr=msnhottag




[sqlite] Re: User function in WHERE clause

2006-07-27 Thread Igor Tandetnik

Stan <[EMAIL PROTECTED]> wrote:

is there a way to create user function similar to LIKE?
I'd like to use my function in clause WHERE. E.g. this selection:
SELECT * FROM Table WHERE Name MYFUNCTION param
Param is integer.


Not like this, but you can create a function and use it this way:

SELECT * FROM Table WHERE MYFUNCTION(Name, param)

Igor Tandetnik


Re: [sqlite] User function in WHERE clause

2006-07-27 Thread Jay Sprenkle

On 7/27/06, Stan <[EMAIL PROTECTED]> wrote:


Hi,
is there a way to create user function similar to LIKE?
I'd like to use my function in clause WHERE. E.g. this selection:
SELECT * FROM Table WHERE Name MYFUNCTION param
Param is integer.


http://sqlite.org/capi3ref.html#sqlite3_create_function

--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com


[sqlite] User function in WHERE clause

2006-07-27 Thread Stan

Hi,
is there a way to create user function similar to LIKE?
I'd like to use my function in clause WHERE. E.g. this selection:
SELECT * FROM Table WHERE Name MYFUNCTION param
Param is integer.

Thanks

Stan
-- 
View this message in context: 
http://www.nabble.com/User-function-in-WHERE-clause-tf2009603.html#a5521087
Sent from the SQLite forum at Nabble.com.



Re: [sqlite] re: [sqlite] Retriving data from SQLite

2006-07-27 Thread Jay Sprenkle

On 7/27/06, mycmos <[EMAIL PROTECTED]> wrote:


--- Vivek R <[EMAIL PROTECTED]>写道:

> Hi ,
>  I am new bee to SQLite, I am using SQLite in one of
> the embedded
> applications. What I wanted to know how to retrive
> the data from table once
> the query is exected?  how to store the results of
> the query executed.


Or this:
sqlite3_prepare( db, sql[t], strlen(sql[t]), &pStmt, NULL );
sqlite3_step( pStmt );
sqlite3_column_text( pStmt, N );
sqlite3_finalize( pStmt );

--
SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com


Re: [sqlite] temp_store=1 performance on Mac OS X vs. Windows

2006-07-27 Thread Nuno Lucas

On 7/27/06, Joe Wilson <[EMAIL PROTECTED]> wrote:

Also, consider running that Task Manager and enable all the column
statistics (I/O, threads, VM Faults, Page Faults, etc) to see what's
going on while you're running your software. You never know what crazy
process might be screwing up your performance.


FileMon from sysinternals (bought recently by Microsoft) is very good
at showing what processes are doing with what files during some time.


Regards,
~Nuno Lucas


Re: [sqlite] how to use the sqlite command-line specific commands with the dll version

2006-07-27 Thread John Newby

Hi Nuno and John, thanks for the tips, I'll look into it.

John

On 27/07/06, John Stanton <[EMAIL PROTECTED]> wrote:


John Newby wrote:
> Hi, I was wondering how I could use the commands specific to the
> command-line interface with the dll version.
>
> The commands I am wanting to use are as follows :-
>
> .dump
> .import
> .output
> .read
>
> Any help would be greatly appreciated
>
> Many thanks
>
> John
>
These are part of the Sqlite3.exe program.  Lift code out of that and
place it in your application.



Re: [sqlite] memory leak

2006-07-27 Thread Peter Weilbacher
mycmos wrote:

> I am using sqlite2.8.17 for linux2.6. My program
> is as following:
>
> int main()
> {
>sqlite *db;
> 
>while(1){
>   db = sqlite_open("./example.db",0777,0);
>   if(db == 0){
>  printf("Could not open database.");
>  exit(1);
>   }
>   sleep(2);
>   sqlite_close(db);
>}
>  
>return 1;
> }
> 
> When I use cat /proc/meminfo, I found the MemFree is 
> decreasing. Does that means some degree memory leak to
> Sqlite2.8.17?

That can mean a number of things, a leak not necessarily being the most
likely. If there is a leak then you should be able to verify that by
running under the Valgrind tool (http://valgrind.org/).
   Peter.




Re: [sqlite] memory leak

2006-07-27 Thread Martin Jenkins
mycmos wrote:
> When I use cat /proc/meminfo, I found the MemFree is 
> decreasing. Does that means some degree memory leak to
> Sqlite2.8.17?

No. ;)

If you run "ps -ef" or "top" you'll see a list of all of the processes
running on your machine. How could you associate changes in MemFree with
any one of those processes? Short answer - you can't. ;)

I ran sqlite's test suite last week and (IIRC) it has about 20,000 test
cases. I didn't watch the whole test but I'd be surprised if there
wasn't a memory leak test in there somewhere and given the number of
people using sqlite I'm sure a leak in 2.8.17 would have been found and
fixed by now.

Martin

PS Usual stuff about 2.8.17 being old and 3.3.6 being new goes here.


[sqlite] Another question about RAM

2006-07-27 Thread Sarah
Hi, all

I want to build SQLite on the uc/os-II kernel in an embedded device.

Because uc/os-II doesn't provide malloc(), free() to manage memory, instead,
it divides the memory into fixed-length blocks and provides OSMemGet() and 
OSMemPut() to 
get and put fixed-length memory block.

In order to port SQLite, I have to wrap uc/os-II with a set of standard memory 
management APIs(malloc, free...).
So I need to decide in advance that which 'fixed length' will be better. That 
is to say, when using malloc() to 
allocate memory in SQLite, how much memory is needed in most cases? what does 
it depend on?

Thanks.



Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-27 Thread Peter van Dijk


On Jul 26, 2006, at 5:33 PM, Dennis Cote wrote:


John Newby wrote:


Is there any other names I need to look out for other than the  
"sqlite_" and
"table" that SQLite doesn't like as being a table name that anyone  
knows of?



John,

All keywords need to be quoted to use them as identifiers. There is  
a comprehensive list of keywords at http://www.sqlite.org/ 
lang_keywords.html


I would also suggest that you stick with the SQL standard method of  
quoting identifiers using double quotes (rather than the other  
extensions that SQLite accepts for compatibility with other non- 
standard database systems).


Using double quotes to quote identifiers in sqlite is dangerous, as  
mistyping
a fieldname will not yield an error. Currently the only safe way to  
quote

identifiers is using backticks, as in MySQL.

Cheers, Peter.


[sqlite] re: [sqlite] Retriving data from SQLite

2006-07-27 Thread mycmos

--- Vivek R <[EMAIL PROTECTED]>写道:

> Hi ,
>  I am new bee to SQLite, I am using SQLite in one of
> the embedded
> applications. What I wanted to know how to retrive
> the data from table once
> the query is exected?  how to store the results of
> the query executed.
> 
> Regards,
>   Vivek R
> 

int sqlite_get_table(
  sqlite *db,
  const char *zSql, 
  char ***pazResult,
  int *pnRow,   
  int *pnColumn,
  char **pzErrMsg   
)

All results of the query executed is stored in
*pazResult.







___ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer


[sqlite] Retriving data from SQLite

2006-07-27 Thread Vivek R

Hi ,
I am new bee to SQLite, I am using SQLite in one of the embedded
applications. What I wanted to know how to retrive the data from table once
the query is exected?  how to store the results of the query executed.

Regards,
 Vivek R