Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: help!!
Pages: [1] Print
Author Topic: help!!  (Read 702 times)
newbie
Guest


Email
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
Newbie
*
Offline Offline

Posts: 37


View Profile
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:
Code:
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


Email
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] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: help!!
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2008, 05:56:53 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2169 Posts in 562 Topics by 1224 Members
Latest Member: thyptoste

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc