sqlcommand where condition use dynamic value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • martin1

    #1

    sqlcommand where condition use dynamic value

    Hi, All,

    In the aspx page sqlDataSource section, I try to use dynamic value in
    selectCommand where condition, anyone knows how? or correct foramt to use the
    dcnid value

    Dim dcnid=12

    <asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server" ConnectionStrin g="<%$
    ConnectionStrin gs:ConnectionSt ring %>"
    SelectCommand=" SELECT * FROM table1 where id =dcnid? ">

    </asp:SqlDataSour ce>

    Thanks
Working...