View Single Post
Old 27-Feb-2007, 04:03 AM   #1 (permalink)
Sangeetha
Fixed Error!
 
Sangeetha's Avatar

Posts: 139
Location: Chennai
Join Date: Feb 2007
Rep Power: 2 Sangeetha is on a distinguished road

IM:
Default Must declare the scalar variable.... using Union Statement

Question: <asp:SqlDataSource ID="contractAuthSQL" runat="server" ConnectionString="<%$ ConnectionStringsartridgeConnectionString %>"
SelectCommand="SELECT type, info_JobNumber, info_Company, info_Phase, info_ProjectStartDate, info_Total FROM [tbl_PoAuthorization] WHERE info_AuthNumber = @info_AuthNumber UNION SELECT type, info_JobNumber, info_Company, info_Phase, info_ProjectStartDate, info_Total FROM [tbl_ContractAuth] WHERE info_AuthNumber = @info_AuthNumber"></asp:SqlDataSource>


Server Error in '/' Application.
Must declare the scalar variable "@info_AuthNumber".
Must declare the scalar variable "@info_AuthNumber".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@info_AuthNumber".
Must declare the scalar variable "@info_AuthNumber".
Sangeetha is offline   Reply With Quote