Re: [sqlite] a bunch of questions about SQLite from new user

2004-10-26 Thread Vladimir Vukicevic
I can take a crack at some of these... On Tue, 26 Oct 2004 23:17:00 -0500, Tom <[EMAIL PROTECTED]> wrote: > 1. sqlite3_prepare( > sqlite3 *db, > const char *zSql, > int nBytes, > sqlite3_stmt **ppStmt, > const char **

[sqlite] a bunch of questions about SQLite from new user

2004-10-26 Thread Tom
Hello, I am a new SQLite user. I look at the documentation and there are a couple of things which are not clear to me and I could not find info in documentation or google. I could probably write some code to test and find answers to the following questions but it actually might be better to ask

Re[2]: [sqlite] Index question

2004-10-26 Thread Taka Muraoka
UP> Hi Taka, >> I have an object model that looks like this: >> >> OBJECT 1 >> - item 1 >> - item 2 >> - item 3 >> >> OBJECT 2 >> - item 1 >> - item 2 >> >> OBJECT 3 >> - etc... >> >> These are stored in tables like this: >> >> CREATE TABLE object >> ( >

Re: [sqlite] Page sizes other than 1024 bytes

2004-10-26 Thread Joel Lucsy
On Tue, 26 Oct 2004 16:24:58 -0500 (EST), Clay Dowling <[EMAIL PROTECTED]> wrote: > Is there a chance that it's related to block size on the disk? > Traditionally with ISAM systems matching page size to block size was the > key to good performance. I seem to recall that NTFS defaults to 4096 byte

Re: [sqlite] Page sizes other than 1024 bytes

2004-10-26 Thread Clay Dowling
Ulrik Petersen said: > However, slightly off-topic, but still about page sizes: I have found > empirically that a page size of 4096 gives better performance on Windows > (particularly Windows 9X). > > The SQLite source (pager.h if I am not mistaken) says that a page size of > 1024 seems to be be

Re: [sqlite] Page sizes other than 1024 bytes

2004-10-26 Thread Ulrik Petersen
> Is there anybody using a non-power-of-2 database page size? > If I modify SQLite so that you cannot select a page size > that is not a power of two, will it break anybody's code? I don't use a non-power-of-2 database page size, so I can't comment on the above. However, slightly off-topic, but s

[sqlite] Page sizes other than 1024 bytes

2004-10-26 Thread D. Richard Hipp
The default page size for an SQLite database is 1024 bytes. The pagesize pragma can be used to change this value to any number between 512 and 65536. However, I just discovered a bug such that if you chose a page size that is not a power of two, the database will be corrupted if its size ever grows

Re: [sqlite] Re: Bug with sqlite3_column_decltype?

2004-10-26 Thread D. Richard Hipp
George Ionescu wrote: Gerhard Haering wrote: Where did you get this interesting syntax with AFFINITY from? Check out http://www.sqlite.org/cvstrac/getfile/sqlite/doc/affinity.html That document is obsolete and so I have now moved it into the CVS attic. The correct documentation for types in SQLite

[sqlite] Re: Bug with sqlite3_column_decltype?

2004-10-26 Thread George Ionescu
Gerhard Haering wrote: Where did you get this interesting syntax with AFFINITY from? Check out http://www.sqlite.org/cvstrac/getfile/sqlite/doc/affinity.html Clay Dowling wrote: Try this instead: CREATE TABLE Orders (OrderID int, CustomerID varchar(5)); Of course I could try it. However, I'd like t

[sqlite] INSTR

2004-10-26 Thread Drew, Stephen
Hello,   Is there a similar function in standard SQLite?  I've had a quick scan of the documentation and it seems like there isn't, but I thought I'd double-check.   Thanks in advance, Stephen Drew  

[sqlite] PRAGMA short_column_names not working in 3.0.8

2004-10-26 Thread Raymond Irving
Hello Everyone, I've download sqlite 3.0.8 and opened a database to try the PRAGMA short_column_names feature but it did not work. It only returned blank column names. Any ideas or fixed? Here's the result from the sqlite3 console with .headers on: sqlite> pragma short_column_names = on ...>

Re: [sqlite] Preventing TableNames.columns inside SELECT

2004-10-26 Thread Raymond Irving
Thanks, I'll give it a try with version 3.0.8 __ Raymond Irving --- John LeSueur <[EMAIL PROTECTED]> wrote: > Raymond Irving wrote: > > >Hi All, > > > >Please consider the following example: > > > >I would like to only return the field names and not > >table.fieldnames... > > > >SELECT t1.colu

Re: [sqlite] Bug with sqlite3_column_decltype?

2004-10-26 Thread Gerhard Haering
On Tue, Oct 26, 2004 at 03:58:07PM +0200, George Ionescu wrote: > [...] I have the following table definition: > > CREATE TABLE [Orders] ([OrderID] AFFINITY INT, [CustomerID] AFFINITY > VARCHAR(5)) Where did you get this interesting syntax with AFFINITY from? -- Gerhard -- A: Because it messes

[sqlite] Index question

2004-10-26 Thread Taka Muraoka
I have an object model that looks like this: OBJECT 1 - item 1 - item 2 - item 3 OBJECT 2 - item 1 - item 2 OBJECT 3 - etc... These are stored in tables like this: CREATE TABLE object ( object_id INTEGER PRIMARY KEY ) ; CREATE TABLE

RE: [sqlite] Using SQLlite as a db in an IIS website directory

2004-10-26 Thread Clay Dowling
Roger Hawkins said: > Thks for the info.. > > How do I find out which account IIS is running under? > By default it runs on the machine guest internet account, which is usually IUSR_MACHINENAME For a web app you can also specify which user the application should be run as in IIS Admin. If you'r

Re: [sqlite] Bug with sqlite3_column_decltype?

2004-10-26 Thread Clay Dowling
George Ionescu said: > CREATE TABLE [Orders] ([OrderID] AFFINITY INT, [CustomerID] AFFINITY > VARCHAR(5)) > > AFFINITYINT,[Cu Try this instead: CREATE TABLE Orders (OrderID int, CustomerID varchar(5)); That should give you something closer to the expected results. Clay -- Lazarus Notes from

RE: [sqlite] Using SQLlite as a db in an IIS website directory

2004-10-26 Thread Roger Hawkins
Thks for the info.. How do I find out which account IIS is running under? Cheers ;~) > -Original Message- > From: CARIOTOGLOU MIKE [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 26 October 2004 10:07 PM > To: '[EMAIL PROTECTED]' > Subject: RE: [sqlite] Using SQLlite as a db in an IIS websit

[sqlite] Bug with sqlite3_column_decltype?

2004-10-26 Thread George Ionescu
Hello Dr. Hipp, Hello sqlite users I have the following table definition: CREATE TABLE [Orders] ([OrderID] AFFINITY INT, [CustomerID] AFFINITY VARCHAR(5)) when I compile a statement with sqlite3_prepare16 ( SELECT * FROM Orders ), ask for sqlite3_column_count and retrieve values, all is ok (res

RE: [sqlite] Using SQLlite as a db in an IIS website directory

2004-10-26 Thread CARIOTOGLOU MIKE
first, find out which account IIS is running under. chances are it is IUSR_. then, go to the directory the DB is in (the file system, NOT the IIS virtual root), and give full rights to this account. if this does not work, do the same for the IWAM_ account. also, check that the virtual directory yo

[sqlite] Using SQLlite as a db in an IIS website directory

2004-10-26 Thread Roger Hawkins
Hi, On my win2000 Pro machine everything works fine running SQLlite using SQLite.net as a database for a web application. On my 2003 server however I get: 'attempt to write a readonly database' when trying to perform a write to the db. I can read from db fine. There appears to be nothing obvio

Re: [sqlite] Preventing TableNames.columns inside SELECT

2004-10-26 Thread John LeSueur
Raymond Irving wrote: Hi All, Please consider the following example: I would like to only return the field names and not table.fieldnames... SELECT t1.column1,t2.clumn2 FROM tableA t1,table2 t2 ..In MSSQL and others the recordset should only show column1, column2 but in SQLite it shows t1.column1 a