Advertisement
Advertisement
| 04.03.2008 at 08:26PM PDT, ID: 23294978 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: |
Option Explicit
Dim strAccessDBName, strExcelName
strAccessDBName = "C:\temp\test.mdb"
strExcelName = "C:\temp\excel.xls"
Dim objConn, objRs
Set objConn = CreateObject ("ADODB.CONNECTION")
Set objRs = CreateObject("ADODB.RECORDSET")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strAccessDBName
Dim objCat, objTable
Set objCat = CreateObject("ADOX.Catalog")
objCat.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & strAccessDBName & ";Uid=;Pwd=;"
Dim strSQL
For Each objTable in objCat.Tables
If objTable.Type = "TABLE" Then
strSQL = "SELECT * INTO [Excel 8.0;Database=" & strExcelName & "].[" & objTable.Name & "] FROM " & objTable.Name
objRs.Open strSQL, objConn, 3, 3
End If
Next
Set objCat = Nothing
Set objRs = Nothing
Set objConn = Nothing
|