ADO / SQL /

J

JT

Dim Recordset As ADODB.Recordset
Set Recordset = New ADODB.Recordset

vDataBase = ActiveWorkbook.Sheets("Macros").Range("E6")
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= '" &
vDataBase & "';Persist Security Info=False"

Dim r As Integer
r = 5

Do Until Len(Cells(r, 1)) = 0

Sql = "append [JV_Info] set [Customer Number] = '" & Cells(r, 1) & "'


Call Recordset.Open(Sql, ConnectionString, adOpenForwardOnly,
adLockReadOnly, CommandTypeEnum.adCmdText)

r = r + 1

Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top