rbaldwin
Posts: 172
|
Posted: 07/08/2009, 9:13 AM |
|
vb.net
i'm coding something like this
dim where = "name = 'fred'"
DirectCast(Select_,TableCommand).Where = where
but i get error like
Unable to cast object of type 'IP360Dashboard_2.Data.SqlCommand' to type 'IP360Dashboard_2.Data.TableCommand'.
what am i doing wrong?
|
|
|
rbaldwin
Posts: 172
|
Posted: 07/15/2009, 6:54 AM |
|
As per support:
I believe that you're using SQL data source type for the form. In this case the entire query is stored in SqlQuery property. You cannot access the Where property and edit it, you need to modify query directly via SqlQuery in Before Execute Select event:
CType(Select_,TableCommand).SqlQuery = new StringBuilder("select * from table_name where field1=" & System.Web.HttpContext.Current.Request.QueryString("param_name"))
|
|
|
|