You could try this to get you started - its a bit over the top as you
do not need a recordset to insert, update or delete data.
'create the connection string - called cn1 in this case with a DSN
called myDSN
set cn1 = wscript.createobject("ADODB.Connection")
cn1.commandtimeout=1000
cn1.open "myDSN"
'create your record set called rs1 in this case
set rs1 = wscript.createobject("ADODB.Recordset")
sql = "Insert into mytable (col1, col2) Values ('va1', 'val2')"
'write the data to the DB
rs1.open sql, cn1
To use the ADODB.Command object I think the below should work:
set cn1 = wscript.createobject("ADODB.Connection")
cn1.commandtimeout=1000
cn1.open "myDSN"
set myComm = wscript.CreateObject("ADODB.Command")
myComm.ActiveConnection = cn1
myComm.CommandText ="Insert into mytable (col1, col2) Values ('va1',
'val2')"
myComm.Execute
R
Richard Gascoigne
How are you reading the data? With a SQL SELECT query, right? Use an
INSERT query to do the reverse.
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!