Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

7357 err w/openquery to excute a stored proc on a linked sysbase ser

Status
Not open for further replies.

ToddF

Programmer
Oct 17, 2002
5
US
I have set a linked server to a sybase server from my sql server.

I can execute stored procedures on the sybase server using the following

select * from openquery(sysbasServe,'
execute todd_test_1')

but when I put add an input parameter and call it using

select * from openquery(sysbasServe,'
execute todd_test_1 6')

I get the following error

Server: Msg 7357, Level 16, State 2, Line 1
Could not process object '
execute todd_test_1 6 '. The OLE DB provider 'Sybase.ASEOLEDBProvider' indicates that the object has no columns.
OLE DB error trace [Non-interface error: OLE DB provider unable to process object, since the object has no columnsProviderName='Sybase.ASEOLEDBProvider', Query=
execute todd_test_1 6 '].

Do I have the syntax wrong?

Thanks for any help.



 
Take a look at your 'todd_test_1' procedure, what it does when you pass in parameter 6.
May be that your procedure do not create any result when you pass that parameter, so you can't do SELECT * FROM nothing



Zhavic



---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
 
Unfortunately this is not the problem. If I take the values I am trying to pass and set them as the default to the parameters in the stored procedure it runs fine.
 
Have you received an answer to this? I have the EXACT same problem...on my end, whe I execute the openquery statment, it "works", meaning it has an effect on the sybase side (it updates the account record), but it returns the no-column error.

Incidentally, I did get something like this to work by creating a DTS package with a global variable that set the SQL propert of an Execute SQL task which pointed to the SYBASE connection. I then executed the DTS by using an xp_cmdshell with a dtsrun commandline statement that passes my global variable.

This will work fine for seldom used statements send to SYBASE.

I needed to run this 10 - 20 thousand times a pop, so obviously running that many DTS packages was out of the question from a performance perspective, but it may work for you.

Thanks,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top