call stored procedure from access

N

npiet

hello

i have an access application (access 97) which access sql database via
odbc on unix server (ingres database).

actually, i update the sql database through odbc like this :

sql = "update Colis "
sql = sql + "set KG_Brut = " & Local_Colis.Fields("KG_Brut")
sql = sql + ", KG_Net = " & Local_Colis.Fields("KG_Net")
sql = sql + " where Cde_Client = '" &
Local_Colis.Fields("Cde_Client") & "' and"
sql = sql + " Machine = '" & Local_Colis.Fields("Machine") & "' and"
sql = sql + " Seq_Colis = " & Local_Colis.Fields("Seq_Colis")

G_RemoteDB.Execute sql, dbFailOnError

and it's ok.

from now i would like to call a stored procedure (existing in the sql
database) instead of the direct update.

i try to do this :

sql = "execute procedure proctest "
G_RemoteDB.Execute sql, dbFailOnError


the execution fail with this error :

'le moteur de la base de données ne peut pas trouver la
table ou la requête source "execute procedure proctest" . Assurez vosu
qu'elle existe et qu'elle est correctement orthographiée'


do you know what is the syntax to call a procedure through odbc ?
 
S

Stefan Hoffmann

hi,

i have an access application (access 97) which access sql database via
odbc on unix server (ingres database).
from now i would like to call a stored procedure (existing in the sql
database) instead of the direct update.
sql = "execute procedure proctest "
G_RemoteDB.Execute sql, dbFailOnError
the execution fail with this error :
To execute a stored procedure you can only use passthrough queries. Take
a look at the OH and google for "access passthrough stored procedure".


mfG
--> stefan <--
 

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

Top