Quote:
quote:Originally posted by mmcdonal
I am thinking this might have something to do with Jet supporting ANSI 89, and you using something a little more advanced, like 92. Can you recast the VBA SQL in 89 syntax and see if that works?
mmcdonal
|
Thanks for your responce but I am sending this as a passthrough Query, so that should bypass Jet and ODBC for that matter.
See Below for code.
Dim cnn As ADODB.Connection
Dim rst_PersonDetails As ADODB.Recordset
Dim strSQL As String
Dim intInventory As Long
Dim strIMItemCode As String
Set cnn = New ADODB.Connection
Set rst_PersonDetails = New ADODB.Recordset
strSQL = "SELECT " _
& "tblInventoryTransactions.IMItemCode, " _
& "tblInventoryTransactions.RicoeInventory, " _
& "SUM(tblInventoryTransactions.Received) as sReceived " _
& "From " _
& "tblInventoryTransactions " _
& "Where " _
& "tblInventoryTransactions.IMItemCode = 'HELP56140902' " _
& "Group By " _
& "tblInventoryTransactions.IMItemCode, " _
& "tblInventoryTransactions.RicoeInventory " _
& "Order By " _
& "tblInventoryTransactions.IMItemCode Asc, " _
& "tblInventoryTransactions.RicoeInventory Asc"
cnn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=172.20.40.147;" _
& "DATABASE=Cust_Dev;" _
& "USER=stephej;" _
& "PASSWORD=;" _
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384 + 524288
cnn.Open
rst_PersonDetails.CursorLocation = adUseServer
Set rst_PersonDetails = cnn.Execute(strSQL, adCmdText)