Page 1 of 1

TMSStoredProc problem: Syntax error or access violation (-2147217900)

Posted: Thu 06 Dec 2007 20:40
by zedmartins
I found an error executing Stored Procedures using SDAC.

Inside the database on SQL Server 2000, I have two Stored Procedures with same name but different owners:
dbo.NOVO_CODIGO
teknisa.NOVO_CODIGO

Connected with user teknisa, I set the StoredProcName property of the MSStoredProc to "NOVO_CODIGO" (without the owner) and try to execute the procedure. I get the error:
Erro de sintaxe ou violação de acesso
(syntax error or access violation)

if I delete the other procedure (dbo.NOVO_CODIGO) the problem disappear.

I'm using SDAC 6.10.0.10 and MSDAC 2.

Is there a way to make it work without deleting the other procedure or adding the user/owner to the StoredProcName property?

We are stopping using Delphi ADO components and changing them to ODAC and SDAC. Modify the StoredProcName is hard to do 'cause the application is huge and there is a ton of forms and components to check.

Thanks a lot,

Posted: Fri 07 Dec 2007 13:34
by Antaeus
The best way to resolve this problem is to add the schema name to the stored procedure name explicitly. If the schema name is not specified, SDAC cannot determine, which of procedures to use because there is no enough information for that. By default the procedure from the dbo schema is used.
All we can do is to modify GetStoredProcNames methods to let retrieving stored procedure names with schema names.

Posted: Fri 07 Dec 2007 14:15
by zedmartins
I think I can add some code to some application library to add the schema automaticaly...

Thanks,