Error when calling sproc with varchar OUTPUT parameter


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
No joy. I'm getting the same error Crying
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Try this to see if it resolves your problem.  This will need to replace the Enterprise assembly on your server.
Attachments
MicroFour StrataFrame Enterprise.zip (205 views, 20.00 KB)
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
SQL Server allows you to set the value of a single variable using the 'Set' keyword (in addition to being able to do the same thing with 'Select'). The SQL is valid, you can test it in Query Analyzer (or SQL Server Management Studio). Further, if you run the application using ConnectionManager (direct connect to SQL Server), the BO calls the sproc successfully.



Thanks for the post in any case BigGrin
Peter Jones
Peter Jones
StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)StrataFrame User (456 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Greg,

A thought: should the last statement be a Select rather than a Set, i.e.

  Select @Details = 'Total amount = ' + Convert(varchar(15),IsNull(@Total,0),1) + CHAR(13) + CHAR(10)
               + 'Total Orders = ' + Convert(varchar(12),IsNull(@TotalOrders,0)) + CHAR(13) + CHAR(10)
               + 'Total Unique Products = ' + Convert(varchar(12),IsNull(@TotalProducts,0)) + CHAR(13) + CHAR(10)

Cheers, Peter

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I'm getting an error when I attempt to call a stored procedure that has an output parameter that is a varchar. It reports that the size is invalid with a value of 0. However, the size is clearly set in code and the code runs fine when connected directly.



I've attached a sample solution that highlights this problem. Just read the Readme.txt for details on how to run the tests.



This is a show stopper for my project, which I'm attempting to release for beta testing.



Thanks!
Attachments
TestESCallingSproc.zip (201 views, 735.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search