A
AMDiesen
We are attempting to use VBA in excel to access data in an access database.
The code runs in a chinese version of 2007 enterprise, but fails/generates
the following error on a US version of 2007 professional.
Thanks,
run-time error '-2147467259 (80004005)':
Selected collating sequence not supported by the operating system
occurs on this line of code
oRs.Open "SELECT SymbolList.Symbol, SymbolList.DataSource,
UniSymbol.UniSymbol, UniSymbol.TickUnit, UniSymbol.Currency,
UniSymbol.STDevLife, UniSymbol.BiDirFlag FROM UniSymbol INNER JOIN SymbolList
ON UniSymbol.UniSymbol = SymbolList.UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText
selected code sequence below
...........................
' Set up database connection
Dim oRs As ADODB.Recordset
Dim oCnn As ADODB.Connection
Dim i As Integer
Dim bookName As String
bookName = "ver200811181755"
'Connect to your Access db
Set oCnn = New ADODB.Connection
'oCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=R:\CTARDatabase.mdb;User Id=admin;Password=;"
oCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=R:\CTARDatabase.mdb"
oCnn.Open
Set oRs = New ADODB.Recordset
oRs.Open "SELECT SymbolList.Symbol, SymbolList.DataSource,
UniSymbol.UniSymbol, UniSymbol.TickUnit, UniSymbol.Currency,
UniSymbol.STDevLife, UniSymbol.BiDirFlag FROM UniSymbol INNER JOIN SymbolList
ON UniSymbol.UniSymbol = SymbolList.UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText
'oRs.Open "SELECT UnitSym from UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText
The code runs in a chinese version of 2007 enterprise, but fails/generates
the following error on a US version of 2007 professional.
Thanks,
run-time error '-2147467259 (80004005)':
Selected collating sequence not supported by the operating system
occurs on this line of code
oRs.Open "SELECT SymbolList.Symbol, SymbolList.DataSource,
UniSymbol.UniSymbol, UniSymbol.TickUnit, UniSymbol.Currency,
UniSymbol.STDevLife, UniSymbol.BiDirFlag FROM UniSymbol INNER JOIN SymbolList
ON UniSymbol.UniSymbol = SymbolList.UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText
selected code sequence below
...........................
' Set up database connection
Dim oRs As ADODB.Recordset
Dim oCnn As ADODB.Connection
Dim i As Integer
Dim bookName As String
bookName = "ver200811181755"
'Connect to your Access db
Set oCnn = New ADODB.Connection
'oCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=R:\CTARDatabase.mdb;User Id=admin;Password=;"
oCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=R:\CTARDatabase.mdb"
oCnn.Open
Set oRs = New ADODB.Recordset
oRs.Open "SELECT SymbolList.Symbol, SymbolList.DataSource,
UniSymbol.UniSymbol, UniSymbol.TickUnit, UniSymbol.Currency,
UniSymbol.STDevLife, UniSymbol.BiDirFlag FROM UniSymbol INNER JOIN SymbolList
ON UniSymbol.UniSymbol = SymbolList.UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText
'oRs.Open "SELECT UnitSym from UniSymbol;", oCnn, adOpenKeyset,
adLockReadOnly, adCmdText