[sqlite] Boolean casting

2018-03-15 Thread Pavan Paolo
Dear all,
I use in a view the following snip of code to force the results to be 
considered as Boolean:
SELECT cast(start_processing_date is not null as BOOLEAN), ...

I need this solution since in this way I can detect in java the Boolean data 
type by querying the ResultSet metadata rs.getMetaData().getColumnType() and 
trigger a proper visualization in a table.

Anyway, this cause to get column name a bit messy, reporting the 
"CAST(non_compliant ..." itself as title of the column.
If I try to use an alias such as the following, I fix the title but I loose the 
Boolean data type.
select cast(start_processing_date is not null as BOOLEAN) as my_check_name, ...

Is this behavior expected? How I can work on it?

Thank you,
Paolo
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] beginner

2007-09-05 Thread Pavan
Also, just to add when you reply back with a different query to the list,
pls post a seperate mail with a appropriate subject line so that more people
might be interested to help you.

Thanks,
Pavan.




On 9/5/07, Clay Dowling <[EMAIL PROTECTED]> wrote:
>
> Nishit,
>
> Much as we believe in helping out new people, I think it is reasonable to
> expect that before you ask for helping in using the C interface to SQLite
> that you familiarize yourself with C.  Looping and logic structures are
> something you should learn pretty early on, and if you haven't reached
> that point yet SQLite is going to be well beyond you.
>
> If you're truly this lost, let me recommend "The C Programming Language",
> which while basic, is also very good.
>
> Clay
>
> nishit sharma wrote:
> > thanks for this help. i have done this...
> > my another problem is that i have multiple columns in my database and on
> > the
> > basis of
> > two columns( has integer values) i have to read the database.
> > but i m unable to make a loop in C.
> > can u help me.
> >
> > regards
> > Nishit
> >
> >
> > On 9/3/07, Pavan <[EMAIL PROTECTED]> wrote:
> >>
> >> You should link the library when you compile .It should be gcc
> >> test.c-l
> >> library name should be your sqlite shared library.  Just check in
> >> /usr/lib
> >> directory
> >>
> >> Thanks,
> >> Pavan.
> >>
> >>
> >> On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> >> >
> >> > hey buddy can u tell me how to compile the C source code in which i
> >> have
> >> > used
> >> > sqlite3_open() like calls.
> >> > i m doing gcc test.c but it is giving me error of undefined
> reference.
> >> > i think i am missing some thing in compiling.
> >> > waiting for reply
> >> >
> >> > regards
> >> > Nishit
> >> >
> >> >
> >> > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> >> > >
> >> > > thanks for telling the link.
> >> > >
> >> > > regards
> >> > >
> >> > >
> >> > >  On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote:
> >> > > >
> >> > > > Hi Nishit,
> >> > > >
> >> > > > http://www.sqlite.org/quickstart.html
> >> > > >
> >> > > > This is a good link to start with.
> >> > > >
> >> > > > Thanks,
> >> > > > Pavan.
> >> > > >
> >> > > >
> >> > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> >> > > > >
> >> > > > > Hi,
> >> > > > > i m beginner to sqlite
> >> > > > > can anybody send me a link which can help me
> >> > > > > in building and maintining databse
> >> > > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > '
> >> > > > Always finish stronger than you start
> >> > > > *
> >> > > >
> >> > >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> '
> >> Always finish stronger than you start
> >> *
> >>
> >
>
>
> --
> Lazarus Registration
> http://www.lazarusid.com/registration.shtml
>
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>
> -
>
>


-- 
'
Always finish stronger than you start
*


Re: [sqlite] beginner

2007-09-03 Thread Pavan
prepare sql query and pass it to sqlite3_exec

Thanks,
Pavan.


On 9/3/07, nishit sharma <[EMAIL PROTECTED]> wrote:
>
> thanks for this help. i have done this...
> my another problem is that i have multiple columns in my database and on
> the
> basis of
> two columns( has integer values) i have to read the database.
> but i m unable to make a loop in C.
> can u help me.
>
> regards
> Nishit
>
>
> On 9/3/07, Pavan <[EMAIL PROTECTED]> wrote:
> >
> > You should link the library when you compile .It should be gcc
> > test.c-l
> > library name should be your sqlite shared library.  Just check in
> /usr/lib
> > directory
> >
> > Thanks,
> > Pavan.
> >
> >
> > On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> > >
> > > hey buddy can u tell me how to compile the C source code in which i
> have
> > > used
> > > sqlite3_open() like calls.
> > > i m doing gcc test.c but it is giving me error of undefined reference.
> > > i think i am missing some thing in compiling.
> > > waiting for reply
> > >
> > > regards
> > > Nishit
> > >
> > >
> > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> > > >
> > > > thanks for telling the link.
> > > >
> > > > regards
> > > >
> > > >
> > > >  On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hi Nishit,
> > > > >
> > > > > http://www.sqlite.org/quickstart.html
> > > > >
> > > > > This is a good link to start with.
> > > > >
> > > > > Thanks,
> > > > > Pavan.
> > > > >
> > > > >
> > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Hi,
> > > > > > i m beginner to sqlite
> > > > > > can anybody send me a link which can help me
> > > > > > in building and maintining databse
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > '
> > > > > Always finish stronger than you start
> > > > > *
> > > > >
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > '
> > Always finish stronger than you start
> > *
> >
>



-- 
'
Always finish stronger than you start
*


Re: [sqlite] beginner

2007-09-03 Thread Pavan
You should link the library when you compile .It should be gcc
test.c-l
library name should be your sqlite shared library.  Just check in /usr/lib
directory

Thanks,
Pavan.


On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote:
>
> hey buddy can u tell me how to compile the C source code in which i have
> used
> sqlite3_open() like calls.
> i m doing gcc test.c but it is giving me error of undefined reference.
> i think i am missing some thing in compiling.
> waiting for reply
>
> regards
> Nishit
>
>
> On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> >
> > thanks for telling the link.
> >
> > regards
> >
> >
> >  On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Nishit,
> > >
> > > http://www.sqlite.org/quickstart.html
> > >
> > > This is a good link to start with.
> > >
> > > Thanks,
> > > Pavan.
> > >
> > >
> > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > > i m beginner to sqlite
> > > > can anybody send me a link which can help me
> > > > in building and maintining databse
> > > >
> > >
> > >
> > >
> > > --
> > > '
> > > Always finish stronger than you start
> > > *
> > >
> >
> >
>



-- 
'
Always finish stronger than you start
*


Re: [sqlite] beginner

2007-08-29 Thread Pavan
Hi Nishit,

http://www.sqlite.org/quickstart.html

This is a good link to start with.

Thanks,
Pavan.


On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i m beginner to sqlite
> can anybody send me a link which can help me
> in building and maintining databse
>



-- 
'
Always finish stronger than you start
*


[sqlite] Locking queries

2007-08-23 Thread Pavan
Hi,

As per my understanding I see that SQLite supports only database locking, as
opposed to table/row locking. Does anyone know if you can read from a locked
database ? (i.e. if one application has locked the database for writing,
then can another application read/query it whilst its locked?

Thanks,
Pavan.
-- 
'
Always finish stronger than you start
*


Re: [sqlite] License Queries

2007-04-26 Thread Pavan

Hi Kishor,


you don't have to do anything.

Thanks for the quick reply. I did not quite understand to which part of the
question this reply belongs.  Are you suggesting that I should not take
explicit license ?

BTW, i dont want to do any changes to  sqlite, but i am more concerned about
the licensing issues of the modules which are accesing sqlite.

Thanks,
Pavan.



On 4/26/07, P Kishor <[EMAIL PROTECTED]> wrote:


you don't have to do anything. SQLite is in public domain. You can
cook with it, make castles with it, become a billionaire (although, if
you do, remember to give some money to your favorite open source
project), or roll pancakes with it.

If you make and modifications to SQLite AND if you want those
modifications to be included in future versions of SQLite, then you
have to --

1. convince Richard that your mods are all that, and
2. put your mods in the same license as SQLite.

Other than that, do what you wish with it.

On 4/26/07, Pavan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have gone through this link
> http://www.sqlite.org/copyright.html and here are few more practical
queries
> related to commercial usage:-
>
> 1. If i develop a wrapper module around sqlite(without taking explicit
> license) to store some private data in the db, should the wrapper module
be
> made public ?
> 2. If i develop a wrapper module around sqlite(taking explicit license)
to
> store some private data in the db, should the wrapper module be made
public
> ?
> 3. If i take explicit license from hawci, will the license apply for
> subsequent upgrades of the sqlite  ?
> 4. Anyother information which someone wants to share related to license.
>
> Thanks in advance,
> Pavan.
>
> --
> '
> Always finish stronger than you start
> *
>


--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] License Queries

2007-04-26 Thread Pavan

Hi,

I have gone through this link
http://www.sqlite.org/copyright.html and here are few more practical queries
related to commercial usage:-

1. If i develop a wrapper module around sqlite(without taking explicit
license) to store some private data in the db, should the wrapper module be
made public ?
2. If i develop a wrapper module around sqlite(taking explicit license) to
store some private data in the db, should the wrapper module be made public
?
3. If i take explicit license from hawci, will the license apply for
subsequent upgrades of the sqlite  ?
4. Anyother information which someone wants to share related to license.

Thanks in advance,
Pavan.

--
'
Always finish stronger than you start
*


Re: [sqlite] Japanese-Korean characters

2007-04-26 Thread Pavan

Hi Ralf,

Thanks for the link.  My OS is Linux.  Is there something available on these
lines for linux ?

Best Regards,
Pavan.


On 4/26/07, Ralf Junker <[EMAIL PROTECTED]> wrote:


Hello Pavan,

>Can we store/retrieve Japanese/korean characters in sqlite db ?

Yes, you can well do so, as others have already pointed out.

If you are also looking for a Unicode GUI SQLite database manager to
display and edit Japanese / Korean character databases, you might want to
have a look at SQLiteSpy, freeware from
http://www.yunqa.de/delphi/sqlitespy/ .

SQLiteSpy is designed to support any language when run on a Windows NT 4
and later operating system (Win2K, WinXp, Vista, etc.). I have received
positive reports that it works well with German, French, Eastern European,
Greek and Cyrillic characters. Given that your system fonts supports
Japanese and Koean characters, they should work just as well. If you are
experiencing problems, please contact me via e-mail and I will see what I
can do.

Ralf



-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


Re: [sqlite] Japanese-Korean characters

2007-04-25 Thread Pavan

UTF-8 (or Unicode) rules!

Thanks for the quick reply. But, I havent understood.  Can you be bit more
clear ?

Best Regards,
Pavan.


On 4/25/07, Tian-Jian Barabbas [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Pavan 提到:
> Hi,
>
> Can we store/retrieve Japanese/korean characters in sqlite db ?
>
> Thanks,
> Pavan.
>
UTF-8 (or Unicode) rules!

   Cheers,
Mike


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] Japanese-Korean characters

2007-04-25 Thread Pavan

Hi,

Can we store/retrieve Japanese/korean characters in sqlite db ?

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


[sqlite] multiple request handling

2007-03-30 Thread Pavan

Hi,

Does SQLite handle multiple request handling ?

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


Re: [sqlite] DB recovery

2007-03-14 Thread Pavan

Hi Donald,

Thanks, that was indeed a detailed explanation.
The scenrio is an embedded device with sqlite in it and user does not have
direct access to the DB.
So, are there any Sqlite interfaces which do the recovery job mentioned in
your email ?

Thanks,
Pavan.


On 3/14/07, Griggs, Donald <[EMAIL PROTECTED]> wrote:



Hi, Pavan,

Regarding:
"In a situation where if the sqliteDB gets corrupted is there a way to
recover the data ?
I understand that the word *corrupted* is too generic from technical
point of view. But, still would like to know if anyone has faced a
situation where indirect methods are used to retrieve data from DB."

I think the general advice goes something like this:

1) After a power outage or system crash, be sure to let sqlite attempt
to bring the DB to a consistent state using its journal.

2) If the DB then asserts that it is corrupted, make a copy of it for
safety, than attempt a VACUUM command.

3) If the DB still asserts corruption, use the command line utility and
attempt to .DUMP individual tables.

4) Resort to your backups if all else fails.

And for the future, make sure you're not using "PRAGMA synchronous =
OFF;" for any data you care about losing.

The sqlite codes goes to great lengths to avoid data corruption where
possible.


See also: How To Corrupt Your Database Files
http://www.sqlite.org/lockingv3.html#how_to_corrupt


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] DB recovery

2007-03-14 Thread Pavan

Hi,

In a situation where if the sqliteDB gets corrupted is there a way to
recover the data ?
I understand that the word *corrupted* is too generic from technical point
of view. But, still
would like to know if anyone has faced a situation where indirect methods
are used
to retrieve data from DB.

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


Re: [sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Pavan

Hi Jakub,

Check this link
http://sqlite.org/quickstart.html
There is a sample program. compile it and run executable in this form

$./a.out test.db 'create table tbl1(one varchar(10), two smallint)'
$./a.out test.db 'insert into tbl1 values('hello!',10)'
$./a.out test.db 'select * from tbl1'

Thanks,
Pavan.





On 3/8/07, Jakub Ladman <[EMAIL PROTECTED]> wrote:


Hi (much smarter) friends.
I need to start with sqlite (interfaced via C language) very quickly,
unfortunately.
I have not any experiences with any SQL, only some books.
I am searching for some "stupid man's manual to sqlite".
I can not found any basic's in documentation section of sqlite.org

For example: I do understand this:

$ sqlite3 ex1
SQLite version 3.3.10
Enter ".help" for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
sqlite> insert into tbl1 values('hello!',10);
sqlite> insert into tbl1 values('goodbye', 20);
sqlite> select * from tbl1;
hello!|10
goodbye|20
sqlite>


but not this:
rc = sqlite3_exec(db, argv[2], callback, 0, &zErrMsg);

What format of the command line argument should i write?

Thank you for any advice.

Jakub Ladman


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] sqlite c++ interfaces

2007-03-01 Thread Pavan

Hi,

I was googling for c++ interfaces for sqlite and found sqlitemm provides.
But, i am unable to download the code.  Can some one pls point me to link
from where i can download the c++ interfaces for sqlite.

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


[sqlite] Sqlite for Embedded Devices

2007-03-01 Thread Pavan

Hi,

Could anyone share their observations/comments on having used sqlite as DB
for embedded linux environment.

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


Re: [sqlite] UTF16 Encoding

2007-02-28 Thread Pavan

But I'm thinking you really want to do this anyway:


Well, I have a requirement to store/retrieve UTF16 strings.  The current
discussion thread
is based on that.  Pls let me know if my understanding of using
sqlite3_open16 is correct
to store and retrieve utf16 strings.

Thanks,
Pavan.



On 2/28/07, Dan Kennedy <[EMAIL PROTECTED]> wrote:


On Wed, 2007-02-28 at 13:13 +0100, Pavan wrote:
> Hi Lucas,
>
> >Shouldn't it be "sqlite3_open16(L"test.db",&db)" ?
>
> I tried this call. It works. But, the db file is created only with the
first
> character name
> and the extenstion is also missing. (its like 't')
>
> Also, can you point to me at some documentation which explains what does
> the 'L' mean in the API ?

It means "string literal", and is used for building an array of wchar_t
elements (instead of regular 8-bit char). The thing is, C doesn't
say how big wchar_t is supposed to be. Some compilers make it 32-bit
(yours could be one of these), and others make it 16-bit. There
is, AFAIK, no portable way to declare UTF-16 string constants using C.

Please inform me if I'm wrong about that, it's something I'd like to
know how to do :)

But I'm thinking you really want to do this anyway:

sqlite3_open("test.db", &db);
sqlite3_exec(db, "PRAGMA encoding = UTF-16", 0, 0, 0);

sqlite3_open16() just converts the argument back to UTF-8 and does
exactly the above anyway.

Dan.


> Thanks,
> Pavan.
>
>
> On 2/28/07, Nuno Lucas <[EMAIL PROTECTED]> wrote:
> >
> > On 2/28/07, Pavan <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > When i tried to create the db file using API sqlite3_open16("test.db
> > ",&db)
> > > it creats the file name with some junk
> > > characters.
> >
> > Shouldn't it be "sqlite3_open16(L"test.db",&db)" ?
> >
> > Regards,
> > ~Nuno Lucas
> >
> > > The file name is correct if i use sqlite3_open("test.db",&db).  Does
it
> > mean
> > > sqlite3 does not support
> > > UTF16 encoding ?
> > > or
> > > Am i missing some package ?
> > >
> > > Thanks,
> > > Pavan.
> >
> >
> >
-
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> >
-
> >
> >
>
>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


Re: [sqlite] UTF16 Encoding

2007-02-28 Thread Pavan

Hi Lucas,


Shouldn't it be "sqlite3_open16(L"test.db",&db)" ?


I tried this call. It works. But, the db file is created only with the first
character name
and the extenstion is also missing. (its like 't')

Also, can you point to me at some documentation which explains what does
the 'L' mean in the API ?

Thanks,
Pavan.


On 2/28/07, Nuno Lucas <[EMAIL PROTECTED]> wrote:


On 2/28/07, Pavan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When i tried to create the db file using API sqlite3_open16("test.db
",&db)
> it creats the file name with some junk
> characters.

Shouldn't it be "sqlite3_open16(L"test.db",&db)" ?

Regards,
~Nuno Lucas

> The file name is correct if i use sqlite3_open("test.db",&db).  Does it
mean
> sqlite3 does not support
> UTF16 encoding ?
> or
> Am i missing some package ?
>
> Thanks,
> Pavan.


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] UTF16 Encoding

2007-02-28 Thread Pavan

Hi,

When i tried to create the db file using API sqlite3_open16("test.db",&db)
it creats the file name with some junk
characters.
The file name is correct if i use sqlite3_open("test.db",&db).  Does it mean
sqlite3 does not support
UTF16 encoding ?
or
Am i missing some package ?

Thanks,
Pavan.

--
'
Always finish stronger than you start
*


Re: [sqlite] Storing contacts list for each user

2007-02-15 Thread Pavan

Hi Paul,

Thanks for the detailed reply...
The app would be on these lines, download the phone book for several users
onto the linux PC and give access to their downloaded phone books for
reading at later time, each user should
not see other user contacts list.

Thanks,
Pavan.





On 2/15/07, Paul Simpson <[EMAIL PROTECTED]> wrote:



> /home/user/user1/user1.db [User1 will have table to hold contacts list]
> /home/user/user2/user2.db [User2 will have table to hold contacts list]
> .
> .
> .
> /home/user/userN/userN.db [UserN will have table to hold contacts list]

This would imply that you are writing an application where each user has
their own file structure (like a word processor would, for example). i.e.
the user logs in and runs the app, accessing their own files. If this is
the case, then yes, what you are suggesting is correct since the various
contact lists are isolated entities.





If, however, the users share the app and there is one data file, then the

normalization argument kicks in. In this case you would have two, or
possibly three tables. The first would contain all your user's details
(including, if appropriate, security information to allow the application
to authenticate them) One column would be a unique ID number, known as the
primary key. A second table would contain the contact details. One column
of that would be the id of the "owning" user (known as a foreign key). So
when your application wants to list a user's contacts it searches for only
those contacts that are "owned" by the user (i.e. the contacts whose
foreign key is the user's primary key).

It gets better! If, say, two users have the same contact then there will
be two entries in the contacts table and therefore two entries to keep up
to date. Let's say you want to be able to share contacts. Now what you do
is to have a primary key on both the users and contacts tables (I always
have a primary key on every table anyway) and a third table which contains
two columns of foreign keys, one for the user and one for the contact.
Now, each user can have multiple contacts and each contact can have
multiple users. In this case, I would probably include information in the
relationships table to control which user can edit the contact, but the
point is if, say, I had you in my contacts list and I shared that contact
with my wife, if your details changed and I edited them, my wife's version
would change too.

That, in a nutshell, is normalization.

I hope that helps, but like I said at the start, it depends how you see
your app working. Your original question implied that you would have 1
file and many tables in it (1 for each user) which would be wrong (well,
inefficient!)

I hope that helps.

--
Paul




-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


Re: [sqlite] Storing contacts list for each user

2007-02-15 Thread Pavan

Hi Martin,

Thanks for the quick replyI have gone throu the link and it gives good
insight
of data managment from tables perspective...

But, from users point of view can it be something like this

/home/user/user1/user1.db [User1 will have table to hold contacts list]
/home/user/user2/user2.db [User2 will have table to hold contacts list]
.
.
.
/home/user/userN/userN.db [UserN will have table to hold contacts list]

The idea is that at any point of time user1 should not access user2 details
and vice-versa.

Does it make sense conceptually and is it feasible technically ?

Thanks,
Pavan.



On 2/15/07, Martin Jenkins <[EMAIL PROTECTED]> wrote:


Pavan wrote:
> Should i create different tables for each user, so hat at any point
> of time only one users data will be accessed ? Should i store all the
> information in one table and then acess it ?

The word you want is "normalisation" and you could have a look at, say,


http://www.devshed.com/c/a/MySQL/An-Introduction-to-Database-Normalization/

The URL suggests it's for MySQL but it's pretty generic stuff.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
'
Always finish stronger than you start
*


[sqlite] Difference between sqlite and sqlite3

2007-02-15 Thread Pavan

Hi,

Can anyone tell me what is the difference between sqlite and sqlite3.

Thanks,
Pavan.
--
'
Always finish stronger than you start
*


[sqlite] Storing contacts list for each user

2007-02-15 Thread Pavan

Hi,

I would like to use sqlite for my data storage and quite new to this
environment. Have a few queries regarding sqlite.
I have to store and read say 'n' users data.  Each user will have his own
contacts(Name,phonenumber) list.
At any point of only one users data will be written or read.

What is the best way to store this data ?.
Should i create different tables for each user, so hat at any point of time
only one users data will be accessed ?
Should i store all the information in one table and then acess it ?

Thanks in advance,
Pavan.

--
'
Always finish stronger than you start
*


[sqlite] File format changed !!

2006-02-27 Thread Pavan Savoy
I am trying to open a database created in  SQLite 3.3.1 in SQlite 3.1.2 
and I get the following err when I try to see the sqlite_master table ..

SQL error: unsupported file format


I suppose the file format has been changed over the versions, but the 
reverse does work, i.e db created on 3.1.2 can be opened on 3.3.1.



I just wanted some sort of document which suggests changes in file format 
over the versions, " changes " page doesnt represent the full picture 
though




Thank you

[sqlite] sqlite3_exec vs. sqlite3_prepare / sqlite3_step

2006-02-16 Thread Pavan Savoy
Hi,
 sqlite3_exec is a wrapper function for sqlite3_prepare / 
step, but which one of these is faster, I mean in terms of execution. 
sqlite3_exec should still call a callback function and do all the string 
handling !!


Also how do I use sqlite3_exec along with BLOB, I am currently using 
sqlite3_bind_blob after an prepare and then I do step, but for _exec how 
do I do it ??


Help this newbie..


Thank you

[sqlite] Fwd: Help regarding insertion into database

2006-02-08 Thread pavan savoy
-- Forwarded message --
From: pavan savoy <[EMAIL PROTECTED]>
Date: Feb 8, 2006 5:22 PM
Subject: Help regarding insertion into database
To: [EMAIL PROTECTED]

Hi,

Inside C program I have a structure and want to store it into a
database, isnt there any datatype where I could just mention this many
number of bytes starting from this address...

specifically I want to store a struct s { int a; char b[16]}; directly
without having to create table tab(a integer, b varchar2); 

cant I just have create table tab(data binary);
insert into tab(&s1);
insert into tab(&s2); . etc..

may sound like a newbie question ... pls excuse


[sqlite] Fwd: Does SQLite provide XML support

2006-01-31 Thread pavan savoy
-- Forwarded message --
From: pavan savoy <[EMAIL PROTECTED]>
Date: Jan 31, 2006 7:17 PM
Subject: Does SQLite provide XML support
To: [EMAIL PROTECTED]

Hi,
 I searched through your FAQ's mailing list, but the answer nor
the question is not this simple.

Hence I just want to know is there a tool where I can just say

#db2xml test.db test.xml

which converts test.db database to XML format. I dont really care abt DTD,
stuff and all. I just want it to be converted. Thats it ...


Thank you