LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Jordan
 
Posts: n/a
Default Microsoft][ODBC SQL Server Driver]Syntax error or access violation

I have been using and Excel 2000 spreadsheet that has a link to external
data created by using MS Query. There is a cell on the top of the sheet set
so when I change the content, the query refreshes using this cell as the
parameter.

Recently we changed the datasource from a MS Access back end up to a MS SQL
2000 back end. I recreated the link to the datasource the same way by using
MS Query and choosing the SQL ODBC datasource instead of the Access
datasource and now the queries that have parameters will not return to Excel
2000 (sp3). I keep getting an error that says:

[Microsoft][ODBC SQL Server Driver]Syntax error or access violation

This query with a parameter runs fine in MS Query but if I save the query as
a DQY file and try to open it and it fires up Excel, I get the error. If I
change the parameter to a set value, then it runs fine again. This does not
appear to be a problem in Excel 2003. It is only Excel 2000 that I have
seen.

Here is the query from two left joined tables [RMA] and [Repair Serial
Numbers]:

SELECT
RMA.DateIssued,
RMA.SalesOrderNumber,
RMA.RMANumber,
RepairSerialNumbers.ProductNumber,
RepairSerialNumbers.Evaluation,
RepairSerialNumbers.Repair,
RepairSerialNumbers.FailureCode,
RMA.CustomerID,
RepairSerialNumbers.SerialNumber
FROM
{oj QualityTracking.dbo.RMA RMA LEFT OUTER JOIN
QualityTracking.dbo.RepairSerialNumbers RepairSerialNumbers
ON RMA.RMANumber = RepairSerialNumbers.RMANumber}
WHERE (RMA.CustomerID=?)



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server ODBC Error Art Saffran Excel Discussion (Misc queries) 0 March 24th 05 02:37 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 7 March 7th 05 06:29 PM
Error trapped only while stepping through the code - Not triggered when run Jeff Excel Discussion (Misc queries) 0 February 28th 05 06:26 PM
Submit to SQL Server error Jim Hutchinson Excel Discussion (Misc queries) 1 February 25th 05 01:45 PM
error saving a new file on server Jason Excel Discussion (Misc queries) 1 February 21st 05 10:56 PM


All times are GMT +1. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"