Re: EUSQL

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi,
I am using IDE to create a project. I took an existing project that had a
screen and data inputs and am inserting a database created in EUSQL  and
include these statements
include eusql.e
include get.e
include print.e
constant sqla22 = "sqla22.edb"

Then I changed the code thusly
procedure MyWin_onOpen (integer self, integer event, sequence
params)--params is ()
 sequence linex, liney
 integer indx
  PaintWin_id(MyWin)                  -- draw our fancy borders.
--trace(1)
--deletedb()
--db_close()
--createdb()

 if db_open("sqla22", DB_LOCK_NO) != DB_OK then
  junk = message_box("couldn't open database",
   "Empty entry!", MB_TASKMODAL + MB_ICONWARNING)
   abort(1)
 end if
 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.


 if db_select_table("PEOPLE") != DB_OK then
  junk = message_box("couldn't open table",
   "Empty entry!", MB_TASKMODAL + MB_ICONWARNING)
   abort(1)
 end if
*****************************
create database and PEOPLE Table
constant sqlarchive = "sqla22.edb"
trace(1)
ok = create_db( sqlarchive )


--if atom(ok) then
--    puts(1, get_sql_err( ok ))
--    ? 1/0
--end if

ok = run_sql( "CREATE TABLE PLATFORM " &
              "ID AS INTEGER, PLATFORM AS TEXT")

ok = run_sql( "CREATE TABLE MONTH " &
              "ID AS INTEGER, MONTH AS TEXT" )

ok = run_sql( "CREATE TABLE AUTHORS " &
              "ID AS INTEGER, NAME AS TEXT" )

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
Jim Smiley
----- Original Message -----
From: "Matt Lewis" <matthewwalkerlewis at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, April 09, 2003 10:03 AM
Subject: RE: EUSQL


>
>
> 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
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu