How to convert the .xsl files or .txt file data into .mdb file through vb programming?
Posted on 2001-06-20
For this ...Iam creating DSN for excel or txt
i have DSN for .mdb
i used the following code
for ex: my txt files
Customer name Address
but iam getting the whole line value into rs(0).But i want rs(0) as Rajani and rs(1) as XXXX
how?can u suggest some sample codes?
Private Sub chgdata()
Dim conn As adodb.Connection
Dim cmd As adodb.Command
Dim rs As adodb.Recordset
Set rs = New Recordset
Set conn = New Connection
mysql = "select * from acrtest.csv"
rs.Open mysql, conn, adOpenDynamic
Set cmd = New Command
cmd.ActiveConnection = MDIForm1.dfwConn
Do While Not rs.EOF
insql = "insert into cust values('" & rs(0) & "','" & rs(1) & "')"