::blowmage:: RSS

Archive

Jun
5th
Thu
permalink
permalink
permalink
permalink
Jun
2nd
Mon
permalink
Coding in an Enterprise(found via Ingrid Henkel)
Coding in an Enterprise

(found via Ingrid Henkel)
May
23rd
Fri
permalink
permalink
May
21st
Wed
permalink
May
16th
Fri
permalink
May
15th
Thu
permalink

MDB to CSV via VBScript

Option Explicit

Dim strDBPath : strDBPath = "c:\temp\test.mdb"
Dim strCSVDirPath : strCSVDirPath = "c:\temp\"
Dim strCSVFileName : strCSVFileName = "CSVExport.csv"
Dim strTableName : strTableName = "SomeTable"
Dim objConnection : Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = " & strDBPath
Dim commandstring : commandstring = "SELECT * INTO [text;HDR=Yes;Database=" & _
strCSVDirPath & "]." & strCSVFileName & _
" FROM " & strTableName
objConnection.Execute commandstring
(from: http://www.visualbasicscript.com/m_46549/tm.htm)