Why SP doesn't execute? (Urgent)

  • Thread starter Thread starter lemes_m
  • Start date Start date
L

lemes_m

Hi,

I have quite frustrating situation with following code which executes
SP with @Param (int):

DoCmd.RunSQL "EXEC ProcAppend " & Me.Id.Value

Before this code I update some table with Me.Id.Value and it is ok so
it means that parametar value is sent.

Also, when I execute this SP manualy and enter parametar it works fine.

I should mention that this code worked fine and stops without any
reason!

Anyone has some idea?



Regards,

Mirnes Lemes
 
Have you ever gotten this sort of call to work? It would be great if it
was that simple, but I'm wondering where the ODBC connect string
shows up in this equation.

Try something like this ...

1) Create a pass-through query named qryExecProc
2) Set its SQL to ProcAppend 1234 and ODBC connect property
3) Run this code ...
CurrentDb.Querydefs("qryExecProc").SQL = "EXEC ProcAppend " & Me.Id.Value
DoCmd.RunSQL "qryExecProc"

This is how I've always handled it. You can create a new, disposable
querydef object, set its sql and connect properties, and run it, but either
way, I think you need to execute a pass-through query.
 

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

Back
Top