#1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default ADO / SQL /

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


--
JT
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"