1. RE: EUSQL
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Apr 09, 2003
- 445 views
From: sixs at ida.net [mailto:sixs at ida.net] > I am trying to use EUSQL in a windows program. I am having > some problems. Is there an example of EUSQL and Windows > that I could review? > > Jim Smiley In fact, I'm currently writing an app that uses EuSQL. It uses wxEuphoria, and isn't quite ready for the light of day, although it should work on both Windows *and* Linux. It basically allows you to view and edit EDS and EuSQL databases in a GUI environment--think MS Access, without the forms and reports and scripting and etc. That said, I'm not sure what it is you're looking for. EuSQL is platform independent (it only relies on database.e, which works on all Euphoria supported platforms). The problem is most likely within EuSQL itself. Unfortunately, it's not as robust [yet] as I'd like it to be, nor are the docs as useful as they should be (been doing some work on that, too). I've recently fixed several bugs, and should probably get an update out here soon. Hopefully by this weekend. Can you give some more details about your problem? Thanks, Matt Lewis
2. RE: EUSQL
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Apr 09, 2003
- 441 views
> From: sixs at ida.net [mailto:sixs at ida.net] <snip> > if db_open("sqla22", DB_LOCK_NO) != DB_OK then If you're using EuSQL to manipulate a EuSQL database, then you should open the database with EuSQL's open_db(). EuSQL keeps a list of the databases it has opened. If you use db_open(), EuSQL will not work properly with the database. Also, EuSQL opens databases with DB_LOCK_EXCLUSIVE. <snip> > create_table ( sequence sqla22, sequence People ) > ****** this statement ges an error that say it is looking for > possibly 'end' > , not a function. a caret points o the last letter in 'create_table. > Previously I had tried to use the database I created using > EUSQL and tried > to enter data using typical EDB commands. I couldn't find the dataI hd > entered in a viewing the database. create_table() is actually a function (most EuSQL routines are). Also, you shouldn't have "sequence sqla22, sequence People" here. The "sequence"'s will cause another error. If it succeeds, the return is a sequence. It will be an atom if it fails. There is additional error messages that can be gotten. Here is how I tend to use it: object ok ok = create_table( sqla22, People ) if atom(ok) then warnErr( get_sql_err(ok) ) end if > if db_select_table("PEOPLE") != DB_OK then <snip> You should use select_table() and other EuSQL routines when working with a EuSQL database. You can use the direct EDS commands, but you lose the functionality of EuSQL, including type checking of fields, and so forth. > create database and PEOPLE Table > constant sqlarchive = "sqla22.edb" > trace(1) > ok = create_db( sqlarchive ) ... <snip> ... > ok = run_sql( "CREATE TABLE PEOPLE " & > "KEYID AS INTEGER, LNAME AS TEXT," & > " FNAME AS TEXT, ADDRESS AS TEXT," & > " STREET AS TEXT, CITY AS TEXT," & > " STATE AS TEXT, ZIP AS TEXT," & > " PHONE AS TEXT" ) > ok = run_sql( "CREATE TABLE KEYRECORDS " & > "KEID AS TEXT, KEYNAME AS INTEGER" ) > Is this the correct way to identify fields that can be used > by EDB commands, > or should they be EUSQL commands to access the database This all looks correct. You could also use the EuSQL commands to create the tables and fields. I'll try to get a version of my db browser out tonight or tomorrow, and you'll be able to see very easily what's been done inside the database (whether EuSQL or not). The main hold up right now is that I haven't got wxEuphoria working for Linux yet--maybe soon, though. Matt Lewis
3. RE: EUSQL
- Posted by matthewwalkerlewis at YAHOO.COM Mar 01, 2001
- 469 views
> -----Original Message----- > From: Jonas Temple [mailto:jktemple at yhti.net] It looks like you're running "select * from...where...". Unfortunately, you can't use where clauses with select * in this release. I figured out how to flatten out all the fields in this case, so this problem should be solved. I'll try to get a new release out this weekend, once I've gotten a few other things worked out. For now, I recommend changing your select statement to explicitly list all the fields you want. I think you'll like the next release. I've just about got table creation 'automated', and datatypes implemented. > D:\EUPHORIA\include\eusql.e:1504 in function get_fields() > subscript value 0 is out of bounds, reading from a sequence > of length 2 > conditions = {{1,0,18,0,{84'T',69'E',77'M',74'J',79'O',78'N'}}} > ... called from D:\EUPHORIA\include\eusql.e:1669 in function > run_select() > sql = > {{{106'j',104'h',95'_',104'h',101'e',97'a',100'd',101'e',114'r'}}, > {{{0},{13}}},{{{42'*'},{74'J',72'H',95'_',72'H',69'E',65'A',68 > 'D',69'E', > 82'R',46'.',74'J',79'O',66'B',95'_',69'E',78'N',84'T',95'_',85 > 'U',83'S', > 69'E',82'R'}}},{{1,-2}},{{{1,0,18,0,{84'T',69'E',77'M',74'J',7 > 9'O',78'N'}}}}, Matt Lewis
4. RE: EUSQL
- Posted by Jonas Temple <jktemple at yhti.net> Mar 01, 2001
- 432 views
matthewwalkerlewis at YAHOO.COM wrote: > It looks like you're running "select * from...where...". Unfortunately, > you > can't use where clauses with select * in this release. I figured out > how to > flatten out all the fields in this case, so this problem should be > solved. > I'll try to get a new release out this weekend, once I've gotten a few > other > things worked out. For now, I recommend changing your select statement > to > explicitly list all the fields you want. Yup, that did it. And maybe you already know something about this one, but when I try to construct a statement with an AND in the where clause the return result is not formatted the same as when I have a single condition in the where clause. You know, if anything comes out of what I'm working on I feel that I have to give you some kind of cut.... :) Jonas
5. RE: EUSQL
- Posted by matthewwalkerlewis at YAHOO.COM Mar 01, 2001
- 478 views
> -----Original Message----- > From: Jonas Temple [mailto:jktemple at yhti.net] > Yup, that did it. And maybe you already know something about > this one, > but when I try to construct a statement with an AND in the > where clause > the return result is not formatted the same as when I have a single > condition in the where clause. Err..ahem...yeah. Multiple condition clauses are kinda mickey mouse right now. You can't do any sort of or conditions. And rather than putting AND in the condition, try putting commas between them. I'm still considering how best to do this. Right now I'm thinking that I need to get indices working first, otherwise I'll end up rewriting that stuff twice. > You know, if anything comes out of what I'm working on I feel that I > have to give you some kind of cut.... :) Just a nice mention would be fine. :) Matt Lewis
6. RE: EUSQL
- Posted by "Warren Simmons" <WSIMMONS at acso.com.au> Apr 13, 2004
- 428 views
You can create an EUSQL file and import the EDB file with Matt's Program. -----Original Message----- From: sixs [mailto:sixs at ida.net] Subject: EUSQL Hello, Is there a way to install EUSQL on top of EDB and keep the data? Or do you have to create the database as an EUSQL/EDB JIm For Topica's complete suite of email marketing solutions visit: http://www.topica.com/?p=TEXFOOTER