I have a problem with the
<asp:SqlDataSource.The thing that I try to do is to create a SQLstatement.I am not sure if this can be done or not ( just started asp.net).
The problem is that is giving me an error that I can’t figure out.
-------------------------------------------------
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: Line 1: Incorrect syntax near '<'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
nbgd_28
Member
15 Points
3 Posts
In line code in <asp:SqlDataSource
Jun 16, 2006 04:41 PM|LINK
Hi,
I have a problem with the <asp:SqlDataSource. The thing that I try to do is to create a SQL statement. I am not sure if this can be done or not ( just started asp.net).
Something like this:
<%
Dim Test1 As String
Dim Test2 As String
Dim Test3 As String
Dim Test4 As String
Test1 = Request("xmbr")
Test2 = Request("xSEL")
Test3 = Request("xpro")
Test4 = "SELECT [jedan], [dva], [tri], [cetiri], [pet] FROM [pet1] where " & (Test1) & " " & (Test2) & "'" & (Test3) & "'"
%>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FinGateConnectionString %>" SelectCommand="<%= Test4%>">
The problem is that is giving me an error that I can’t figure out.
-------------------------------------------------
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: Line 1: Incorrect syntax near '<'.
Source Error:
-------------------------------------------------
Thanks.
Nbdg_28