Hi there, friends,
Maybe someone can help me with this error. Im using dBASE2000 (db2k).
I hope someone here knows it. Im testing Interbase on Linux. I think it
easy to setup and very fast. But I have a problem inserting records into
a table. This happens also with the local server version.
When I try to insert a record into a table I get the error "TABLE IS
READONLY". I do not get any errors if I issue the same SQL sentence
inside IBConsole. I have pasted the program at the end of this message
Thanks for any help,
Jaime Escobal
jaime.esco...@laviga.com
p.s.
the permissions for the database file in linux are : -rw-rw-rw-
-------------------------------------------------------------------
This is the program:
clear
o = new database()
o.databaseName := "OTIB"
o.loginString := "SYSDBA/masterkey"
o.active := true
q = new query()
q.database := o
q.rowset.indexName := "ITEMSIV1"
q.active := false
q.sql := [ SELECT IDFAC,NUFAC,NUITM FROM ITEMSIV ] + ;
[ WHERE IDFAC =:IDFAC AND NUFAC =:NUFAC ]
q.params["IDFAC"] := "B1"
q.params["NUFAC"] := "0000005"
q.active := true
* end program if no data found
************************
if q.rowset.endofSet
? "no data"
return
endif
* print rows found
***************
do while not q.rowset.endOfSet
? q.rowset.fields["IDFAC"].value
?? q.rowset.fields["NUFAC"].value
?? q.rowset.fields["NUITM"].value
q.rowset.next()
enddo
* delete first row found (ok!)
********************************
q.rowset.first()
q.rowset.beginEdit()
q.rowset.delete()
q.rowset.save()
* execute new insert query (this fails!)
********************************************
q1 = new query()
q1.database := o
q1.active := false
q1.sql := [ INSERT INTO ITEMSIV (IDFAC,NUFAC,NUITM) ] + ;
[ VALUES ( "B1", "0010000", 1 ) ]
q1.active := true // AT THIS POINT I GET THE "TABLE IS READONLY" ERROR
* end of program