Re: [sqlite] Some questions on hierarchical data (nested set model)

2007-04-06 Thread P Kishor
I am very interested in hearing on this as well. A recommendation has been Joe Celko's book "Trees and Hierarchies in SQL for Smarties" (.

[sqlite] in memory databases

2007-04-06 Thread Mike Johnston
Hi, Is it possible to have memory databases located at a specific memory address? I have a battery backed memory I'd like to store specific information apart from the main database. Thanks, Mike - No need to miss a message. Get email on-the-go with Yahoo! Ma

RE: [sqlite] Implementing type find on a large result set

2007-04-06 Thread Samuel R. Neff
Instead of using LIKE use '<' to get a count of records before the one your targeting. Something like this would work (names are from my schema): SELECT PermissionRef FROM LU_Permissions LIMIT 10 OFFSET ( SELECT COUNT(*) FROM LU_Permissions WHERE PermissionRef < 'Sc'

Re: AW: AW: AW: [sqlite] Function Language

2007-04-06 Thread John Stanton
Sure. Michael Ruck wrote: If you come up with something, please share it. Mike -Ursprüngliche Nachricht- Von: John Stanton [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 6. April 2007 20:49 An: sqlite-users@sqlite.org Betreff: Re: AW: AW: [sqlite] Function Language By using making t

[sqlite] Re: Re: Re: Currency Formatting within SQLite

2007-04-06 Thread Igor Tandetnik
Mitchell Vincent <[EMAIL PROTECTED]> wrote: The only problem is my lack of understanding on how implementing custom functions in SQLite works. I'm sure your idea is sound I just don't know the details of implementing it. For instance, is this something that has to be compiled into the DLL, or is

AW: AW: AW: [sqlite] Function Language

2007-04-06 Thread Michael Ruck
If you come up with something, please share it. Mike -Ursprüngliche Nachricht- Von: John Stanton [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 6. April 2007 20:49 An: sqlite-users@sqlite.org Betreff: Re: AW: AW: [sqlite] Function Language By using making the connection from browser to s

Re: [sqlite] sqlite3 extensions; was: Bug#404242: closed by Laszlo Boszormenyi (GCS) <[EMAIL PROTECTED]> (Bug#404242: fixed in sqlite3 3.3.14-1)

2007-04-06 Thread drh
"Liam Healy" <[EMAIL PROTECTED]> wrote: > As far as I know, they've always been experimental, so I'm not sure > what changed between 3.3.8 and 3.3.14. And yes, I really need it. > I have never compiled sqlite, only used the Debian compiled version, so > I am not sure what needs to be done here. I

[sqlite] Re: sqlite3 extensions; was: Re: Bug#404242: closed by Laszlo Boszormenyi (GCS) <[EMAIL PROTECTED]> (Bug#404242: fixed in sqlite3 3.3.14-1)

2007-04-06 Thread Liam Healy
As far as I know, they've always been experimental, so I'm not sure what changed between 3.3.8 and 3.3.14. And yes, I really need it. I have never compiled sqlite, only used the Debian compiled version, so I am not sure what needs to be done here. I am ccing the sqlite mailing list in hopes that

RE: [sqlite] sqlite3.exe .import command

2007-04-06 Thread Griggs, Donald
Ouch! I of course meant to write "can't" instead of "can" in the (corrected) sentence below. E.g. if you are importing a list of names, you *can't* just surround the name with quote chars, such as: "John Smith, Jr.",Anytown,USA --

Re: [sqlite] Re: Re: Currency Formatting within SQLite

2007-04-06 Thread John Stanton
Just look at the Sqlite source and use the function code there as a template. For a custome function look up the Sqlite API documentation on sqlite.org. Mitchell Vincent wrote: Hi Igor! The only problem is my lack of understanding on how implementing custom functions in SQLite works. I'm sure

RE: [sqlite] sqlite3.exe .import command

2007-04-06 Thread Griggs, Donald
Re: "...The file I am importing is comma delimited text ..." I believe the default separator is the vertical bar (virgule, "|"), but as Igor wrote, you can easily change it with: .separator , I *don't* think you can quote commas which might appear in your text. E.g. if you are importing a l

Re: [sqlite] Re: Re: Currency Formatting within SQLite

2007-04-06 Thread Mitchell Vincent
Hi Igor! The only problem is my lack of understanding on how implementing custom functions in SQLite works. I'm sure your idea is sound I just don't know the details of implementing it. For instance, is this something that has to be compiled into the DLL, or is it database file specific? Now tha

Re: AW: AW: [sqlite] Function Language

2007-04-06 Thread John Stanton
By using making the connection from browser to server an RPC model I have mapped the interface to the database instead of trying to map the database to the Javascript objects. That also minimizes the network traffic. My application server design has a criterion that network traffic should be

[sqlite] Re: sqlite3.exe .import command

2007-04-06 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: I get a message that 13 fields were expected but only one found. The file I am importing is comma delimited text with one line per record. I could find no documentation on format expectations of the .import command. I believe it expects TABs by default, but you can c

[sqlite] Re: Re: Currency Formatting within SQLite

2007-04-06 Thread Igor Tandetnik
Mitchell Vincent <[EMAIL PROTECTED]> wrote: Yes, I know about creating a function but I'm wondering if I can hook into the already-existing Windows API function for it. Currency formatting is quite complicated (much more than just storing a currency "symbol") and Windows has already done the leg

[sqlite] Implementing type find on a large result set

2007-04-06 Thread Steve Krulewitz
Hey all -- In the UI I am working on, I have a list box that shows a sorted list of query results (for example, a big list of names). Since the query result is very big, I am reading the rows into the list box on demand in chunks using the OFFSET and LIMIT clauses in the query. I would like to

Re: [sqlite] SQLite and nested transactions

2007-04-06 Thread rhurst2
Darren Duncan <[EMAIL PROTECTED]> wrote: > At 4:38 PM -0700 4/5/07, Darren Duncan wrote: > >To get this to work would basically involve having additional > >journal files, with the original one being for the parent-most > >transaction, and with an additional one for each transaction level,

Re: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread John Stanton
You can call the Windows API from a custom function. Mitchell Vincent wrote: Yes, I know about creating a function but I'm wondering if I can hook into the already-existing Windows API function for it. Currency formatting is quite complicated (much more than just storing a currency "symbol") and

RE: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Samuel R. Neff
I don't know exactly how to do it in C but in .NET it's pretty straightforward.. [SQLiteFunction(Name = "FormatCurrency", Arguments = -1, FuncType = FunctionType.Scalar)] public class SQLiteCurrency : SQLiteFunction { public override object Invoke(object[] args) {

[sqlite] sqlite3.exe .import command

2007-04-06 Thread jaime
I've configured SQLite with RonR and mongrel for use as a development environment on an XP system. I'm replacing an exiting applicaiton and need to migrate data into the new database. All seemed well until I tried to use the .import command in sqlite3.exe. I get a message that 13 fields were

Re: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Mitchell Vincent
It sounds so easy when you say it like that! :-) Thanks Mr, Neff! I'll get to reading! On 4/6/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: > Yes, I know about creating a function but I'm wondering if I can hook > into the already-existing Windows API function for it. You don't need to write

AW: AW: [sqlite] Function Language

2007-04-06 Thread Michael Ruck
How do you treat objects containing other objects? JS has the capabilities to build powerful object models with hashes etc. Objects, such as these don't map nicely to the relational model. I'm going a different way - I'm using static HTML, which requests JSON from the server and uses this to updat

RE: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Samuel R. Neff
> Yes, I know about creating a function but I'm wondering if I can hook > into the already-existing Windows API function for it. You don't need to write a totally custom function, just something that bridges the two API's. Create a function that implements the expected SQLite call spec and the

Re: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Joe Wilson
--- Mitchell Vincent <[EMAIL PROTECTED]> wrote: > Yes, I know about creating a function but I'm wondering if I can hook > into the already-existing Windows API function for it. Currency > formatting is quite complicated (much more than just storing a > currency "symbol") and Windows has already don

Re: [sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Mitchell Vincent
Yes, I know about creating a function but I'm wondering if I can hook into the already-existing Windows API function for it. Currency formatting is quite complicated (much more than just storing a currency "symbol") and Windows has already done the leg work - I just need to see gain access to the

[sqlite] Re: Currency Formatting within SQLite

2007-04-06 Thread Igor Tandetnik
Mitchell Vincent <[EMAIL PROTECTED]> wrote: I know it's a long shot but is it possible to use the Windows API GetCurrencyFormat() function to format currency strings? I need a layer between my database and report generator to properly format currency (money) strings for various countries. I as

Re: AW: [sqlite] Function Language

2007-04-06 Thread John Stanton
Thankyou for the thoughtful comments. It strikes me that a JS object and an Sqlite row map nicely. When I was writing the part of my application server which encapsulates Sqlite rows in JSON I was struck by how simple the interface was, particularly compared to XML which involves a little mor

[sqlite] Currency Formatting within SQLite

2007-04-06 Thread Mitchell Vincent
I know it's a long shot but is it possible to use the Windows API GetCurrencyFormat() function to format currency strings? I need a layer between my database and report generator to properly format currency (money) strings for various countries. -- - Mitchell Vincent - K Software - Innovative So

[sqlite] Some questions on hierarchical data (nested set model)

2007-04-06 Thread Jef Driesen
I want to store a tree in an sqlite database. My first choice was the adjacency list model: CREATE TABLE tree ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, parent_id INTEGER ); But this method requires multiple queries to display the entire tree (or a subtree) in my GUI (a gtk+ t

AW: [sqlite] Function Language

2007-04-06 Thread Michael Ruck
I am all for it and am very interested in your project as I'm working on something similar. I've been using JS to create dynamic HTML pages in combination with SQLite using a JSON wrapper from this list. The only issue I see here is the treatment of JS objects - there's again the OO and relation mi