1. RE: EUSQL inserting records

Sorry, I thought the ";" was the completition of the sql statement and
finally figured it out so it runs.
jvandal 

-----Original Message-----
From: sixs [mailto:sixs at ida.net] 
Subject: EUSQL inserting records



Hello,
 
I am  reading  the sql.edb that was created  with  EUSQL demo. sql.ex. I
create a sql select statement in EDB program and it displays the month data.

With the below code I am I am trying to insert a record into the month
record. I get an error 5.
I have deleted the database. and rebuilt it running sql.ex. I run your EDB
program and I see the month, category, and platform in the data. The author
record does not display the fields , although the month, platform, category
fields and data are displayed. I have some jvandal
----------------------------------------------------------------------------
------------------
ok = run_sql( "CREATE TABLE MONTH " &
     "ID AS INTEGER, MONTH AS TEXT" )
ok = select_current( {}, "MONTH")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 1,
'JANUARY')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 2,
'FEBRUARY')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 3, 'MARCH')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 4, 'APRIL')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 5, 'MAY')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 6, 'JUNE')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 7, 'JULY')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 8,
'AUGUST')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 9,
'SEPTEMBER')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 10,
'OCTOBER')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 11,
'NOVEMBER')")
ok = run_sql( "INSERT INTO MONTH MONTH.ID, MONTH.MONTH VALUES( 12,
'DECEMBER')")
trace(1)
----------------------------------------------------------------------------
---------------------------------------------
partial code
 holdID = value(getText(LEID))
 holdMO = getText(LEMONTH)
 set_parameter( "HID", holdID )
 set_parameter( "HMO", holdMO )
 trace(1)
ok =select_current({}, "MONTH" )-- this passes ok
trace(1)
ok = run_sql("select * from MONTH;")
trace(1)
ok = run_sql("insert into MONTH  ID, MONTH values (13, AAAAAA);")         --
I get error 5 whith this statement
--    "MONTH.ID," &
--    "MONTH.MONTH" &
--     " values(0,  " &
--    " [HMO] );" )
  trace(1)

new topic     » topic index » view message » categorize

2. RE: EUSQL inserting records

Sixs wrote:
> 
> 
> Sorry, I thought the ";" was the completition of the sql statement and
> finally figured it out so it runs.
> jvandal 
> 

Yes, it should recognize that, although I'm usually too lazy to put the 
semicolon in, so I probably didn't test for that.  I'll make a note 
and fix that.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu