
| # | User | Message | Date |
| 709 | Ashley | Are you able to connect to an existing db file? | 8-Apr 0:49 |
| 708 | Will | connect/log/create d ** User Error: SQLite out of memory ** Near: make error! reform ["SQLite" error] | 7-Apr 20:00 |
| 707 | Will | Thank you Ashley, have changed to v2 but get: | 7-Apr 20:00 |
| 706 | Ashley | Will, did you try modifying the following lines in the driver: *lib: load/library ... ; to call the correct version *prepare: make routine! ... ; to use "sqlite3_prepare_v2" instead of "sqlite3_prepare" | 7-Apr 10:47 |
| 705 | Robert | So, getting a database system that has much better / native Rebol support makes a lot of sense. Hopefully such a system will once be implemented on the C level for good performance etc. | 31-Mar 15:00 |
| 704 | Robert | But, it stays a SQL database not directly optimized for Rebol usage. | 31-Mar 14:59 |
| 703 | Robert | Ok, and please don't get me wrong. SQLite is nice because it's small and simple to attach to Rebol, thanks to the work of Ashley. So even for 10K records you can use it because the costs are low. | 31-Mar 14:59 |
| 702 | btiffin | I didn't expect to win the fight, but I wasn't really expecting to get pinned on the first move. :) But I'll struggle a little more. In the long run I think the simplicity of the pure REBOL solutions (and a little careful manual (or scripted) management) will have fewer headaches than a larger full scale ACID database (again in the small dataset arena). My opinion may vary over time and over projects...but not today. And sorry about clogging the SQLite chat. rebols could well build up a fair amount of expertise with this engine given that load/library is now open to all. | 31-Mar 14:33 |
| 701 | Robert | ;-) Are RebDB and TRETBASE ACID conform? | 31-Mar 8:34 |
| 700 | btiffin | Robert; I'll fight you on that. :) Depends on the scale. RebDB is beautiful for dbs under the 10K ish limit; TRETBASE is destined to be a very handy REBOL scripting database engine, and Paul has been hammering on some larger datasets, (not something I'd plan on, but it's being developed that way). So unless you are working in the 100K+ record arena, or need multiple user concurrency, I do think REBOL is the right tool for a database engine. | 30-Mar 15:15 |
| 699 | Robert | Tretbase? I think it's pur Rebol based, right? No I won't. I don't think Rebol is the right tool for a database engine. | 30-Mar 8:19 |
| 698 | Robert | I got the DLL into 215KB :-) | 30-Mar 8:18 |
| 697 | Robert | I have 3.5.7 running on Windows together with Rebol. Works perfectly. | 30-Mar 8:18 |
| 696 | Will | maybe someone could check if 3.5.7 works with other platforms, if not, the sqlite.r maintainer can maybe spot an easy fix looking at http://www.sqlite.org/changes.html | 30-Mar 0:27 |
| 695 | Will | btw, are you all considering moving to treatbase? | 30-Mar 0:20 |
| 694 | Will | Thanks BrianH, i'll stick with 3.4.0 | 30-Mar 0:19 |
| 693 | Will | macport/sqlite3 version 3.5.4 worked but was 2 times slower than with 3.4.0 | 30-Mar 0:19 |
| 692 | BrianH | I expect that is due to changes in SQLite - it has changed the API a bit between 3.4.0 and 3.5.x | 30-Mar 0:02 |
| 691 | Will | I'm on os x 10.5.2, sqlite.r works fine with system preinstalled sqlite which is version 3.4.0, but doesn't work with latest version 3.5.7 (installed thru macports), is this known or os x specific? | 29-Mar 23:45 |
| 690 | Will | I wanted separate connections, but maybe I understand it wrong as it is not same as with mysql, so probably have to go with attach, thanks for the suggestions. | 29-Mar 23:44 |
| 689 | Robert | Why not use ATTACH? | 26-Mar 20:24 |
| 688 | Will | What I need is connect to a database , than in a second time, connect to another database, multiple connections open, no sqlite attach, possible? | 25-Mar 15:38 |
| 687 | Pavel | Or recompile the DLL with MAXDATABASES optinon increased | 25-Mar 6:57 |
| 686 | Pekr | with the driver, just use connect [db1 db2 db3] etc. IIRC, you can attach max 9 databases ... | 25-Mar 5:48 |
| 685 | Pekr | via the 'attach command? | 25-Mar 5:48 |
| 684 | Will | how can I connect to multiple databases at the same time without disconnecting? | 25-Mar 3:47 |
| 683 | GiuseppeC | I have found an interesting PHP project I would like to see ported on Rebol: http://adodb.sourceforge.net/ . It is a layer to access nearly all database available in this world with plugings. | 27-Dec 19:13 |
| 682 | Graham | It does raise interesting possibilities though for other things. | 20-Dec 20:41 |
| 681 | Graham | I'm storing user configuration data on the server (firebird) in a text blob field ... which is one serialized rebol object. Each time I change a configuation parameter, the whole object is saved back to the database. | 20-Dec 20:38 |
| 680 | Graham | Maybe Altme could use it to store local messages? | 20-Dec 20:37 |
| 679 | BrianH | Graham, that features page also says how to use SQLite to manage the files that store your application data. It's a cool hack. | 20-Dec 16:28 |
| 678 | BrianH | BTW, your new release doesn't seem to be downloading :( | 20-Dec 16:26 |
| 677 | BrianH | It is usually suggested that you build your own wrapper. REBOL/Services would be good for this. | 20-Dec 16:25 |
| 676 | Pekr | Is there any commonly suggested server mode? I mean tcp server, serialising requests, querying db and returning results back to users? | 20-Dec 6:32 |
| 675 | Ashley | From "Suggested Uses For SQLite" ( http://www.sqlite.org/features.html ) Website Database Because it requires no configuration and stores information in order disk files, SQLite is a popular choice as the database to back small to medium-sized websites Stand-in For An Enterprise RDBMS SQLite is often used as a surrogate for an enterprise RDBMS for demonstration purposes or for testing. SQLite is fast and requires no setup, which takes a lot of the hassle out of testing and which makes demos perky and easy to launch. | 20-Dec 5:19 |
| 674 | Ashley | Why not? It's ACID compliant and SQLite on a server where all file ops are local to the DB process seems OK to me. | 20-Dec 4:57 |
| 673 | Graham | probably not from what you say. | 19-Dec 23:14 |
| 672 | Graham | message board?? | 19-Dec 23:14 |
| 671 | Pekr | single user apps. Or fileshared ones. Embedded space. Advantage against mySQL embedded - SQL interface, free. Not easily used for server solutions, although could be solved by some server dispatching requests. No installation, just one single dll. | 19-Dec 22:53 |
| 670 | Graham | domain of use | 19-Dec 22:45 |
| 669 | Pekr | do you mean domain of usage? or? | 19-Dec 22:41 |
| 668 | Pekr | I can confirm it fixes data corruption for my case. Nice fix! | 19-Dec 22:41 |
| 667 | Pekr | what do you mean by "domain"? | 19-Dec 22:40 |
| 666 | Graham | what's sqlite's domain? | 19-Dec 22:37 |
| 665 | Pekr | New version released ... hehe, my ticket is part of the announcement :-) http://www.sqlite.org/news.html | 19-Dec 22:32 |
| 664 | Robert | I will make an update of the SQLite engine. I'm still using a rather old one. | 17-Dec 10:49 |
| 663 | Robert | Petr, congrats to really find a bug. I think I have been hit by this one too. | 17-Dec 10:49 |
| 662 | GiuseppeC | (Hoping in a free upgrade to R3) | 14-Dec 10:40 |
| 661 | GiuseppeC | I know. I will buy the /pro version next year and the whole package when my application will be ready. | 14-Dec 10:40 |
| 660 | BrianH | You don't need /Command SQLite, just library access and you get that in /Pro. There are other advantages to /Command though. | 14-Dec 10:32 |
| 659 | GiuseppeC | Now I expect a totally free Rebol/Command :-) | 14-Dec 10:30 |
| 658 | Pavel | To GiuseppeC there is a simple server based on SQLite look at SQLIte Wiki/SQLiteNetworks/uSQLiteServer a protocol to this is also in rebol.org. Anyway I can tell you a secret not to tell anybody: try to use rebface.exe from public available REBOL/SDK 2.7.5 BETA . It seems the /Pro restriction is not applied there for some reason and SQLite protocol works sweet for me there. You can got an idea run "local database backend" in one rebface process and application in another on rebol version of your choice. THANKS ASHLEY FOR A GOOD JOB. | 14-Dec 10:14 |
| 657 | GiuseppeC | NO, I want to use R2. I will be using R3 only for small projects and to help the comminity into debugging ! Have you already read what I think about people complaining R3. Your is a provocation !!! :-))))) | 13-Dec 20:15 |
| 656 | GiuseppeC | Then I'll give me Rebol/Pro or the whole command/sdk as present. | 13-Dec 20:14 |
| 655 | Pekr | Next year you will be using R3 :-) | 13-Dec 20:14 |
| 654 | GiuseppeC | Thanks pekr, I'll take a look at it. Next year, when I'll have more knoledge in RebGUI and Rebol2 I need to start a project which needs a database but it will be a single user project so SQL lite.is good enough. | 13-Dec 20:13 |
| 653 | Pekr | I hope that it gets fixed. | 13-Dec 20:11 |
| 652 | Pekr | Well - there is btn-sqlite (better than nothing) driver on rebol.org It works, with one bad effect - black console window appearing during the shell call. Just recently I put it on high priority list for W.7.6 to be fixed - all is needed is to set one flag for shell call .... | 13-Dec 20:11 |
| 651 | GiuseppeC | I ahve read in the doc that Rebol/Pro is necessary. Could you explain ? | 13-Dec 20:11 |
| 650 | Pekr | not necessarily. | 13-Dec 20:10 |
| 649 | GiuseppeC | Pekr, joining tables and having the data on disk are already two good points for SQL Lite. Obviusly I need Rebol/Pro licence before using it. | 13-Dec 20:06 |
| 648 | Pekr | That is still not full-fledget SQL server - those provide you with network independent access ... | 13-Dec 20:05 |
| 647 | GiuseppeC | Sorry Henrik my intentions where not to SPAM, I have later found the SQL lite group than the RebDB. Promise I'll write only once starting from now. Don't be upset :-) | 13-Dec 20:05 |
| 646 | Pekr | RebDB is also mostly - in memory only database. It does not live on hd. So - SQLite has one advantage here - it supports locking over file-shared SQLite database. | 13-Dec 20:05 |
| 645 | Pekr | SQLite has one main advantage - it supports SQL like syntax - you can join tables. I can't imagine living without those features anymore. | 13-Dec 20:03 |
| 644 | Henrik | "I ask here too" No need to cross post. We can all see the messages. | 13-Dec 19:54 |
| 643 | GiuseppeC | I ask here too, I want to adopt a database system for my rebol projects: which are the advantages of SQLLite over RebDB ? Why should adopt the first or the latter ? | 13-Dec 19:53 |
| 642 | Pekr | It seems I found a bug :-) http://www.sqlite.org/cvstrac/tktview?tn=2832 | 12-Dec 12:51 |
| 641 | PeterWood | I didn't think that you needed to write any code to backup individual tables in SQLite but just supply the table name as a parameter to the .dump command. I believe you can do this from the command line with SQLite3. | 2-Dec 9:59 |
| 640 | Pekr | well, SQLite is really cool, but simply noone can defend that one argument to me. I also communicated that "defficiency" on their ml, and simply put - it is the way it is. 'Attach function is just nasty workaround, nothing more. But - I talk about some 5% of feature, which would I found usefull, I will use sqlite anyway, as simply put there is no simple replacement to what it provides ... | 2-Dec 9:07 |
| 639 | Pekr | you can, by creating some code to do so, not by simply looking into the directory and using default OS facilities. | 2-Dec 9:05 |
| 638 | PeterWood | ..want ???? | 1-Dec 8:46 |
| 637 | PeterWood | ..then why don't you just back up the tables that you ? | 1-Dec 8:46 |
| 636 | Pekr | if that size is not necessarily 100MB and you don't need to back-up all the files all the time .... | 1-Dec 7:23 |
| 635 | Graham | me too | 30-Nov 20:25 |
| 634 | Ingo | Well, simplicity lies in the eyes of the beholder ... just having to back up a single file seems pretty easy to me ... | 30-Nov 19:23 |
| 633 | Pekr | Robert - tried that. Sadly it does not fix the issue. I will try to get to their ml and post the finding. Maybe I am doing something incorrectly, otoh I think that corruption should never happen, even if query would be nonsense :-) | 30-Nov 4:06 |
| 632 | Pekr | ... and they definitely should completly remove their claim that 1 file for db is an advantage. That is the most serious obstacle of sqlite ... simplicity comes via ability to easily backup ... one file per index, table ... | 30-Nov 3:53 |
| 631 | Pekr | gee, what are they doing? 50KB more size of dll to fix few bugs? They should aredy fix their docs whee they claim that other engine libraries start at 450KB ... they are nearly there too ... | 30-Nov 3:52 |
| 630 | Robert | Maybe that's the problem? | 29-Nov 17:30 |
| 629 | Robert | Petr, the new SQLite 3.5.3 release states: Fix a long-standing bug in INSERT INTO ... SELECT ... statements where the SELECT is compound. | 29-Nov 17:30 |
| 628 | Pekr | I found the culprit but I doubt it is enough to track possible bug. Issuing following statement will make subsequent update corrupting data: sql trim/lines "insert into prevodnik select kod, nazev, puvodni_kod, puvodni_kod, typ from produkty where substr(kod,1,1)='9' and kod like '%BZ'" update or replace produkty set kod = (select novy_kod from prevodnik where prevodnik.kod=produkty.kod) where exists (select kod from prevodnik where prevodnik.kod=produkty.kod) | 27-Nov 17:40 |
| 627 | Pekr | produkty.kod is unique ... if I remove "or replace" part, data seem to be OK, but it just no more does what I need it to do .... | 27-Nov 14:21 |
| 626 | Pekr | uh, it is update or replace which messes my data with nonsense :-( update or replace produkty set kod = (select novy_kod from prevodnik where prevodnik.kod=produkty.kod) where exists (select kod from prevodnik where prevodnik.kod=produkty.kod) It is supposed to simply to lookup the "prevodnik" (translator) table, if there is new code (novy_kod). both tables seem to be OK, but after that statement kod in produkty (products) gets messed up .... | 27-Nov 14:20 |
| 625 | Pekr | ah, today I got another data corruption with sqlite driver .... | 27-Nov 13:40 |
| 624 | Pekr | WTF! I got burried by very strange behavior, which I would like to know what happened. IMO it is not related to SQLite itself, but maybe it is a deeper REBOL bug? Simply put I have following statement: sql "update or ignore produkty set kod = (select novy_kod from prevodnik_devitky where prevodnik_devitky.kod=produkty.kod) where exists (select kod from prevodnik_devitky where prevodnik_devitky.kod=produkty.kod)" ... and I was becoming crazy, that the update did not happen. No indexes used (well, I am starting practically with sql, so no need to mess things more :-), and when I put EXACTLY the same line into SQLiteAdmin tool, it was performed OK. I was really becoming mad, because it seemed to randomly work, when I changed/simplified the expression. Then I remembered my 2 years old ODBC scripts, when we imported data into SAP, from Database Advantage Server. I remembered there was some problem with multiline statement unless I used trim/lines. I thought to myself, well, it was ODBC driver related, but why not to try it? So I tried to reformat my query to: sql trim/lines "update or ignore produkty set kod = (select novy_kod from prevodnik_devitky where prevodnik_devitky.kod=produkty.kod) where exists (select kod from prevodnik_devitky where prevodnik_devitky.kod=produkty.kod)" ... and it started to work from my script. And I ask once again - What is going on here? 2 hours lost, which drove me nearly insane :-) I use no special editor but Notepad. The statement returned no error, so I thought it got performed, just incorrectly. It all seems to be related to one aspect - line is too long, so it wraps in Notepad and unless I use trim/lines, it is not performed. Any educated gues to what is happening here? It is not SQLite related imo, I just did not know where to put it, as general bugs group is not here .... | 27-Nov 10:05 |
| 623 | Ashley | "even if column type is text" ... see http://www.sqlite.org/datatype3.html#affinity | 25-Nov 22:54 |
| 622 | BrianH | OK, I think that is what Petr concluded :) | 25-Nov 22:52 |
| 621 | Ashley | "Perhaps the REBOL driver hasn't caught up." ... SQLite datatypes have not changed for a long time, the driver supports them all in direct mode. "I don't understand what is our /direct mode good for" ... http://www.dobeash.com/SQLite/user-guide.html#section-2.1.3 | 25-Nov 22:51 |
| 620 | Maarten | Yep. Rebol is superb for data manipulation | 23-Nov 18:26 |
| 619 | Pekr | I really sometimes think of simply submitting two queries into sql, having results in block, doing it in rebol level, and then to build tables from the scratch by inserting into new tables :-) | 23-Nov 17:39 |
| 618 | Pekr | our subsidiary company changed IDs of some products during the inventory in our system ;-) I need to create table called e.g. transform-id(oldid, newid) .... and now I would like to somehow do: foreach row maintable [if found? in transform table maintable/id, then replace maintable/id with newid) :-) | 23-Nov 17:38 |
| 617 | Pekr | how to do effectively following using SQL? | 23-Nov 17:34 |
| 616 | Pekr | guys, have you ever got to situation, that working with rebol itself was more productive than with SQL? I redone my version of inventory checking to SQL, and thas thing imports for 10x more time, and most of the checks I do on rebol side anyway. Kudoz to remove-each function too :-) | 23-Nov 14:48 |
| 615 | Pekr | not without direct .... | 23-Nov 14:44 |
| 614 | Robert | Never had a problem with this. | 23-Nov 11:47 |
| 613 | Robert | The SQLite driver transforms all necessary " and ' stuff. | 23-Nov 11:47 |
| 612 | Robert | sql ["select * from test where id = ?" 5] | 23-Nov 11:47 |
| 611 | Pekr | It seems to me I will work with /direct refinement. That way REBOL string "aaaaa" is stored in sqlite as 'aaaa', so direct queries for 'aaaa' in console work, and back-loading (select) to rebol returns it as a rebol string. Without direct, 'aaaaa' would be returned as word ... | 23-Nov 8:52 |
| 610 | BrianH | Here is the SQLite docs about datatypes: http://www.sqlite.org/datatype3.html | 23-Nov 7:35 |
| 609 | BrianH | As for the datatype mismatch, I would have to look at the code of sqlite.r to see if it is aware that SQLite data is no longer typeless. | 23-Nov 7:11 |
| 608 | BrianH | MySQL has a non-standard command for inserting if not there for update: REPLACE. SQLite has more detailed conflict resolution, but includes REPLACE as a MySQL-compatible shortcut for INSERT OR REPLACE (the OR REPLACE is itself a shortcut for ON CONFLICT REPLACE). I agree that UPDATE should have the option of acting like INSERT OR REPLACE. | 23-Nov 7:09 |
| 607 | Pekr | I simply want rebol string "1234" to be stored as '1234' and when returned from query to be it once again "1234" not integer if I use '1234' (when using compose and sending string query) | 23-Nov 7:06 |
| 606 | Pekr | I don't understand what is our /direct mode good for, it does things as {"1234"} .... without it, rebol stores "1234" .... now if you want use tools like sqliteadmin, you would be mad using /direct mode stored values ... | 23-Nov 7:05 |
| 605 | BrianH | SQLite used to only have text values - numbers were translated at runtime. Perhaps the REBOL driver hasn't caught up. | 23-Nov 7:03 |
| 604 | Pekr | now I have to choose, if I work with rebol only, or console only. | 23-Nov 7:02 |
| 603 | Pekr | hmm, but issuing single '5', it is returned to rebol as integer, even if column type is text, that sucks :-) | 23-Nov 7:01 |
| 602 | Pekr | it might work with rebol, but when you go to consolo and issue select * from test where id='5', it is not found. Because rebol stores it as "5", so I have to issue '"5"' | 23-Nov 6:59 |
| 601 | Pekr | imo our driver does not work correctly. I am totally confused by modes. Neither /direct nor normal mode does what I expect. I want rebol string to be stored as string in sqlite. | 23-Nov 6:58 |
| 600 | BrianH | It just doesn't check for cascading actions or trigger events until it is done. | 23-Nov 6:57 |
| 599 | BrianH | No, I'm saying that update deletes the original record and inserts a new one, on every relational database I know. No update-in-place. | 23-Nov 6:56 |
| 598 | Pekr | it does not sound appropriate, or why guys were asking mysql to add insert .... on duplicate key update facility, if update would be able to do it itself? | 23-Nov 6:55 |
| 597 | Pekr | so you trying to say, that update, if record does not exist, will add new one? | 23-Nov 6:54 |
| 596 | Pekr | simply put, I don't want to issue a reqeust first, then decide if received recordset is zero lenght to insert, and if ther is some record, to update .... | 23-Nov 6:54 |
| 595 | BrianH | I don't think it changes the row id though, and definitely doesn't change the primary key. | 23-Nov 6:52 |
| 594 | BrianH | All updates work like that, in every database that I am familiar with. It's a transaction isolation thing. | 23-Nov 6:51 |
| 593 | BrianH | What are you talking about? | 23-Nov 6:50 |
| 592 | Pekr | it has insert or replace = replace, but that deletes original record and replaces it with new, probably changing row id, so no facility like insert .... on duplicate key update ..... | 23-Nov 6:50 |
| 591 | Pekr | hmm, sqlite does not provide insert or update facility, that is weak :-( | 23-Nov 6:49 |
| 590 | Pekr | Our Sqlite docs say: "2.3.3 Fkeys - This refinement returns information about the foreign keys (if any) that reference a table.", but sqlite does not support foreign-keys, only via triggers, no? | 22-Nov 14:26 |
| 589 | Ashley | 1.0.4 available at: http://www.dobeash.com/download.html Mac OS X version 10.4 support added as per http://developer.apple.com/documentation/MacOSX/Conceptual/OSX_Technology_Overview/AppTechnology/chapter_5_section_20.html | 20-Jul-07 9:00 |
| 588 | Pekr | is there any solution, how to infuence shell window appearance, if using sqlite3.exe? There seems to be no silent mode ... you can start sqlite3.exe and type .help to see more comands, or look here: http://www.die.net/doc/linux/man/man1/sqlite3.1.html | 2-Jul-07 8:29 |
| 587 | Ashley | http://www.sqlite.org/ 2007-Jun-18 - Version 3.4.0 This release fixes two separate bugs either of which can lead to database corruption. Upgrading is strongly recommended. | 22-Jun-07 1:09 |
| 586 | Robert | Great! I'll give it a try with a new DLL. | 22-Feb-07 18:33 |
| 585 | Ashley | 1.0.3 available at: http://www.dobeash.com/download.html Supports latest SQLite v2 API. *** WARNING *** Is not compatible with older versions of the SQLite DLL. | 20-Feb-07 5:30 |
| 584 | Robert | Ashley, it looks mostly compatible to me, just the returned errors are a bit different. | 18-Feb-07 12:17 |
| 583 | Robert | Will, thx for the link. | 18-Feb-07 12:17 |
| 582 | Will | one more link related to trees in mysql: http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html | 17-Feb-07 23:01 |
| 581 | Ashley | "are you working on an update to SQLite.r at the moment?" I didn't even know they had changed the API! If it's an easy change I'll do it sooner than later. | 17-Feb-07 22:22 |
| 580 | Robert | No, just the plain version. | 17-Feb-07 15:04 |
| 579 | Pekr | btw - do you use collation for the german language? | 17-Feb-07 13:53 |
| 578 | Robert | I don't know. | 17-Feb-07 13:52 |
| 577 | Pekr | How long will the old API exist? | 17-Feb-07 13:51 |
| 576 | Robert | Ashley, are you working on an update to SQLite.r at the moment? | 17-Feb-07 13:43 |
| 575 | Robert | I'm thinking about updating to the newest SQLite version. And I just read there is a new API which should be used. The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are recommended for all new programs. The two older interfaces are retained for backwards compatibility, but their use is discouraged. In the "v2" interfaces, the prepared statement that is returned (the sqlite3_stmt object) contains a copy of the original SQL. This causes the sqlite3_step() interface to behave a differently in two ways: If the database schema changes, instead of returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will automatically recompile the SQL statement and try to run it again. If the schema has changed in a way that makes the statement no longer valid, sqlite3_step() will still return SQLITE_SCHEMA. But unlike the legacy behavior, SQLITE_SCHEMA is now a fatal error. Calling sqlite3_prepare_v2() again will not make the error go away. Note: use sqlite3_errmsg() to find the text of the parsing error that results in an SQLITE_SCHEMA return. When an error occurs, sqlite3_step() will return one of the detailed result-codes like SQLITE_IOERR or SQLITE_FULL or SQLITE_SCHEMA directly. The legacy behavior was that sqlite3_step() would only return a generic SQLITE_ERROR code and you would have to make a second call to sqlite3_reset() in order to find the underlying cause of the problem. With the "v2" prepare interfaces, the underlying reason for the error is returned directly. | 17-Feb-07 13:43 |
| 574 | Sunanda | It's worth tracking down some of Joe Celko's articles on the issue too. http://www.ibase.ru/devinfo/DBMSTrees/sqltrees.html | 8-Jan-07 18:54 |
| 573 | Pekr | as for real graphs with relational model storage - that is beyond my understanding .... hopefull article might give you some pointers ... | 8-Jan-07 18:46 |
| 572 | Pekr | heh, never heard of answers.google.com ... well, maybe that is why I would like to work as a consultant, hopefully with IBM ... the bad thing is, that I might miss programming a bit :-) | 8-Jan-07 18:46 |
| 571 | Robert | and of course having more than one parent. | 8-Jan-07 18:43 |
| 570 | Robert | Thx for the link. As always, good references Petr. You should make your money with answers.google.com | 8-Jan-07 18:43 |
| 569 | Robert | yes, most likely but with the possibility to have cycles etc. | 8-Jan-07 18:42 |
| 568 | Pekr | I have good link, although it relates to mySQL - it shows how to query hierarchical data - http://dev.mysql.com/tech-resources/articles/hierarchical-data.html | 8-Jan-07 18:32 |
| 567 | Pekr | Robert - what do you mean as a graph? A hieararchical structure? | 8-Jan-07 18:30 |
| 566 | Robert | Question: I have something like a bill-of-material. And I would like to get such a structure back as graph. I'm just thinking of this isn't a generic function suitable to be coupled with a database. What do you think? | 8-Jan-07 17:40 |
| 565 | Pekr | that has a bit of a bad effect for sqladmin grid ... if you don't specify field type or length, it lists one collumn wide thru all the screen ... | 22-Dec-06 9:50 |
| 564 | Robert | I never specify anything. Only for INTEGER | 22-Dec-06 9:44 |
| 563 | Pekr | what do you use for typical rebol strings, or even dates? text? varchar? | 22-Dec-06 9:28 |
| 562 | Robert | There is just no need for this. The DB should store each cell most efficient. | 22-Dec-06 9:28 |
| 561 | Robert | That's cool!! One of SQLite big advantages. Why should I be forced to tell the type upfront? | 22-Dec-06 9:28 |
| 560 | Pekr | I read "manifest typing" and it is strange - even if you set your column as an integer, it allows you to enter non-integer data ... | 22-Dec-06 9:27 |
| 559 | Robert | Petr, yes I have seen some effects of these as well. But didn't tracked them further down yet. | 22-Dec-06 9:26 |
| 558 | Ashley | Be sure to read "Manifest typing" at http://www.sqlite.org/different.html | 21-Dec-06 21:42 |
| 557 | Pekr | There seems to be a bit messy situation in how integers are handled with SQLite, so beware. If you don't specify column types, as eg. in my following example: create table logs (date, time, ipaddr, url, ctype, incident) , then expect following situation: 1) sql "select incident from logs where incident = 4" ; works 2) sql ["select incident from logs where incident = ?" 4] ; works 3) sql "select incident from logs where incident = '4'" ; does not work The strange thing is, that editing my db in SQLiteAdmin, it shows not column types (but imo it has to choose some "default" type internally). Changing according field type to Integer type, makes above case number 3) to work too ... So maybe it is always better to not be lazy and specify precisely column types? But in fact, when I specified column type as Integer, I did NOT expect case 3 to work ... I am going to do more tests myself to save myself from later headaches during specifying more complicated queries :-) | 21-Dec-06 15:23 |
| 556 | Volker | maybe that methods helps in your case too. | 15-Dec-06 12:20 |
| 555 | Volker | that saved my script, which uses beer and heavy blitting | 15-Dec-06 12:20 |
| 554 | Volker | beer-client-loop: func [/local last-mem mem-jetzt ports-bak] [ recycle/off last-mem: stats forever [ if error? set/any 'error try [ wait 0.1 ] [ write %autsch.txt mold disarm error win-log print "-----------------" print disarm error ] if 20 * 1000 * 1000 + last-mem < mem-jetzt: stats [ recycle last-mem: stats /print [now/time mem-jetzt - last-mem mem-jetzt last-mem] ] ] ] | 15-Dec-06 12:19 |
| 553 | Ashley | Pekr, the import statement for your script would look like: sqlite/import "insert into logs values (?,?,?,?,?,?)" log-info and is about twice as fast as the foreach loop (and now works correctly under 1.0.2). | 15-Dec-06 11:27 |
| 552 | Ashley | 1.0.2 available at: http://www.dobeash.com/download.html Workaround to RAMBO#4063. Seems to work with Pekr's and my test cases after several thousand runs without error. | 15-Dec-06 11:23 |
| 551 | Ashley | Success! ... of sorts. If you add a 'recycle as the first line of the 'sql func then all seems to work fine; but a lot slowwwwwwer (1 minute 48 as opposed to 1.5 seconds in Pekr's test case). But, if you recycle every 100 statements it still works and only increases the runtime to 1.85 seconds. I'll do a few more tests before uploading a new version with this change. | 15-Dec-06 10:54 |
| 550 | Ashley | Pekr, "... Ashley posted his findings about it ...", refer post of 7th Nov in this group. Note that it works fine if you use the direct refinement, but then you won't have access to the full range of REBOL data types. Also note that you can use IMPORT instead of a foreach loop, as in: IMPORT statement values | 15-Dec-06 10:31 |
| 549 | Robert | I use the SQLite command line tool for batch importing. | 15-Dec-06 9:40 |
| 548 | Robert | Petr, I had the same problem. There is a RAMBO ticket and Ashley posted his findings about it. | 15-Dec-06 9:40 |
| 547 | Pekr | ok, so how can I explain to mysel data corruption? It is reproducable. should I set type of fields when creating tables? Or should I create tables in external tool? | 15-Dec-06 8:40 |
| 546 | Ashley | CONNECT %test.db SQL "drop table t" SQL "create table t (c)" SQL "insert into t values ('Word')" SQL {insert into t values ('"String"')} SQL ["insert into t values (?)" 'Word] SQL ["insert into t values (?)" "String"] test1: SQL "select * from t" DISCONNECT CONNECT/direct %test.db SQL "drop table t" SQL "create table t (c)" SQL "insert into t values ('String')" SQL ["insert into t values (?)" "String"] test2: SQL "select * from t" DISCONNECT | 14-Dec-06 23:07 |
| 545 | BrianH | Does block mode do datatype conversions? Perhaps there is a type mismatch. | 14-Dec-06 18:27 |
| 544 | Pekr | Maybe there is a bug with block mode? | 14-Dec-06 18:17 |
| 543 | Pekr | I am confused about what driver is doing ... the difference of Direct mode. Hmm, maybe I do - there is a difference between the string mode, and block mode. With string mode, the driver does not touch the expression, so I am responsible for putting VALUES('06-Dec-2006') or VALUES('"06-Dec-2006"') - simply put - if I want in db to have my date value being represented as a REBOL string, I have to put it into parenthesis myself. So actually parenthesing it twice, as sqlite itself already uses '06-Dec-2006' and considers it being a string ... | 14-Dec-06 18:05 |
| 542 | Pekr | whereas this one does not: SQL reduce ["INSERT INTO logs VALUES (?, ?, ?, ?, ?, ?)" date time ip-address url content-type incident-id] | 14-Dec-06 17:57 |
| 541 | Pekr | uf, following works. Maybe it has something with my nonunderstanding of differences between string/non string values and how to properly insert them ... SQL s: rejoin ["INSERT INTO logs VALUES ('" date "', '" time "', '" ip-address "', '" url "', '" content-type "', '" incident-id "')"] | 14-Dec-06 17:56 |
| 540 | Pekr | later in the night, or over the weekend I will try not to use block syntax, but rather compose query string. All values inserted are strings (I tried with native rebol datatypes too) | 14-Dec-06 17:42 |
| 539 | Pekr | >> sql "select * from logs" ** Syntax Error: Invalid integer -- 0+* ** Near: (line 1) 0+*6/Dec/06" | 14-Dec-06 17:27 |
| 538 | Pekr | converting the first file (reading and saving) did not help either ... my suspicion is, there is some bug with driver ... | 14-Dec-06 17:27 |
| 537 | Pekr | here's small package - www.xidys.com/gotcha!.zip | 14-Dec-06 17:23 |
| 536 | Pekr | >> do %gotcha!.r Script: "Untitled" (none) Script: "SQLite driver" (5-Nov-2006) >> sql "select * from logs" ** Syntax Error: Invalid string -- " ** Near: (line 1) È&*6/Dec/06" | 14-Dec-06 17:22 |
| 535 | Pekr | hmm, it fails too ... | 14-Dec-06 17:15 |
| 534 | Pekr | If I put SQL section out of the foreach file log-files, simply appending all logs at once, data is corrupted ... it is reproducable .... | 14-Dec-06 17:09 |
| 533 | Pekr | following works: ;--- import log files import-logs: does [ ;--- pairs of incident No and incident file [[1 filename][2 filename] atd.] ... log-files: [[1 %2006-12-06-7_50-7_59][2 %2006-12-12-15_46-15_47][3 %2006-12-13-15_29-15_31]] foreach file log-files [ log-info: copy [] log-file: read/lines file/2 ;print length? log-file foreach string-line log-file [ line: parse string-line " " if line/7 == "GET" [ append log-info reduce [line/1 line/2 line/4 line/8 line/11 to-string file/1] ] ] SQL "BEGIN" foreach [date time ip-address url content-type incident-id] log-info [ SQL reduce ["INSERT INTO logs VALUES (?, ?, ?, ?, ?, ?)" date time ip-address url content-type incident-id] ] SQL "COMMIT" ] ] | 14-Dec-06 17:08 |
| 532 | Pekr | If I import one file at a time, clear the block, then data is OK in sqlite, but if I append first to one block, then insert into sql, data is corrupted on few random places ... | 14-Dec-06 17:06 |
| 531 | Pekr | I read all thre using read/lines, choose info I want, append it to resulting block. Probing block shows no defects. I believe it is a REBOL low level bug with some hidden chars. It happened on me in the past already, in different situation ... | 14-Dec-06 17:05 |
| 530 | Pekr | I am trying to analyse few sendmail logs. Our admin sent me three files. The first one, has those small boxes instead of newlines, you know it, when you try to open linux file under windows | 14-Dec-06 17:04 |
| 529 | Pekr | Hi, has anyone even got to the problem, where you import data into database, and it is corrupted? (select fails) | 14-Dec-06 17:03 |
| 528 | Louis | Ok, it seems to be related to certain records. No matter what word I search for it is not found in certain records. So it has something to do with those records. | 2-Dec-06 2:20 |
| 527 | Louis | It does not always fail, just sometimes. I've not yet discovered why. | 2-Dec-06 2:14 |
| 526 | Louis | Ashley, I notice that sqlite.r value binding is missing some records when using LIKE. >> sql ["select * from base where alamat like ?" "%Grand%"] <<=====<<< This fails. == "No rows selected." >> sql ["select * from base where alamat like '%Grand%'"] <<====<<< This finds a record. | 2-Dec-06 2:13 |
| 525 | Robert | I send you my version. | 26-Nov-06 15:31 |
| 524 | Robert | I mostly use FLAT for SELECT and no refinement for INSERT. | 26-Nov-06 15:31 |
| 523 | Robert | CONNECT I just use the CREATE refinement. | 26-Nov-06 15:30 |
| 522 | Robert | I have created a semicolon seperated file and imported it via the SQLite command line tool. All numbers where just plain included, not guarded by " chars. | 26-Nov-06 15:30 |
| 521 | Ashley | What did the statement that originally inserted the value look like? What refinement(s) do you use when CONNECTing? Same for both the INSERT and SELECT? | 26-Nov-06 13:35 |
| 520 | Robert | Ashley, no this didn't worked as well. I tried it. That's really strange. SQLite browsers see the field as NUMERIC. | 26-Nov-06 10:02 |
| 519 | Ingo | Another idea could be, that you are somehow mixing "raw" and "managed" access, this bit me once, but I think it was related to strings then. | 26-Nov-06 9:01 |
| 518 | Ashley | Does: ["select * from a where mynum = ?" "1"] work? If so, then your "integer" is in fact a string. | 25-Nov-06 23:59 |
| 517 | Robert | How is integer! encoded for SQLite? | 25-Nov-06 17:42 |
| 516 | Robert | Hi, I have a problem wheren using the ? binding feature with integer! values. For example: ["select * from a where mynum = ?" 1] won't give an results. But ["select * from a where mynum = ''1'] gives results. | 25-Nov-06 17:41 |
| 515 | Louis | Whoops. This should be in the RebGUI group, but I'm going to leave it here, since the script needing fixed is here. | 17-Nov-06 2:06 |
| 514 | Louis | Now, how can all the fields and areas be cleared in preparation for entering data for the next record? | 17-Nov-06 2:02 |
| 513 | Louis | Ashley, that works. Thanks! | 17-Nov-06 2:01 |
| 512 | Ashley | ID field problem can be fixed by using code like: ... id/text: form i: i + 1 save %id.txt i show id No need for parenthesis. | 17-Nov-06 0:25 |
| 511 | Ashley | You have a few errors in there. - your values are comma seperated (e.g. use SQL reduce ["..." val1 val2 ...] instead - tgl_nikah/text appears in your INSERT but isn't present in your display - your "DB Info" button can use ... print ROWS "base" | 17-Nov-06 0:23 |
| 510 | Louis | Click on the <DB Info> button, and you will see that the tables have been created. But I haven't been able to insert any data. Another problem is that the id field doesn't advance to the next number. | 17-Nov-06 0:03 |
| 509 | Louis | Here's the latest version: rebol [] do %sqlite.r do %rebgui.r unless value? 'ctx-rebgui [ either exists? %rebgui-ctx.r [do %rebgui-ctx.r] [do %rebgui.r] ] set-colors tab-size: 120x55 fonts: reduce [font-sans-serif font-fixed font-serif "verdana"] if not exists? %id.txt [write %id.txt 1] i: to-integer read %id.txt i: i - 1 either not exists? %indodex.db [ CONNECT/create %indodex.db SQL "create table base (ID, Title, Nama, Alamat, Telefon, Handfon, Fax, Email, Tgl_Nikah, Nota)" SQL "create table birthdays (ID, Nama, Jenis, Hubungan, Tgl_Lahir, Agama, Nota)" ][ CONNECT %indodex.db ] do show-cc: make function! [] [ set-colors display "IndoDex Ver. 1.0.1" [ label 16 "ID:" id: text (to-string i) return label 16 "Title:" title: drop-list 30 #W "Pak" data ["Pak" "Ibu" "Sdr." "Sdri." "Drs." "Dr." "Tuan" "Nyonya"] 20x5 return label 16 "Nama:" nama: field return label 16 "Alamat:" alamat: area 50x30 return label 16 "Telefon:" telefon: field return label 16 "Handfon:" handfon: field return label 16 "Fax:" fax: fax: field return label 16 "E-Mail:" email: field return label 16 "Nota:" nota: area 50x30 return button "Save" [ ;UNCOMMENT THE FOLLOWING LINES AND YOU WILL SEE THEY DON'T WORK. ANYBODY KNOW WHAT IS WRONG? ;SQL reduce ["insert into base values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" id/text, title/text, nama/text, alamat/text, telefon/text, handfon/text, fax/text, email/text, tgl_nikah/text, nota/text] ;SQL {insert into base values ('Pak' 'Ibu' 'Sdr.' 'Sdri.' 'Drs.' 'Dr.' 'Tuan' 'Nyonya' 'Jonew')} (i: to-integer i) (i: i + 1) (write %id.txt i) (i: to-string i) ] button "GUI Info [ print [id/text " " title/text " " nama/text " " alamat/text newline] ] button "DB Info" [ print TABLES SQLite/col-info?: true print SQL "select * from base" print SQLite/columns ] button "Halt" [ halt ] button "Quit" [ quit ] ] ] do-events | 16-Nov-06 23:56 |
| 508 | Louis | Ashley, I still can't get it to work. | 16-Nov-06 23:56 |
| 507 | Louis | Thanks, Ashley. I just got called to dinner. When I get back I'll try that. | 16-Nov-06 11:10 |
| 506 | Ashley | Try reducing the block, as in: SQL reduce ["insert into base values (?, ?, ?, ?, ?, ?, ?, ?, ?)" ID, Nama, Alamat, Telefon, Handfon, Fax, Email, Tgl_Nikah, Nota] | 16-Nov-06 11:05 |
| 505 | Louis | This doesn't work either: SQL ["insert into base values (?, ?, ?, ?, ?, ?, ?, ?, ?)" ID, Nama, Alamat, Telefon, Handfon, Fax, Email, Tgl_Nikah, Nota] | 16-Nov-06 7:33 |
| 504 | Louis | I'm getting this: ** User Error: SQLite no such column: id ** Near: make error! reform ["SQLite" error] >> | 16-Nov-06 5:34 |
| 503 | Louis | What am I doing wrong here: rebol [] do %sqlite.r do %rebgui.r if not exists? %id.txt [write %id.txt 1] db: %indodex.db either not exists? db [ CONNECT/create/flat/direct/format db SQL "create table base (id, Nama, Alamat, Telefon, Handfon, Fax, Email, Tgl_Nikah, Nota)" SQL "create table birthdays (id, Nama, Jenis, Hubungan, Tgl_Lahir, Agama, Nota)" ][ CONNECT/flat/direct/format db ] unless value? 'ctx-rebgui [ either exists? %rebgui-ctx.r [do %rebgui-ctx.r] [do %rebgui.r] ] set-colors tab-size: 120x55 fonts: reduce [font-sans-serif font-fixed font-serif "verdana"] do show-cc: make function! [] [ display "IndoDex Ver. 1.0.1" [ tab-panel #HW data [ "Add" [ label "Title:" priority: drop-list 30 #W "Pak" data ["Pak" "Ibu" "Sdr." "Sdri." "Drs." "Dr." "Tuan" "Nyonya"] 20x5 return label "Nama:" nama: field return label "Alamat:" alamat: area 50x30 return label "Telefon" telefon: field return label "Handfon" handfon: field return label "Fax:" fax: field return label "E-Mail:" email: field return label "Nota:" nota: area 50x30 return button "Save" [ (id: to-integer read %id.txt) SQL/flat/direct {insert into base values (id, Nama, Alamat, Telefon, Handfon, Fax, Email, Tgl_Nikah, Nota)} (write %id.txt id) show-text ex-status "Saved"] ] "Edit" [ ] "Search" [ ] ] ] ] do-events | 16-Nov-06 5:33 |
| 502 | Ashley | A good entry point if you just want to grab the SQL syntax is: http://www.sqlite.org/lang.html | 9-Nov-06 22:31 |
| 501 | Louis | Now I've probably got my whole harddrive filled up. | 9-Nov-06 15:38 |
| 500 | Louis | It's working now. Thanks Henrik! | 9-Nov-06 15:36 |
| 499 | Louis | It does help to have the correct website. :>) | 9-Nov-06 15:35 |
| 498 | Henrik | and it downloads fine here | 9-Nov-06 15:34 |
| 497 | Henrik | you probably want sqlite.org | 9-Nov-06 15:34 |
| 496 | Henrik | sqlite.com contains a general domain site. | 9-Nov-06 15:33 |
| 495 | Louis | :>) Just tired and playing around. | 9-Nov-06 15:33 |
| 494 | Henrik | of course Louis runs into an error I've never seen before | 9-Nov-06 15:32 |
| 493 | Pekr | :-) Do you really find anything so valuable on sqlite.com domain, that you need to grab their whole site? :-) | 9-Nov-06 15:32 |
| 492 | Louis | C:\.SQLite>wget -r -l 1 http://www.sqlite.com/index.html --23:27:13-- http://www.sqlite.com:80/index.html => `www.sqlite.com/index.html' Connecting to www.sqlite.com:80... connected! HTTP request sent, awaiting response... 23:27:14 ERROR -1: Malformed status line. | 9-Nov-06 15:30 |
| 491 | Henrik | That's right. It's very rare that wget fails to resume a download. | 9-Nov-06 14:30 |
| 490 | Anton | It's probably much better than batch-download at resuming. I should study its source to see what it knows. | 9-Nov-06 14:29 |
| 489 | Henrik | wget is also very good at resuming downloads: wget -c <very incredibly big file> | 9-Nov-06 14:28 |
| 488 | Henrik | depth is how deep links should be gathered for downloading. Values above 3 or 4 can be dangerous. :-) | 9-Nov-06 14:27 |
| 487 | Henrik | as long as you use wget in the same location as where you put your downloaded files temporarily, you don't need to set the environment variables. Then it's just in a DOS prompt: wget -r -l <depth> <some site> And it will download the site to <some site>/ directory | 9-Nov-06 14:26 |
| 486 | Louis | Henrik, I'm going to try wget. Thanks. | 9-Nov-06 14:25 |
| 485 | Louis | Thanks, Anton. I'm going to study your script for other uses later. | 9-Nov-06 14:25 |
| 484 | Henrik | http://pages.interlog.com/~tcharron/wgetwin.html | 9-Nov-06 14:23 |
| 483 | Henrik | wget is available for windows. | 9-Nov-06 14:23 |
| 482 | Anton | Well, I suppose if you do the spidering, you can supply the links to batch-download. Still, it's not designed for that. Better to get a specific tool for that. | 9-Nov-06 14:23 |
| 481 | Louis | Pekr, Rebolek, Will, and Henrik, thanks. I'm on XP. Too bad. DeepVacuum looks nice. | 9-Nov-06 14:23 |
| 480 | Anton | batch-download is not suited for downloading a whole website. It doesn't do any spidering. | 9-Nov-06 14:22 |
| 479 | Will | and DeepVacuum is a GUI for wget ;-) | 9-Nov-06 13:50 |
| 478 | Henrik | if you can use non-rebol stuff, use wget. It's very effective at mirroring sites to a local drive. | 9-Nov-06 13:42 |
| 477 | Will | Louis: if you are on os x, this one work pretty neat http://www.hexcat.com/deepvacuum/index.html , it will dl the whole site and rewrite urls to make them relative, or you coud try with acrobat pro if you want a pdf version of the site | 9-Nov-06 13:03 |
| 476 | Rebolek | Louis: there's batch-download by Anton, try it - http://anton.wildit.net.au/rebol/util/batch-download.r | 9-Nov-06 12:48 |
| 475 | Louis | Can't find any. i wrote a crude one once, but can't find it on my harddrive. | 9-Nov-06 12:43 |
| 474 | Pekr | try some of wget tools (webget). IIRC there is even some rebol based one on rebol.org iirc? | 9-Nov-06 12:01 |
| 473 | Louis | I would like to download the complete sqlite website. | 9-Nov-06 12:00 |
| 472 | Louis | Related: has anyone written a script to download a complete website? | 9-Nov-06 11:59 |
| 471 | Louis | Thanks, Ashley. But that website has a flaw; it can't be downloaded easily. It should be either one html page or else one pdf file. | 9-Nov-06 11:58 |
| 470 | Ashley | Yes, see http://www.sqlite.org/lang_altertable.html | 9-Nov-06 11:23 |
| 469 | Louis | Mike, thanks. I'll keep playing around with it then. | 9-Nov-06 11:04 |
| 468 | MikeL | Louis, It's not on the SQL92 features not supported http://www.sqlite.org/omitted.html so it must support alters. | 9-Nov-06 10:25 |
| 467 | Louis | is it possible to easily add a new column to a db table already populated with data without losing that data? | 9-Nov-06 9:50 |
| 466 | Henrik | Carl mentions paging. Does that not mean that you can have really big tables that are swapped to disk? | 8-Nov-06 8:49 |
| 465 | Ashley | Depends on the number and size of records you wish to handle, whether ACID is important to you, and whether you need SQL access or not. | 8-Nov-06 6:17 |
| 464 | Louis | This is probably a real dumb question, but what is the advantage of SQLite over say a REBOL object database? | 8-Nov-06 2:53 |
| 463 | Maxim | It also seems as if Carl is talking about a generic DB layer, such as is defined in python. so any db, could just implement a derivative of the base class and be compatible to some extent. | 7-Nov-06 16:26 |
| 462 | Pekr | there is one thing I really don't like about sqlite - it stores everything into one file. I want one file for table, one file for index, as with mysql, because for me it means simplicity - I can just look into file system and see how big some table is, or selectively backup some tables .... mySQL works that way IIRC | 7-Nov-06 7:34 |
| 461 | Pekr | or would you welcome including sqlite directly into rebol? | 7-Nov-06 7:33 |
| 460 | Pekr | I understand it the way, that we will get RIF, so you can design your own small db engine upon that. Linkintg to sqlite will be still possible using .dll, no? | 7-Nov-06 7:33 |
| 459 | BrianH | From his blogs it appears that Carl is just extracting SQLite's btree and indexing engine, but leaving out the SQL stuff that duplicates functionality already in REBOL (think blocks and series functions). You may be able to access the data (a little unlikely), but it won't be SQLite support. | 6-Nov-06 22:48 |
| 458 | Ashley | Thanks Brock. Robert, looks like you've hit the same error I RAMBOed here: http://www.rebol.net/cgi-bin/rambo.r?id=4063& A real pain as it can be consistently reproduced (and hence avoided), but with no pattern [that I can see]. If Carl implements SQLite-like support (see latest blog entry) then hopefully this will become a moot point as we won't require the library call anymore. | 6-Nov-06 22:30 |
| 457 | Allen | Robert, are you escaping the apostrophes before inserting in DB? What datatype are the strings being stored in ? nvarchar, varchar etc ? | 6-Nov-06 21:42 |
| 456 | Robert | I have a problem when I import a CSV file. I read the file (1.5 -2 MB), parse it and than write it out to SQLite. For some records I get scrambeld (invalid strings) in the database. Importing the CSV file via other SQLite tools work without any problem. It looks like the Rebol memory somehow gets messed up. Or could it be on the way to the DLL? | 6-Nov-06 8:52 |
| 455 | Brock | By the way Ashley, your site redesign is very nice. Good work. | 5-Nov-06 15:30 |
| 454 | Ashley | 1.0.1 available at: http://www.dobeash.com/download.html Bumped version to 1.0.x as code is no longer "beta" (I actually had a few people email me about that!) Incorporates new IMPORT function (twice as fast as a tight INSERT loop) and Robert's nested transaction handling logic (so nested BEGIN, COMMIT, END and ROLLBACK statements are correctly handled). Also changed logging behavior so all logging is off by default (i.e. use /log to turn on *all* logging). | 5-Nov-06 0:03 |
| 453 | Ladislav | aha, I overlooked it | 3-Nov-06 6:23 |
| 452 | Ladislav | I know that 'time is set in SQL, but it isn't used by FORMAT AFAICT | 3-Nov-06 6:20 |
| 451 | Ashley | Agreed on the 2nd point, I'll remove it once I've integrated Robert's changes (which I'm doing now). | 2-Nov-06 22:48 |
| 450 | Ashley | 'time is set in 'sql and used by 'format | 2-Nov-06 22:46 |
| 449 | Ladislav | ... and the last line is "off topic" in my opinion, violating the KISS principle - it should be the caller who determines what to do next, not the called script | 2-Nov-06 12:58 |
| 448 | Ladislav | it looks to me, that the TIME variable is unused? | 2-Nov-06 12:57 |
| 447 | Ashley | Yes please. | 1-Nov-06 14:07 |
| 446 | Robert | I have made a simple change to the sqlite.r driver, so it now "supports" nested transactions in that it uses reference counting to determin when to send a BEGIN or END to SQLite. Works good. Ashley, should I mail you the changed version? | 1-Nov-06 8:55 |
| 445 | Robert | Sorry I mean TABLES information. | 15-Oct-06 10:21 |
| 444 | Robert | Hi, could it be that the COLUMNS information isn't update if I use an ATTACH command? | 14-Oct-06 12:45 |
| 443 | BrianH | SQLite has a function extension mechanism, so it seems likely that you will access the extensions through that. We'll see. | 18-Sep-06 15:36 |
| 442 | BrianH | There is a virtual machine, but the code you run is native code by the time you run it. All new APIs for Windows are built on .NET. | 18-Sep-06 15:35 |
| 441 | Robert | Anyway, I read it that .NET isn't required. So, it should be a drop-in-replacement. The only thing I don't know is, how to access the exteneded functions than. | 18-Sep-06 15:34 |
| 440 | Robert | It will become a replacement over time. | 18-Sep-06 15:34 |
| 439 | Pekr | is .NET complete API replacement for Win32? I thought it is kind of virual machine (competition to JAVA), and hence for kind of internet ready apps, but not system wide apps? | 18-Sep-06 15:33 |
| 438 | Robert | Performance will be about 50% without encryption for the SQLite extension. But I don't think that it's that much. Reading/writing to disk is a lot slower compared to execution speed of processors. So, I expect about 25% performance loss. | 18-Sep-06 15:33 |
| 437 | BrianH | .NET is less crappy than Win32, believe me. I've written for both. I agree about ATI's control center though. | 18-Sep-06 15:32 |
| 436 | Pekr | hopefully at home, with my XP, it is already installed, so will try it at home ... | 18-Sep-06 15:32 |
| 435 | Pekr | ppl should use technology where appropriate - ATI uses it for Control Center, it takes 96MB of RAM ... for what? To configure driver in nice juicy, painfully slow environment? Well, at least on 850MHz Duron, 256MB RAM, it took some 20 - 30 sec to appear :-) | 18-Sep-06 15:32 |
| 434 | Pekr | it means - I use many fine apps, yet it is not on my PC .... | 18-Sep-06 15:30 |
| 433 | Pekr | I known none - NET is crap :-) | 18-Sep-06 15:30 |
| 432 | BrianH | Why wouldn't you have .NET installed? There are so many good apps that use it... | 18-Sep-06 15:29 |
| 431 | Pekr | yes, but binary dll comes in installer .msi, and it refuses to run, unless you have .NET installed, but that is detail :-) | 18-Sep-06 15:25 |
| 430 | BrianH | You can run it without the .NET framework. | 18-Sep-06 15:24 |
| 429 | Pekr | how much slower the encrypted db is? | 18-Sep-06 15:22 |
| 428 | Pekr | I can't install it, need to download .NET framework first, will do so at home :-) | 18-Sep-06 15:22 |
| 427 | BrianH | It appears that the SQLite version at Petr's link will work without ADO if you want to use the traditional APIs. | 18-Sep-06 15:18 |
| 426 | Robert | The strategy is to en/decrypt every block that gets written to disk. Even all B*-tree stuff etc. with this it's fully transparent to the database engine. | 18-Sep-06 15:16 |
| 425 | Robert | At the moment I tend to use the 2K$ extension. Yes, not quite cheap and I might do it myself but it will take some time too. So not being cheaper. | 18-Sep-06 15:15 |
| 424 | Robert | I haven't given this ADO stuff a try to see if it fits my requirements. But will do so. | 18-Sep-06 15:14 |
| 423 | Pekr | but I found - http://sqlite.phxsoftware.com/ | 18-Sep-06 14:34 |
| 422 | Pekr | hmm, author offers kind of extension for 2000USD .... there is no way how poor pekr would know C code to the extent of writing such an extension myself :-) | 18-Sep-06 14:34 |
| 421 | BrianH | I think that SQLite itself can be extended with encrypted fields. | 18-Sep-06 14:33 |
| 420 | Pekr | that is nearly useless then, because there is no easy way of how to protect your data | 18-Sep-06 14:10 |
| 419 | Pekr | the proper encryption would have to come at lower db level, namely - storage level .... | 18-Sep-06 14:10 |
| 418 | Pekr | >> (encloak "3" "pass") > (encloak "2" "pass") == false >> "3" > "2" == true | 18-Sep-06 14:09 |
| 417 | Pekr | hmm, would be problematic .... | 18-Sep-06 14:08 |
| 416 | Pekr | Hi, I know that some talk of encryption was held here some time ago, but currently I was asked to eventually protect sqlite data and I am not sure what is correct aproach. I would not go DB-as-a-file encryption, then "unpacking" into memory, or so. I prefer app level encryption, but I am not sure about searches, using LIKE directive. Would it work? | 18-Sep-06 13:59 |
| 415 | Pekr | the log can't be used for rollbacks anyway, can it? (so not so important) | 2-Aug-06 5:55 |
| 414 | Pekr | anyway - inability to work directly in cgi mode will drive ppl away from driver usage .... Logging should be disabled by default imo, and the name of the variable suggests that too .... | 2-Aug-06 5:54 |
| 413 | Pekr | ah, so this variable applies only to disable/enable logging of sql statements, right? | 2-Aug-06 5:49 |
| 412 | Pekr | what is log?: false good for, then? | 2-Aug-06 5:48 |
| 411 | Ashley | From the User Guide: "Every connect, disconnect, error and statement retry is logged to %sqlite.log. This refinement adds SQL statements as well. While this can be useful to monitor what SQL statements are being issued and what the volume and distribution is; be sure to monitor the size of this file in high transaction environments." If you really don't want any log output then just direct it to /dev/null | 2-Aug-06 5:33 |
| 410 | Pekr | sqlite is cool, so imo it would be pitty if it would not easily work in cgi environment .... if there is something wrong with my set-up, then sorry..... | 1-Aug-06 23:47 |