Click to See Complete Forum and Search --> : how to insert record at mdb file. The record values is from a array.


Awei Ken
July 20th, 2000, 10:05 PM
Hi. I have a question.
I want to insert record into mdb file with sql "INSERT INTO Statement" .but the record values need read from a array.how can i do?
code is like
conn.execute("insert into userinfo (name,sex,age,email,ccmail,Subscribe) values(array(1),array(2),array(3),array(4),array(5),array(6))")
the type of array(2),array(3) int
others is string
code write with VB Script.
thanx.

Lothar Haensler
July 21st, 2000, 02:18 AM
>conn.execute("insert into userinfo (name,sex,age,email,ccmail,Subscribe) values(array(1),array(2),array(3),array(4),array(5),array(6))")

conn.execute("insert into userinfo (name,sex,age,email,ccmail,Subscribe) values('" & array(1) & "'," & array(2) &" ," & array(3) & ",'" & array(4) & "','" & array(5) "','" & array(6) & "')")

Awei Ken
July 21st, 2000, 05:25 AM
Thank you .it's fine.