Sybase stored procs from ADO
Discussion
Got a weird one...
I have a Sybase stored proc. When I call this from a SQL tool (RapidSQL in this case) it works. But when I make the same call from ADO it fails.
Has anybody come across such an issue before? Is there anything special I need to do to get ADO working with Sybase properly. Standard SQL statements work fine, just this stored proc...
Thanks
I have a Sybase stored proc. When I call this from a SQL tool (RapidSQL in this case) it works. But when I make the same call from ADO it fails.
Has anybody come across such an issue before? Is there anything special I need to do to get ADO working with Sybase properly. Standard SQL statements work fine, just this stored proc...
Thanks
jimothy said:
Got a weird one...
I have a Sybase stored proc. When I call this from a SQL tool (RapidSQL in this case) it works. But when I make the same call from ADO it fails.![]()
Has anybody come across such an issue before? Is there anything special I need to do to get ADO working with Sybase properly. Standard SQL statements work fine, just this stored proc...
Thanks
1. Make sure that you are using the same login
2. Make sure that you are calling the correct proc in the correct database.
Sybase firstly looks in your current database for a named proc, if it can't find a match within this database it then looks in sybsystemprocs database - could be that you are in the wrong database and there is another proc with the same name in sybsystemprocs.
to make sure you could try:-
exec <dbname>.<procname>
exec testdatabase.newproc
[exec[ute]] [@return_status = ]
[[[server .]database.]owner.]procedure_name[;number]
[[@parameter_name =] value |
[@parameter_name =] @variable [output]
[,[@parameter_name =] value |
[@parameter_name =] @variable [output]...]]
[with recompile]
It's definately the right proc that is being called.
Basically, the proc does some inserts/updates to a table, then checks that these inserts/updates have worked. If they don't work, then proc rolls back and returns an error code.
When it's run from isql etc. it works fine and returns 0
When its run from ADO it returns the error code. So I've no idea whats going wrong. it appears to work up to a point, but not actually do the insert on the table.
Unfortunatly there's no Sybase error being reported that can help...
Basically, the proc does some inserts/updates to a table, then checks that these inserts/updates have worked. If they don't work, then proc rolls back and returns an error code.
When it's run from isql etc. it works fine and returns 0
When its run from ADO it returns the error code. So I've no idea whats going wrong. it appears to work up to a point, but not actually do the insert on the table.
Unfortunatly there's no Sybase error being reported that can help...
sybaseian said:
jimothy said:
sybaseian said:
do you have dba priv?
Unfortuantely not, as a mere monkey I have no sa rights and can't even change the proc I'm calling
OK - that's going to be a major problem. You will have to go and talk to the DBAs and get them to investigate further.
Ian
Great - they're outsourced so English isn't their first or even second language
Thanks for all you help, and nice car
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff




