Pregunta

I'm attempting to create a very simple stored procedure with one parameter in MS-Access 2003.

CREATE PROC procTest(lname VARCHAR(50)) AS 
SELECT * FROM T_Employees t WHERE t.LastName = lname;

I get the error:

Error: [Microsoft][ODBC Microsoft Access Driver]Syntax error or access violation
SQLState:  37000
ErrorCode: 55

I'm a real n00b at stored procedures so I'm not sure what the issue is here...

¿Fue útil?

Solución

You're attempting to create the procedure from an ODBC connection.

Error: [Microsoft][ODBC Microsoft Access Driver]

CREATE PROCEDURE was introduced in Jet 4, and AFAIK can only be executed from ADO, and ODBC supports only DAO, not ADO.

I suspect you will not be able to create that parameter query from Squirrel SQL. You must either create it from within Access or via an ADO connection.

Or if you can shell out from Squirrel to run a VBScript, create one which uses an ADO connection to create that query.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top