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" (. I have

[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!

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 <

[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

[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

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

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

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

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

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

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")

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

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

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

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

[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

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

[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

[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+

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