Re: [sqlite] Error: malformed database schema ...

2005-02-13 Thread D. Richard Hipp
On Sun, 2005-02-13 at 21:40 -0800, Jim Dodgen wrote: > attach database bar as ref; > create table ref.table_field >( > name varchar(255), > nbr varchar(255) >); > create unique index ref.table_field_name on ref.table_field (name);

[sqlite] Error: malformed database schema ...

2005-02-13 Thread Jim Dodgen
sqlite 3.0.8, windows XP I'm attempting to create some tables and indexes in a attached database (bar) and after everything is complete and I go back in to the previously attached database and do a .schema I get the following: "Error: malformed database schema - index table_field_name cannot ref

[sqlite] Problem with this simple example

2005-02-13 Thread Dave Furey
Below is a very simplied example of what I'm trying to do with a recursive routine call: == sqlite3_prepare (hDB,CstrCommand,strlen(CstrCommand),&ppStmt,&CstrTail); while ( sqlite3_step(ppStmt) == SQLITE_ROW ) { sqlite3_prepare (hDB,Cst

Re: [sqlite] VACUUM question

2005-02-13 Thread D. Richard Hipp
On Fri, 2005-02-11 at 21:04 -0500, [EMAIL PROTECTED] wrote: > "D. Richard Hipp" <[EMAIL PROTECTED]> writes: > > > While on the airplane, I was able to reproduce the problem > > and confirm that it is possible to corrupt a database > > as described above. I've just checked in a tentative fix. > >

Re: [sqlite] Windows Unicode Support

2005-02-13 Thread Jeff Thompson
D. Richard Hipp wrote: On Sun, 2005-02-13 at 16:18 -0600, Jeff Thompson wrote: sqlite3_exec sqlite3_mprintf I was wondering why there are no unicode versions of these (and possibly others) functions? sqlite3_exec is implemented in using other published APIs. It is a convenience wrapper p

Re: [sqlite] Does anyone know why the current compiled from CVS can't run in Windows?

2005-02-13 Thread [EMAIL PROTECTED]
I have installed the cygwin, since I may need to CVS source code in the future as well. Please show us how to preprocessing the source-code checked out from CVS. Thanks, Ming D. Richard Hipp wrote: On Sun, 2005-02-13 at 19:45 -0400, [EMAIL PROTECTED] wrote: Please show us how to compile the C

Re: [sqlite] Does anyone know why the current compiled from CVS can't run in Windows?

2005-02-13 Thread D. Richard Hipp
On Sun, 2005-02-13 at 19:45 -0400, [EMAIL PROTECTED] wrote: > Please show us how to compile the CVS source, since I couldn't find any > instructions on the wiki website. > Using cygwin to do the source-code preprocessing if you want to go that route. Or wait a day or two. 3.1.2 will probably b

Re: [sqlite] Best way to check for existence of a table?

2005-02-13 Thread D. Richard Hipp
On Sun, 2005-02-13 at 22:58 +, Richard Boyd wrote: > > > I need a way to check if a table exists from some C code. SELECT count(*) FROM sqlite_master WHERE name= AND type='table'; -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Does anyone know why the current compiled from CVS can't run in Windows?

2005-02-13 Thread [EMAIL PROTECTED]
Hi D. Richard Hipp, Good to know that you can compile in CVS source in your system, which only means I did it wrong. 1. I am using windows 2000 as well, with Visual Studio 2003. Since CVS don't have all the file to nessory compiled in VS2003, I download the latest beta (3.1.1beta) from your webs

Re: [sqlite] Windows Unicode Support

2005-02-13 Thread D. Richard Hipp
On Sun, 2005-02-13 at 16:18 -0600, Jeff Thompson wrote: > sqlite3_exec > sqlite3_mprintf > > I was wondering why there are no unicode versions > of these (and possibly others) functions? > sqlite3_exec is implemented in using other published APIs. It is a convenience wrapper provided for histo

Re: [sqlite] Does anyone know why the current compiled from CVS can't run in Windows?

2005-02-13 Thread D. Richard Hipp
On Sun, 2005-02-13 at 14:57 -0400, [EMAIL PROTECTED] wrote: > Hello All, > > I wonder does anyone know the new compiled sqlite from CVS can't run in > Windows, it always crashes since last week?? > It passes all regression tests under win2k (which is the most recent version of windows I have.)

[sqlite] Best way to check for existence of a table?

2005-02-13 Thread Richard Boyd
Hi,   I need a way to check if a table exists from some C code. I wrote some code to try to select a row from a table and then checked the error result. However, the error code is always ‘1’ (which is just a general SQLITE_ERROR) if the table does not exist. Is there any way I can differe

[sqlite] Windows Unicode Support

2005-02-13 Thread Jeff Thompson
Hi, I've recently gone through the work to convert my windows application to unicode. A ran across a couple of the sqlite3 API calls that don't seem to have unicode versions, namely: sqlite3_exec sqlite3_mprintf I switched all of my sqlite3_mprintf/sqlite3_exec calls to sqlite3_prepare16/sqlite

[sqlite] Questions regarding sqlite3_column_decltype

2005-02-13 Thread Michael Ruck
Hi, Maybe someone can answer me a couple of questions regarding above function: I've seen that it doesn't return the declaration type for views in 3.0.8. Is this by design? Are there any plans to change this so that queries against views return the column types of the tables? I've looked at th

[sqlite] Does anyone know why the current compiled from CVS can't run in Windows?

2005-02-13 Thread [EMAIL PROTECTED]
Hello All, I wonder does anyone know the new compiled sqlite from CVS can't run in Windows, it always crashes since last week?? Thanks, Ming

Re: [sqlite] VACUUM question

2005-02-13 Thread Derrell . Lipman
Clay Dowling <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > >>Do you know if this bug exist in 2.8.15 as well? If so, is the fix >>back-portable? >> >> > Darrell, > > I believe that the VACUUM statement didn't exist in 2.8.x, so there shouldn't > be a problem. Sure it does. I use it i

Re: [sqlite] VACUUM question

2005-02-13 Thread Ulrik Petersen
Clay and Derrell, Clay Dowling wrote: [EMAIL PROTECTED] wrote: Do you know if this bug exist in 2.8.15 as well? If so, is the fix back-portable? Darrell, I believe that the VACUUM statement didn't exist in 2.8.x, so there shouldn't be a problem. That's not true. It did exist in 2.8.15. I've

Re: [sqlite] VACUUM question

2005-02-13 Thread Clay Dowling
[EMAIL PROTECTED] wrote: Do you know if this bug exist in 2.8.15 as well? If so, is the fix back-portable? Darrell, I believe that the VACUUM statement didn't exist in 2.8.x, so there shouldn't be a problem. Clay