[thelist] simple query building question
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Wed Aug 10 14:41:05 CDT 2005
Linguistic nitpick: it's not a webmatrix datagrid, it's an ASP.NET datagrid :)
Are you assigning this property in the tag itself? I don't think it'll work that way. Try abstracting this out the Page_Load subroutine, like this:
myDG.SelectCommand="SELECT * FROM MCCIME_Doctor WHERE state = '" & get_state & "' "
(make sure you remove that extra space inside your concatenated variable value too)
From: "Casey" aspnet at thecrookstons.com
In a web matrix datagrid, I need a variable WHERE clause.
SelectCommand="SELECT * FROM MCCIME_Doctor WHERE state = 'CA' "
that works fine, but
SelectCommand="SELECT * FROM MCCIME_Doctor WHERE state = ' " & get_state & "
' "
does not work. Not sure if it's because I'm declaring the variable wrong,
of if my syntax is wrong.
Sub Page_Load(Src As Object, E As EventArgs)
dim get_state as string = request.querystring("state")
end sub
"The server tag is not well formed" is the error.
More information about the thelist
mailing list