Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sat, 21 Feb 2009 04:08:01 -0800, Nigel Legg
<nigel.legg.at.katugas-research-services.co.uk wrote: I have an Access 2007 database, which I want to write different sets of data into. The datawill come from a web app in tab delimited or XML files, and will require some reformatting in Excel prior to adding to Access, for example the column headers in the tab delimited file become records in a table. I therefore need to open my access database and the correct table within it, and append the data, using VBA. How is this done? I can find plenty of reference to taking data in the opposite direction, but nothing on writing to Access. Nigel: For this, I use ADO. Specifically I use the Execute method of the Connection object sqlInsert = "INSERT INTO tblTable.... etc." adoConn.Execute sqlInsert Here's some other resources: http://www.dailydoseofexcel.com/arch...do-parameters/ http://www.dailydoseofexcel.com/arch...tables-in-vba/ http://www.dailydoseofexcel.com/arch...ordset-basics/ http://www.dailydoseofexcel.com/arch...essons-in-sql/ Note that while the Execute method is the easiest way, everyone tells me I should be using the Command object and Parameters objects. If you're already familiar with ADO, you may want to look into those objects. -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Update Access 2007 Table Using Excel 2007 VBA | Excel Programming | |||
Write data to Access table with INSERT when table has auto number | Excel Programming | |||
Write data to access file through EXCEL | Excel Programming | |||
Write data to access file through EXCEL | Excel Programming | |||
Write data to access file through EXCEL | Excel Programming |