|
Pages: [1]
|
 |
|
Author
|
Topic: help!! (Read 854 times)
|
newbie
Guest
|
 |
help!!
« on: April 28, 2004, 02:59:54 AM » |
|
Hi.. I just upgrade the reddb version 1.3, but I have problem insert data to the database. i have two table need to insert table, i just created another table, but i have problem inserting
code: save-sso: does[ dataquantity: reduce (qua/text) datatotal: reduce (total/text) change-qua: to-integer dataquantity change-total: to-integer datatotal print type? change-qua print type? change-total print textID no: to-string textID chg: to-integer no print type? chg next: chg + 1 print block? next print change-qua print change-total print type?(conname/text) print type?(comname/text) name: [1 (conname/text) (comname/text) change-qua change-total] print name db-insert tblsso reduce[next (conname/text) (comname/text) change-qua change-total] db-close tblsso ;db-select * tblcontact ]
error msg: ** Script Error: Expected one of: word! - not: block! ** Where: get-binary-func ** Near: word: to word! either any
Thank you
|
|
|
|
|
Logged
|
|
|
|
|
Ashley
|
 |
help!!
« Reply #1 on: April 28, 2004, 06:58:51 PM » |
|
Did the same code work under v1.2 or earlier? We'll need a bit more info to solve this. [li]%tblsso.ctl [li]print reform [next conname/text comname/text change-qua change-total] [li]print reform [type? next type? conname/text type? comname/text type? change-qua type? change-total]
Also, it looks like you are mixing reduce / compose usage and assigning a value to 'next. Try something like the following instead: db-insert tblsso compose [next (conname/text) (comname/text) (change-qua) (change-total)]
You don't need to assign a value to 'next, RebDB will do this for you.
|
|
|
|
|
Logged
|
|
|
|
Guest
Guest
|
 |
help!!
« Reply #2 on: April 28, 2004, 10:13:59 PM » |
|
Actually for the v1.2, it appear the same problem, but I can able to insert data to another table using the same code. I also try to change the table name, it can able to insert.
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |