vb.net - how to use select (col array())from table -
public overloads function setdata(table tables, col() string) statuez dim dd new dataset, state new statuez try dd = r.dset(table, "select **col()** " & table.tname & " username='" & table.user & "'") dg.datasource = dd.tables(0) state.done = true catch ex exception state.done = false state.message = ex.message end try return state end function
*** col() string array holds names of columns needed
is there way select column array out typing every member of array ?
you can this:
dim result string = string.join(",", col)
then use result
in select
statement.
aside this, perhaps should @ parameterizing statements vulnerable sql injection.
Comments
Post a Comment