Re: [sqlite] questions about performance

2006-04-13 Thread Miha Vrhovnik
>This problem has been coming up with more and more frequency. >I need to either figure out a solution or at least write up >some official documentation on it. I think that table partitioning as I purposed about a month ago would be a solution if data is of nature, that it can be partitioned

[sqlite] Using Like

2006-04-13 Thread Roger
hwo do i use LIKE in sqlite eg in Select Surname from people where surname like A* etc.

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Aaron Jones
How come you all reply to other peoples emails but only 1 person relied to mine? On 06/04/06, John Newby <[EMAIL PROTECTED]> wrote: > > I think Object Oriented databases came in with the SQL-99 standard and > SQLite is the SQL-92 standard so it may be structured but I'm not sure at > all > >

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Jay Sprenkle
On 4/13/06, Aaron Jones <[EMAIL PROTECTED]> wrote: > How come you all reply to other peoples emails but only 1 person relied to > mine? I didn't reply because I don't know anything about mono. I wouldn't take it personally.

Re: [sqlite] Re: apostrophe troubles

2006-04-13 Thread Brian Johnson
Thanks .. it's amazing how hard it is to google for this info Igor Tandetnik ([EMAIL PROTECTED]) wrote: > > Brian Johnson > <[EMAIL PROTECTED]> wrote: > > Here is example of what I'm trying to do in the bash script: > > > > sqlite3 db.dat "BEGIN; > > UPDATE table1 SET name='O'Neil' WHERE

RE: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Fred Williams
It would appear the first responder gave you your answer. So where's the beef? If you don't like the answer, don't complain to us about service :-) Fred > -Original Message- > From: Jay Sprenkle [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 13, 2006 8:20 AM > To:

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread John Newby
I said I was not sure if my answer was correct or not, so he probably just wanted re-assuring that my answer was correct, give him a break, he'll be under enough stress doing his project for uni without us getting on his back. On 13/04/06, Fred Williams <[EMAIL PROTECTED]> wrote: > > It would

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Dennis Cote
Aaron Jones wrote: How come you all reply to other peoples emails but only 1 person relied to mine? Aaron, Referring to your original posting: Hi, I am doing a project for University where I am creating a cross-platform, open-source GUI to SQLite, I am going to be using mono to build it,

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Aaron Jones
Hi Fred, when John replied and stated that he was not sure is SQLite was Structure or OO, I was just waiting for other people to reply also to confirm this, I do not have any beef with anyone. Sorry if it came accross this way. Aaron On 13/04/06, Fred Williams <[EMAIL PROTECTED]> wrote: > > It

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Aaron Jones
Hi John, thank you for your kind words. Aaron. On 13/04/06, John Newby <[EMAIL PROTECTED]> wrote: > > I said I was not sure if my answer was correct or not, so he probably just > wanted re-assuring that my answer was correct, give him a break, he'll be > under enough stress doing his project for

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Aaron Jones
Hi Dennis, thank you for your comments, my question was a bit vague and i will try and remedy this in the future. I was just wanting to know whether it was structured or OO as my supervisor said if I could find this out, this would be a good justification as to why I chose structured or OO for

RE: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Fred Williams
And, don't forget I used the required simley face :-) BUT, I do know that when you are up to your a__ in alligators, it is difficult to remember the objective was to drain the swamp. (or check for smiley faces.) Good luck alligator hunting! Fred > -Original Message- > From: Aaron Jones

[sqlite] sqlite3_update_hook

2006-04-13 Thread Cameron Tofer
Hi, I'd like to modifiy sqlite3_update_hook so the callback returns the table's id instead of the table's name. I'm not worried about proposing any official changes to the spec but rather a small customization for myself. Can anyone point me in the right direction for this? At the point

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread Aaron Jones
Hi, I never saw the smiley, sorry. lol. Thanx, I will need it. Aaron. On 13/04/06, Fred Williams <[EMAIL PROTECTED]> wrote: > > And, don't forget I used the required simley face :-) > > BUT, I do know that when you are up to your a__ in alligators, it is > difficult to remember the objective

Re: [sqlite] sqlite3_update_hook

2006-04-13 Thread Dennis Cote
Cameron Tofer wrote: Hi, I'd like to modifiy sqlite3_update_hook so the callback returns the table's id instead of the table's name. I'm not worried about proposing any official changes to the spec but rather a small customization for myself. Can anyone point me in the right direction

[sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread drh
"Aaron Jones" <[EMAIL PROTECTED]> wrote: > Hi, sorry to bother you, but I was wondering if you could tell me if you > designed SQlite using a Structured or Object-Oriented methodology please as > I am designing an interface to SQLite and my supervisor said if I knew what > methodology was used for

Re: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread Jay Sprenkle
On 4/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > You assume that the design method used to build a component > has some bearing on the design method used to build a > user interface to that component. This is false. Either > your instructor is wrong or your are misquoting him. I feel

Re: [sqlite] sqlite3_update_hook

2006-04-13 Thread Cameron Tofer
The rowid of the table's record in the sqlite_master table would be great, but really any unique integer that I can later use to get the table's name would be fine. Dennis Cote wrote: Cameron Tofer wrote: Hi, I'd like to modifiy sqlite3_update_hook so the callback returns the table's id

RE: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread Robert Simpson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > You should design your interface using whatever design method > you are most comfortable with. Or (better) just design your > interface using creativity and good sense and don't worry so > much about rigidly

Re: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread Aaron Jones
Hi Jay, yeah I need justification and they said I cant use the fact that I already know how to do it this way as a justification, but if I elaborate on the fact that most other projects use this method and the reasons why I think that would be an OK justification. Many thanks. Aaron. On

Re: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread Aaron Jones
Hi Robert, yes I know if I follow the books etc I will be limited as to what I can achieve but at the moment I am concentrating on getting a high grade pass on my degree then I set my mnd on the masterpieces ;) On 13/04/06, Robert Simpson <[EMAIL PROTECTED]> wrote: > > > -Original

Re: [sqlite] sqlite3_update_hook

2006-04-13 Thread Dennis Cote
Cameron Tofer wrote: The rowid of the table's record in the sqlite_master table would be great, but really any unique integer that I can later use to get the table's name would be fine. Cameron, Then you should be able to execute the following SQL query in your sqlite3_update_hook handler

Re: [sqlite] Re: Using Like

2006-04-13 Thread Nuno Lucas
On 4/13/06, Roger <[EMAIL PROTECTED]> wrote: > Thanks for that. Its just that i am developing an application using > PHP/Sqlite and was having a major problem with escaping. But i got it > eventually. for anyone who might have a problem its. > > . > > $SQL = "Select * >

[sqlite] Re: timestamp in SQLITE DB

2006-04-13 Thread drh
"Fang Fang" <[EMAIL PROTECTED]> wrote: > Hello, > > Could you please let me know how to retrieve the current time from SQLITE DB? > Will it be GMT time or local time? > SELECT current_timestamp; -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Re: timestamp in SQLITE DB

2006-04-13 Thread drh
[EMAIL PROTECTED] wrote: > "Fang Fang" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > Could you please let me know how to retrieve the current time from SQLITE > > DB? > > Will it be GMT time or local time? > > > > SELECT current_timestamp; Forgot to say: UTC (a.k.a. GMT) -- D. Richard Hipp

[sqlite] PRAGMA table_info

2006-04-13 Thread Marco Bambini
Using PRAGMA table_info(...) there is no way to know if a column is declared as unique and/or autoincrement. Am I missing something? Is there a way to get these info? Thanks, Marco Bambini

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread koneill
I have been doing various experiments in applying OO to databases and might have a few suggestions to make. I would be interested to provoke debate as to how to apply OOP to a database like SQLite; I haven't quite understood why your tutor wants to know if the database is structured using OO:

Re: [sqlite] PRAGMA table_info

2006-04-13 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > Using PRAGMA table_info(...) there is no way to know if a column is > declared as unique and/or autoincrement. > Am I missing something? > Is there a way to get these info? > There is no pragma currently (that I recall) for finding if a column is

RE: [sqlite] PRAGMA table_info

2006-04-13 Thread Jackson, Douglas H
This leaves you to parse the DDL from sqlite_master. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 2:51 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] PRAGMA table_info Marco Bambini <[EMAIL PROTECTED]> wrote: > Using

[sqlite] Multiple prepared statements work on Windows... fails on Mac OS X

2006-04-13 Thread Slater, Chad
Hello, I'm using two prepared statements in a block of cross platform C++ code like this (very roughly): { sqlite3_stmt * pstmt1 = NULL; sqlite3_stmt * pstmt2 = NULL; pstmt1 = PrepareAndBind(...); // Prepare and bind one statement pstmt2 = PrepareAndBind(...); // Prepare

Re: [sqlite] Structured or Object-Oriented?

2006-04-13 Thread John Stanton
Aaron, your question indicates that you need to read a bit more deeply in general CS theory as a prelude to your project. Sqlite is basically a simplified implementation of basic SQL, and is a just library of functions, not an entity. With it you can build to your chosen model. Think of

Re: [sqlite] sqlite3_update_hook

2006-04-13 Thread John Stanton
A wise computer scientist once told me "In Computer Science every problem can be solved by yet another level of indirection". Your problem is no exception. JS Cameron Tofer wrote: The rowid of the table's record in the sqlite_master table would be great, but really any unique integer that I

Re: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread John Stanton
Robert Simpson wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] You should design your interface using whatever design method you are most comfortable with. Or (better) just design your interface using creativity and good sense and don't worry so much

Re: [sqlite] Re: Structured or Object-Oriented

2006-04-13 Thread koneill
- Original Message - From: "John Stanton" <[EMAIL PROTECTED]> To: Sent: Friday, April 14, 2006 1:32 AM Subject: Re: [sqlite] Re: Structured or Object-Oriented > > > I was always impressed with Dijkstra's contention that a programmer's > most important quality

[sqlite] How to verify sqlite file?

2006-04-13 Thread Charlie Li
Is there any way to verify a file is sqlite3 file? When I tried to open a non-sqlite file by sqlite_open(), the system crash. I checked the source codes and found no file type checking. The final trace is toward to page.c file. How to revise code to make sqlite more reliable.

RE: [sqlite] PRAGMA table_info

2006-04-13 Thread Robert Simpson
> -Original Message- > From: Marco Bambini [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 13, 2006 2:38 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] PRAGMA table_info > > Using PRAGMA table_info(...) there is no way to know if a > column is declared as unique and/or

Re: [sqlite] PRAGMA table_info

2006-04-13 Thread Christian Werner
"Jackson, Douglas H" wrote: > > This leaves you to parse the DDL from sqlite_master. > Doug ... or to correlate 'pragma table_info(tablename)' with 'pragma index_info(tablename)'. Some (unreadable, imperfect) example code can be found in the ODBC driver e.g. in the functions SQLPrimaryKeys(),