Here is a sample, Shawn sent me once, of how to write data to an Access Database using dao dbengine

errmm , with your permission Shawn !?

code:

break on

$engine = "dao.dbengine.35"
$database = "%0\..\mydatabase.mdb"
;========================
; Connect to database ...
;========================

$dbe = olecreateobject ( "$engine" )

if @error goto finish endif

;======================
; Open the database ...
;======================

$dbs = val ( "&" + olecallfunc ( $dbe, "opendatabase", "s", "$database" ))

if @error goto finish endif

;==================================
; Create a new table and schema ...
;==================================

$rs = olecallfunc ( $dbs, "execute", "s",
"CREATE TABLE JOCHEN (FULLNAME TEXT, BBSNAME TEXT);" )

if @error goto finish endif

;===========================
; Add some data to table ...
;===========================

$rs = olecallfunc ( $dbs, "execute", "s",
"INSERT INTO JOCHEN (FULLNAME,BBSNAME) VALUES ('Jochen Polster', 'jpols');")

if @error goto finish endif

;================================
; Add some more data to table ...
;================================

$rs = olecallfunc ( $dbs, "execute", "s",
"INSERT INTO JOCHEN (FULLNAME,BBSNAME) VALUES ('Shawn Tassie', 'Shawn');")

if @error goto finish endif

;======
:finish
;======

if @error
?
?"System error @error occurred."
?"@serror"
endif

if $dbe
$= olereleaseobject ( $dbe )
endif

if $dbs
$= olereleaseobject ( $dbs )
endif

?

exit


Jochen

_________________________