Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using stored procedures in shape commands

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-07 : 17:38:44
Leif writes "When trying to retrive a shaped recordset i get the following problem:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'sp_mub_menuitem'.

On the following command:
SHAPE {sp_mub_menubuttons '261293C4-A4D7-4CE5-89F8-BFC5171F99C6' ,'10.47.17.152'} APPEND({sp_mub_menuitem '261293C4-A4D7-4CE5-89F8-BFC5171F99C6' ,'10.47.17.152'} As menuitem RELATE menubuttonID TO menubuttonID)

If i rewrite the code to:
SHAPE {sp_mub_menubuttons '4809836B-1DA8-47AB-9C4F-0456EC134F01' ,'10.47.17.152'} APPEND({Select menubuttonID, menutext, querystring From mub_menuitem} As menuitem RELATE menubuttonID TO menubuttonID)

it works.

The problem is that i must use the sp in the second select to, isn't that possible.

Below follows the beginning and end of sp_mu_menuitem And sp_mub_menubuttons

Alter Procedure sp_mub_menuitem
(
@pc_sessionID char(36),
@pc_IP char(15)
)
As
<SNIPP>
Select menubuttonID, menutext, querystring + '&sessionID=' +@pc_sessionID As querystring
From #menuitems


Alter Procedure sp_mub_menubuttons
(
@pc_sessionID char(36),
@pc_IP char(15)
)
As
<SNIPP>
Select menubuttonID, buttonName, buttonText
From #menubuttons"
   

- Advertisement -