Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: Volume load to RebDB
Pages: [1] Print
Author Topic: Volume load to RebDB  (Read 1027 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Volume load to RebDB
« on: July 28, 2004, 06:58:41 PM »

<pre>
I'm not surprised that there would be something wrong with the script below which creates a table and then trys to mass load it from a file....but am puzzled that the error
posted says :  'Table Not Open'    as page (Cool of the
RebDB manual makes clear tables should be closed when attempting this action.

**************   script  **********************
Rebol[]
do %db.r
comment {db-drop mt-table}
db-create mt-table [
   Recv-Date string! 10
   Provider      string! 6
   Svc-Year      string! 4
   Account       string! 12
   Last-Name     string! 28
   First-Name    string! 28
   Mid-Init      string! 1
   Date-of-Birth string! 10
   HIC-Number    string! 15
   Location      string! 2
   Fin-Class     string! 2
   Adm-Date      string! 10
   Dscg-Date     string! 10
   Remit-Pat-Typ string! 1
   Omega-Pat-Typ string! 1
   TOB           string! 2
   Ref-Number    string! 24
   Pymt-Status   string! 2
   Outlier-Amt   string! 18
   Rej-Code      string! 5
   CAS-Amt       string! 18
   Total-Charges string! 15
   Payment-Amt   string! 15
   Deduc-Amount  string! 15
   Coin-Amount   string! 15
   IME-Amount    string! 15     
]

db-close mt-table
bin: make binary! 770 * 281
insert tail bin reduce
[to-bin-string! read %mcare_remit.txt]
write/binary %mt-table.dat bin

****************   error  **********************
>> do %mcare-remit.r
Script: "Untitled" (none)
Script: "RebDB Database" (26-Apr-2004)
Script: "RebDB Library Functions" (none)
Script: "RebDB Datatype Handlers" (none)
Script: "RebDB SQL Alias Functions" (none)
** User Error: Table not open
** Near: to error! :value
</pre>
Logged
Ashley
Newbie
*
Offline Offline

Posts: 37


View Profile
Volume load to RebDB
« Reply #1 on: August 01, 2004, 08:07:10 PM »

Try it with the following changes:
Code:
attempt [db-drop mt-table]
...
attempt [db-close mt-table]
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: Volume load to RebDB
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2008, 06:02:04 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