Click here to Skip to main content
16,021,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to query a SQL Data Source by using the asp.net Membership Provider Comment Field as a parameter.
My Query String looks like this:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dot_FremdConnectionString %>"
        SelectCommand="SELECT Maschine, Typ, Hostname, IP, Status FROM test WHERE Kunde= @Comment"
        <SelectParameters>
            
        </SelectParameters>


So i am wondering about the SelectParameter.
Can anyone told me how to write this SelectParameter?

Thank you in advance.

Posted

1 solution

Here is a good link to an in depth explanation on how to query a sql datasource. Also how to use VS tool to configure an SQL Datasource and generate code for you.


http://www.asp.net/(S(pdfrohu0ajmwt445fanvj2r3))/learn/data-access/tutorial-48-vb.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900