asp.net : flitting outmost non-static <asp:sqldatasource> add-on asp.net 2.0
i'm conceptualizing vb formed asp.net 2.0, i am perplexing some-more several asp tags visible studio provides, rather palm minute all code-behind. i wish pass an outmost non-static event brand user query.
<asp:sqldatasource id="datastores" runat="server" connectionstring="<%$ connectionstrings:my_connection %>"
providername="<%$ connectionstrings:my_connection.providername %>"
selectcommand="select thing1, thing2 data_table where (thing2 (select thing2 related_data_table where (username = @user)))"
onselecting="data_stores_selecting">
<selectparameters>
<asp:parameter name="user" defaultvalue ="" />
</selectparameters>
</asp:sqldatasource>
and formula behind i have:
protected servant data_stores_selecting(byval sender object, byval e system.web.ui.webcontrols.sqldatasourceselectingeventargs) handles data_stores.selecting
e.command.parameters("user").value = session("userid")
end sub
oracle squaks during me ora-01036, illicit non-static name. am i dogmatic non-static wrong query?
i guess outmost variables share same name @ prefixed. i understand, should fixation value i wish query executes select.
edit: okay, interjection recommendation far, initial blunder corrected, i need : @ non-static chapter query. generates an ora-01745 unfair host/bind non-static name.
edit again: okay, looks user indifferent word. works now! interjection points perspective one. i hadn't guess approach.
Comments
Post a Comment