vba run-time error between 2 difference releases of excel/access 2

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top