RE: [sqlite] New SQLitePlus version available

2006-05-18 Thread Chethana, Rao \(IE10\)
Hello!

Is it an open source?

Kind regards,
Chethana.   

-Original Message-
From: Brett Goodman [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 19, 2006 9:48 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] New SQLitePlus version available

Hello all.  Just to let everyone know I've released a new SQLitePlus
Database
Manager (v5) and COM DLL wrapper (v3.5).  New features include:

   Ability to edit/rename an existing table
   Improved table creation dialog
   Much improved Grid table editor
   Binary data viewer window for viewing BLOB data
   Data import/export facility

Combined with the existing great features, such as on-the-fly encryption
and
compression, stored scripts and ease of use, SQLitePlus is a great
choice for
applications development and database management.

Existing users upgrade for free.  And the Grid ActiveX is also now free 
(source
code available upon request).

Best regards
-Brett G.




This message was sent using IMP, the Internet Messaging Program.





RE: [sqlite] SQL error: near "ANALYZE": syntax error

2006-04-11 Thread Chethana, Rao \(IE10\)
I think u've got to type the query after typing(next to) ANALYZE.

-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 12, 2006 8:58 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQL error: near "ANALYZE": syntax error

SQLite 3.2.2 does not support ANALYZE.
I think it first appears in SQLite 3.2.3.

--- Steve Bergman <[EMAIL PROTECTED]> wrote:

> I feel kind of silly asking this.  I must be doing something really
silly.
> 
> I go into the command line client with:
> 
> $ sqlite3 filename.db
> 
> at the sqlite> prompt, I type:
> 
> ANALYZE;
> 
> and I get:
> 
> SQL error: near "ANALYZE": syntax error
> 
> I am running sqlite 3.2.2.
> 
> What am I doing wrong?
> 
> Thanks,
> Steve
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


RE: [sqlite] no errors,but not executed: Stored procedures in triggers

2006-03-24 Thread Chethana, Rao \(IE10\)
When I create trigger by giving select sp_dosomethingfunc();  THE
TRIGGER IS GETTING CREATED without any errors & stmts within main r
executed, but stmts within this custom function- >
sp_dosomethingfunc(sqlite3_context *context, int argc,sqlite3_value
**argv)--  r not excuted. Also what is that 

sqlite3_context *context doing here? Y is it used?  

I want to make use of exec within this custom function. How shall I use
it?

Awaiting reply.

-Original Message-
From: Jay Sprenkle [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 24, 2006 8:18 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] no errors,but not executed: Stored procedures in
triggers

On 3/24/06, Chethana, Rao (IE10) <[EMAIL PROTECTED]> wrote:
> My problem is not with cascading or using recursive triggers.
> Actually,
> I am using  "sqlite3_create_function"  to execute some queries(like
> insert or update etc.) but the control does not pass to the custom
> function at all, ie., say a user-defined function
>
> sp_dosomethingfunc(sqlite3_context *context, int argc,sqlite3_value
> **argv)
>  {
> Do something or execute some queries...
> ..etc
>  }
>
> /* from main() I'm calling the above function using
> sqlite3_create_function*/
> int main()
>
>  {
>/* after using sqlite_open */
>
>sqlite3_create_function()
>
>/*  exec function is executed, but control is
> not passed to sp_dosomethingfunc, how do I make stmts inside this
custom
> function get executed?  */
>
>sqlite3_exec(.)
>  }
>
>  /* and this  sp_dosomethingfunc, I'm calling from triggers. I'm not
> getting any error. But this function is not executed */

your function would be executed by something like

select sp_dosomethingfunc

Since it's a function you have to do something to evaluate it.

Since your trigger is 'calling' the function, are you sure your
trigger is being run?


[sqlite] no errors,but not executed: Stored procedures in triggers

2006-03-24 Thread Chethana, Rao \(IE10\)
My problem is not with cascading or using recursive triggers.
Actually,
I am using  "sqlite3_create_function"  to execute some queries(like
insert or update etc.) but the control does not pass to the custom
function at all, ie., say a user-defined function
 
sp_dosomethingfunc(sqlite3_context *context, int argc,sqlite3_value
**argv)
 { 
Do something or execute some queries...
..etc
 }

/* from main() I'm calling the above function using
sqlite3_create_function*/
int main()
 
 {
   /* after using sqlite_open */

   sqlite3_create_function()

   /*  exec function is executed, but control is 
not passed to sp_dosomethingfunc, how do I make stmts inside this custom
function get executed?  */ 

   sqlite3_exec(.)
 }

 /* and this  sp_dosomethingfunc, I'm calling from triggers. I'm not
getting any error. But this function is not executed */

 Pls do reply ASAP.



















-Original Message-
From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 24, 2006 6:38 PM
To: SQLite
Subject: [sqlite] Re: Stored procedures in triggers

A small correction: I was wrong about SQLite not supporting cascading 
triggers. Cascading triggers are supported, recursive triggers are not. 
That is, if you have an insert trigger on table A which, say, inserts 
into table B, and there's an insert trigger on table B, it will run. But

if this latter trigger turns around and inserts into table A, the A 
trigger won't run again.

Igor Tandetnik

Ran <[EMAIL PROTECTED]> wrote:
> See the email of Igor Tandetnik from 18-Dec-2005:
>
> "Vishal Kashyap" wrote
>> Is their any way we can write simple stored procedures or functions
>> in sqlite. If yes please do guide me I need this functionality in one
>> of my open source project.
>
> Not in the usual sense, meaning some language that gets stored in the
> database itself together with the data. The only thing that comes
> somewhat close is a trigger. It is possible to create a poor man's
> stored procedure like this:
>
> create table sp_dosomething (param1 int, param2 char);
> create trigger sp_dosomething_impl
> instead of insert on sp_dosomething
> begin
> -- one or more sql statements possibly referring to
> -- new.param1 and new.param2
> end;
>
> -- To invoke:
> insert into sp_dosomething values(1, 'hello');
>
>
> Note that triggers are rather limited in what they can do. They are
> just
> a bunch of SQL statements, there is no control flow (loops, if then
> else, goto) beyond what little you can implement in pure SQL. They
> cannot return values, except indirectly by inserting or updating some
> table. SQLite does not support cascading triggers, so if your "stored
> procedure" manipulates some table to which regular triggers are
> attached
> (perhaps ensuring data integrity), those triggers won't run.
>
>
> SQLite supports custom functions - see sqlite3_create_function[16].
> You
> write them in C (or any other language that has bindings to SQLite
> API)
> and you have to install them every time you open a DB handle with
> sqlite3_open, before you can refer to them in your SQL statements.
> They
> are not stored in the database file itself.
>
> Finally, SQLite prepared statements (sqlite_prepare) can be thought of
> as simple stored procedures defined in your program. Similar to custom
> functions, you can prepare a statement right after opening the
> database,
> then keep it around.
>
> Igor Tandetnik
>
>
>
> Ran
>
>
> On 3/24/06, Chethana, Rao (IE10)
> <[EMAIL PROTECTED]> wrote:
>>
>>   Hi,
>>
>> Can you tell me how to create a stored procedure in an sqlite3
>> database and use the same in a trigger? Please provide an example
>> (as complete as possible). In the stored procedure I need to execute
>> few queries on some tables. Can you tell me how to do that also?
>>
>> Any help is deeply appreciated.
>>
>> Best Regards,
>>
>> Chethana 



[sqlite] Stored procedures in triggers

2006-03-24 Thread Chethana, Rao \(IE10\)









 Hi, 

Can you tell me how to create a stored procedure
in an sqlite3 database and use the same in a trigger? Please provide an example
(as complete as possible). In the stored procedure I need to execute few
queries on some tables. Can you tell me how to do that also?

Any help is deeply appreciated.

Best Regards,

Chethana








[sqlite] help in triggers(calling functions)

2006-03-18 Thread Chethana, Rao \(IE10\)
Hello!

 

How do I call functions(user defined) or  stored procedures from
triggers in sqlite?

For example,  how do I do this in sqlite?

  CREATE TRIGGER TrgIns_PTable AFTER
INSERT ON PTable FOR EACH ROW EXECUTE PROCEDURE PP_InsPTable(); 

 

 

Please do reply ASAP.

Awaiting reply.

 

 

Thank you.

 

Kind regards,

 Chethana.

 

 

 

 

 



RE: [sqlite] File locking additions

2006-03-09 Thread Chethana, Rao \(IE10\)
Hello!

Why do u need semicolon there?
U can just give--   Select Name,Surname,' ',Address as Details from
personm where persID = 1098

Think this works.


-Original Message-
From: Roger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 09, 2006 12:01 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] File locking additions

Hello guys.

I have a small problem.I am trying to write some sql queries. Whenever i
put a semicolon, sqlite returns an error immediately.for instance if i
select as follows

Select Name||" "||Surname||" ; "||Address as "Details
>From Person
where PersID=1098


RE: [sqlite] OT: Donations?

2006-02-27 Thread Chethana, Rao \(IE10\)
Hi!

Did u enquire about donations to sqlite.org ?   what reply u got?

-Original Message-
From: Firman Wandayandi [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 1:08 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] OT: Donations?

On 2/27/06, Chethana, Rao (IE10) <[EMAIL PROTECTED]> wrote:
> Hello!
>
> That's a good idea!
> I think u can post ur question to www.sqlite.org & see. They'll b able
> to tell u.
>

Post to sqlite.org? why not here? that's nice to get some donations.

--
Firman Wandayandi
Never Dreamt Before: http://firman.dotgeek.org/
Wishlist: http://www.amazon.com/gp/registry/1AAN8NZBHW2W9


RE: [sqlite] File format changed !!

2006-02-27 Thread Chethana, Rao \(IE10\)
Hi!

Just use select * from sqlite_master;




-Original Message-
From: Pavan Savoy [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 10:13 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] File format changed !!

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


RE: [sqlite] OT: Donations?

2006-02-27 Thread Chethana, Rao \(IE10\)
Hello!

That's a good idea!
I think u can post ur question to www.sqlite.org & see. They'll b able
to tell u.


-Original Message-
From: Denis Sbragion [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 12:50 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] OT: Donations?

Hello,

might be a bit off topic, but, is there any way to make donations to
SQLite? I
haven't been able to find informations on the SQLite web site.

Bye,

-- 
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it