Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-23 Thread Chris Hanson
On Sep 21, 2006, at 7:18 AM, Narendran wrote: as far as my knowledge SQLITE allows me to declare the column types suppoted by the programming languare or say i am using blob . My requirement is i wish to store a structure in the SQLite column. Instead of storing the structure in a single c

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Martin Jenkins
Narendran wrote: > thanks a lot, > I am unable to resolve the problem for 3 days,hat's off to everyone. As far as I know, all technologies which transfer data between machines (e.g. RPC), languages (e.g. JNI) or wear the cross platform crown (e.g. SQLite) have some sort of data definition. With

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread AJ
Narendran wrote: thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's ,and

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Noel Frankinet
Narendran a écrit : thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's ,

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Narendran
thanks a lot, I believe i can store a structure now, but there is still a cache . I am in the process on creating a Independant API,I can store a structure in SQLite thro the above specified ways. what if some one else wants to use my API's which i used to create the DBI's ,and the destination D

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread Vivien Malerba
On 9/22/06, AJ <[EMAIL PROTECTED]> wrote: I hackish method might be something like this: struct s { ... }; struct s myS; char buf[sizeof(s)*2]; // *2 as base64 encoding will be approx 33% bigger. base64_encode( &myS, buf, sizeof(s) ); INSERT INTO table ( myTextField ) VALUES ( 'buf' );

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-22 Thread AJ
I hackish method might be something like this: struct s { ... }; struct s myS; char buf[sizeof(s)*2]; // *2 as base64 encoding will be approx 33% bigger. base64_encode( &myS, buf, sizeof(s) ); INSERT INTO table ( myTextField ) VALUES ( 'buf' ); then retrieval is the opposite.

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-21 Thread Noel Frankinet
Narendran a écrit : Noel Frankinet wrote: Narendran a écrit : Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE allows

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-21 Thread He Shiming
Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE allows me to declare the column types suppoted by the programming languare or say

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-21 Thread Narendran
Noel Frankinet wrote: > > Narendran a écrit : >> Dear Friends, >> >> >> I am in the process of forming a Generic API,(sql oriented and >> BerkelyDB >> and sister databases). In the process of integration ,i like to store a >> Structure in Sqlite. >> >> as far as my knowledge SQLITE allows m

Re: [sqlite] Wish to store a C structure in sqlite column

2006-09-21 Thread Noel Frankinet
Narendran a écrit : Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE allows me to declare the column types suppoted by the progr

[sqlite] Wish to store a C structure in sqlite column

2006-09-21 Thread Narendran
Dear Friends, I am in the process of forming a Generic API,(sql oriented and BerkelyDB and sister databases). In the process of integration ,i like to store a Structure in Sqlite. as far as my knowledge SQLITE allows me to declare the column types suppoted by the programming languare or say