Greg McGuffey
|
|
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!
|
|
|
Peter Jones
|
|
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
|
|
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
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Try this to see if it resolves your problem. This will need to replace the Enterprise assembly on your server.
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
No joy. I'm getting the same error
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Did you replace the assembly within the \bin folder and recycle the application pool through IIS? Either we gave you the wrong DLL, or the server is still looking at the old one. Also, do you have the assembly in the GAC on the server?
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
I only updated the server, but after reading this post http://forum.strataframe.net/FindPost12475.aspx, I realized that I need to update my client as well. I'm going to give that a try.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Well, the problem was that the value was being serialized, but after being deserialized, it wasn't being set on the parameter, so updating it on the client really shouldn't matter. But, let me know one way or the other.
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
I just updated my client, putting new enterprise dll in the SF folder in Common Files and in the GAC. I double checked that the server was updated. I restarted IIS, just to be sure. I'm still getting same error.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Then it looks like we posted the wrong DLL. Let me get the latest one for you.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
OK, try this one on the server.
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
That did the trick! Thanks Ben!
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Should I update this DLL on my client too?
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Yes. Put this on your client as well.
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
OK, will do. Thanks again!
|
|
|