Snailspace
Board Regular
- Joined
- Jan 28, 2009
- Messages
- 56
I’m trying to access a table on my works server, I’ve managed to connect and import using data import, which if recorded produces the following
<o></o>
I’d like to query the table using ADODB, however I’m struggling to get the connectionstring I need to connect to the table.
The System DSN is an iSeries Access ODBC Driver.
<o> </o>
Thanks for any help<o></o>
SP
Rich (BB code):
' With ActiveSheet.QueryTables.Add(Connection:="ODBC;DSN=CAMIRA01;", _<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
' Destination:=Range("A1"))<o:p></o:p>
' .CommandText = Array("SELECT * FROM ""CAMIRA01"".""CMED"".""CREDITLIST""")<o:p></o:p>
' .Name = "CAMIRA01 CREDITLIST"<o:p></o:p>
' .FieldNames = True<o:p></o:p>
' .RowNumbers = False<o:p></o:p>
' .FillAdjacentFormulas = False<o:p></o:p>
' .PreserveFormatting = True<o:p></o:p>
' .RefreshOnFileOpen = False<o:p></o:p>
' .BackgroundQuery = True<o:p></o:p>
' .RefreshStyle = xlInsertDeleteCells<o:p></o:p>
' .SavePassword = True<o:p></o:p>
' .SaveData = True<o:p></o:p>
' .AdjustColumnWidth = True<o:p></o:p>
' .RefreshPeriod = 0<o:p></o:p>
' .PreserveColumnInfo = True<o:p></o:p>
' .SourceConnectionFile = _<o:p></o:p>
' "C:\Documents and Settings\cmed\My Documents\My Data Sources\CAMIRA01 CREDITLIST.odc"<o:p></o:p>
' .Refresh BackgroundQuery:=False<o:p></o:p>
' End With
I’d like to query the table using ADODB, however I’m struggling to get the connectionstring I need to connect to the table.
The System DSN is an iSeries Access ODBC Driver.
<o> </o>
Thanks for any help<o></o>
SP