开发者

Invalid Arguments error

I just migrated our web app database from sybase sql anywhere 11 to SQL Server 2008 R2 express and when i tried to compile WCF service which interfaces with SQL server i go multiple errors and most visible among them is the one below.I never saw this issue when our database was sybase.

Error  5 The best overloaded method match for 
'GlobeMailServiceLibrary.GMDatabaseService.KioskDataSetTableAdapters.Kiosk.CreateFolder(int?, 
string, bool?, bool?, ref int?)' has some invalid arguments
C:\WebMailDev\Code\GlobeMailServiceLibrary\GMDatabaseService\GMDatabaseService.40
 13 GlobeMailServiceLibrary

Here is the WCF service method from where Stored procedure is called and executed :-

private int CreateFolder(int iUser, string strFolder, bool bUserCreate, bool bOutgoing)
    {
        int iFolder;
        DBEncoder.EncodeObject(ref strFolder);
        KioskAdapter.CreateFolder(iUser, strFolder, bUserCreate, bOutgoing, out
                                  iFolder);            
        return iFolder;
    }

Here is the Stored Procedure definition :-

create procedure dbo.CreateFolder( @v_userID integer,@v_foldername varchar(512),@v_IsUserDefined 
                                   bit,@v_IsOutGoing bit,@v_folderID integer Output) 
    AS
    begin
       --set option MAX_STATEMENT_COUNT = 0;
       --set option MAX_CURSOR_COUNT = 0;
        insert into GCK_Folder( Fol开发者_运维技巧dername,IsUserDefined,IsOutGoing,UserID ) values( 
                                @v_foldername,@v_IsUserDefined,@v_IsOutGoing,@v_userID ) ;
        set @v_folderID = @@IDENTITY
 end
 go

I commented out the Set OPTION MAX_STATEMENT_COUUNT and MAX_CURSON_COUNT because i don't know equivalent command of Sybase in SQL server 2008 R2 express.


The issue you're having is that GlobeMailServiceLibrary.GMDatabaseService.KioskDataSetTableAdapters.Kiosk.CreateFolder is expecting ref int? for the last parameter, and you're passing an out parameter instead, which doesn't match the required signature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜