RE: [sqlite] Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
That's a real pumper.  How do you alter constraints on existing tables
??!

-Original Message-
From: Trevor Talbot [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 4:39 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is this SQL command supported?

On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote:
> I wonder if there any SQL commands that are not supported by SQLite. I
> am trying to read an entire DDL script file as a string and pass it as
> one SQL command to SQLite. The same script worked fine in Firebird
batch
> execution.  But with SQLite I get an SQLite exception:
>
> {"SQLite error\r\nnear \"DOMAIN\": syntax error"}

DOMAINs are not supported.

http://sqlite.org/lang.html
http://sqlite.org/omitted.html


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Re: Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
Thanks for the answer.  I have looked into that list and it seems that
altering a table for forging constrains is not working as well, since I
get a similar error on ALTER commands with constraints.  How can I
change constraints on already existing tables? I 'am trying to run this
command:

-- Add foreign key constraints to table assetdownload.
alter table assetdownload
add constraint assets_assetdownload_FK1 foreign key (assetId)
 references assets (assetId)
ON UPDATE CASCADE ON DELETE CASCADE;


Cheers?



-Original Message-
From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 4:29 PM
To: SQLite
Subject: [sqlite] Re: Is this SQL command supported?

Ahmed Sulaiman <[EMAIL PROTECTED]>
wrote:
> I wonder if there any SQL commands that are not supported by SQLite.

Yes. See http://sqlite.org/lang.html for a complete documentation of the

SQL dialect supported by SQLite.

> {"SQLite error\r\nnear \"DOMAIN\": syntax error"}
>
> CREATE DOMAIN D_BOOLEAN AS SMALLINT DEFAULT 0
> CHECK (VALUE BETWEEN 0 AND 1);

SQLite doesn't support CREATE DOMAIN statement.

Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
I wonder if there any SQL commands that are not supported by SQLite. I
am trying to read an entire DDL script file as a string and pass it as
one SQL command to SQLite. The same script worked fine in Firebird batch
execution.  But with SQLite I get an SQLite exception:

{"SQLite error\r\nnear \"DOMAIN\": syntax error"}
 

Here is the part that it complains about right at the beginning of the
script:

CREATE DOMAIN D_BOOLEAN AS SMALLINT DEFAULT 0
CHECK (VALUE BETWEEN 0 AND 1);

Any Advise?

Cheers


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite on Mac

2007-07-20 Thread Ahmed Sulaiman
Thanks for the heads up. I have studied that and we have decided to go
with SQLite, it suits our needs :)

Cheers

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 20, 2007 11:50 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite on Mac

"Ahmed Sulaiman" <[EMAIL PROTECTED]> wrote:
> 
> We are now just making strategic decision as of which database engine
to
> choose that would give us better cross platform support. 
> 

Be sure to visit http://www.sqlite.org/whentouse.html to make
sure the SQLite is suited for whatever it is you are wanting
to do with your database.

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



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite on Mac

2007-07-20 Thread Ahmed Sulaiman
Thanks guys for the informative replies :)

We are now just making strategic decision as of which database engine to
choose that would give us better cross platform support. 

And with such a wonderful tech/community support, I believe SQLite is
the right answer :)

Cheers

-Original Message-
From: T [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 20, 2007 12:08 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite on Mac

Hi Ahmed,

> Does SQLite work on Mac, and if yes, is there any Mac enabled version
> that I could download?

As others have mentioned, yes, SQLite not only runs on a Mac, but it's  
already installed as of Mac OS X 10.4 "Tiger" and after. Apple uses it  
for indexing email in the Mail application, Core Data in XCode  
development, and media management in high end apps like Aperture.

If you have an earlier Mac OS X version, or want the very latest  
SQLite version, you can download it from the first link under the  
"Source Code" heading at:
http://www.sqlite.org/download.html
You'll need the Apple Developer Tools installed on your computer,  
which comes free with your computer or Mac OS X install discs, to  
compile and install it in about four steps.

To try it out, launch the Terminal program (already in your / 
Applications/Utilities folder) and type:

sqlite3 MyTestDatabase

then in the sqlite3 shell, type any sqlite commands, such as:

.help
.quit
create table MyTestTable( Name text, Age integer);

and so on.

There is also a range of GUI apps for the Mac for editing SQLite  
databases.

Reply here if you need more info.

Tom



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQLite on Mac

2007-07-19 Thread Ahmed Sulaiman
Hi all,

Does SQLite work on Mac, and if yes, is there any Mac enabled version
that I could download? 

Cheers


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Does Transaction object roll back automatically on exceptions?

2007-07-16 Thread Ahmed Sulaiman
Hi all,

Is it necessary to run a "SELECT" command in between a transaction?  I
have few places in my code where I have a command that reads some data
from a table, and I wonder if I should begin/commit a transaction? Is
there any performance issues if I did or didn't do that?

Regards


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Does Transaction object roll back automatically on exceptions?

2007-07-16 Thread Ahmed Sulaiman
Thanks for the reply.  I have got the code for the binding and it
actually does roll back automatically in case of exceptions. :)

Ahmed

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 16, 2007 12:14 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Does Transaction object roll back automatically on
exceptions?

"Ahmed Sulaiman" <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I have tried this question in the forum with no answer, so I decide to
> give it a try here :)
> 
> I am using the "Using" statements in C# to handle the closing of
SQLite
> connection, transaction and command objects.  I have this setup in
> different places in my code (Generic methods returning SQLite objects)
>   
> using (IDbConnection conn = CreateConnection())
>  {
>conn.Open();
>using (IDbTransaction transaction = conn.BeginTransaction())
> {
> Dosomething();
> transaction.Commit();
> }  
>} 
> 
> My question, what happens if there was an exception inside the
> transaction using block? I know that the transaction object would be
> closed and disposed, but does the traction roll back automatically by
> the SQLite engine, or do I need to have special logic for that? What
is
> the suggested best practices in this case?
>  

In the equivalent code in TCL, the transaction would
rollback automatically.  But I do not know anything
about the C# bindings that you are using, so I do not
know what will happen in your case.  Have you tried it
to see?  What does the documentation that comes with
your SQLite C# bindings say?  It is the C# bindings,
not the SQLite core, that will determine this behavior.

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



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Does Transaction object roll back automatically on exceptions?

2007-07-16 Thread Ahmed Sulaiman
Hi all,

I have tried this question in the forum with no answer, so I decide to
give it a try here :)

I am using the "Using" statements in C# to handle the closing of SQLite
connection, transaction and command objects.  I have this setup in
different places in my code (Generic methods returning SQLite objects)
  
using (IDbConnection conn = CreateConnection())
 {
   conn.Open();
   using (IDbTransaction transaction = conn.BeginTransaction())
{
Dosomething();
transaction.Commit();
}  
   } 

My question, what happens if there was an exception inside the
transaction using block? I know that the transaction object would be
closed and disposed, but does the traction roll back automatically by
the SQLite engine, or do I need to have special logic for that? What is
the suggested best practices in this case?
 
Cheers


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Using SQlite with .NET

2007-07-09 Thread Ahmed Sulaiman
Thanks for the heads up :)

-Original Message-
From: Samuel R. Neff [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 06, 2007 2:49 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Using SQlite with .NET

There are a few .NET wrappers for SQLite.  I would suggest
System.Data.SQLite available here:

http://sqlite.phxsoftware.com/

And for ADO.NET 2.0 development use version 1.0.43.  For LINQ stuff use
2.0.35.

Also wrapper-specific questions will probably get quicker responses in
their
dedicated forums.

http://sqlite.phxsoftware.com/forums/default.aspx

I haven't used the feature but I'm pretty sure that provider adds
support
for viewing/editing SQLite within Visual Studio 2005.

HTH,

Sam



---
We're Hiring! Seeking a passionate developer to join our team building
products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: Ahmed Sulaiman [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 06, 2007 2:02 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Using SQlite with .NET

Hi,

 

I am trying to evaluate the use of SQLite with .NET in out project. I
have downloaded the ADO.NET 2 adaptor for SQLite from source forge. But
I was not sure which version do I need to download (if any) from the
download page to get myself started. Could you please give me some
direction, links would be great. Also, is there a database
viewer/updater to populate tables with some test date in SQLite?

 

Regards

Ahmed




-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Using SQlite with .NET

2007-07-06 Thread Ahmed Sulaiman
Hi,

 

I am trying to evaluate the use of SQLite with .NET in out project. I
have downloaded the ADO.NET 2 adaptor for SQLite from source forge. But
I was not sure which version do I need to download (if any) from the
download page to get myself started. Could you please give me some
direction, links would be great. Also, is there a database
viewer/updater to populate tables with some test date in SQLite?

 

Regards

Ahmed



RE: [sqlite] SQLite 64-Bit

2007-07-04 Thread Ahmed Sulaiman
Thanks Ian,.. I will give it a try :)

-Original Message-
From: Ian Frosst [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 3:26 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite 64-Bit

I build SQLite's code using Visual Studio 2005 using the 64 bit tool
chain,
and it runs without a hitch.  I haven't seen a pre-compiled library for
it,
so you may have to get your hands a bit dirty.  Building it is a snap
though; add the sqlite3.c and sqlite3.h files to a project, define
NO_TCL
and THREADSAFE in the preprocessor for your various configurations, and
voila.

On 7/4/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>
>
> We are interested in using the SQLite in our project. I wonder if
there
> a version that works in 64-Bit machine? I have looked in the download
> page and noticed that only Win32 (x86) builds are available.
>
>
>
> Regards
>
>
>
> Ahmed
>
>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQLite 64-Bit

2007-07-04 Thread Ahmed Sulaiman
Hi all,

 

We are interested in using the SQLite in our project. I wonder if there
a version that works in 64-Bit machine? I have looked in the download
page and noticed that only Win32 (x86) builds are available.

 

Regards

 

Ahmed