A
Aaron
Please let me know if there is a more appropriate NG for this question.
I am building my first ASPX application.
I would like to learn how to correctly use the .NET environment to perform
a basic sql query.
I have created an SqlDataAdpater, SQL Connection, and generated a dataset.
It looks like all of my SQLCommands have been automatically generated.
I can successfully connect to my SQL server.
I have a single textbox and submit button on the form. I would like to
enter a string in the textbox and query the Name_Last column for that
string.
I am under the impression that I need to use the parameters collection to
map the textbox value to the SQL query.
I have:
select name_last, name_first from persons where name_last = @LastName
for my SQLSelectCommand.
I am not sure how to map @LastName to textbox1.text.
Any ideas?
Aaron
I am building my first ASPX application.
I would like to learn how to correctly use the .NET environment to perform
a basic sql query.
I have created an SqlDataAdpater, SQL Connection, and generated a dataset.
It looks like all of my SQLCommands have been automatically generated.
I can successfully connect to my SQL server.
I have a single textbox and submit button on the form. I would like to
enter a string in the textbox and query the Name_Last column for that
string.
I am under the impression that I need to use the parameters collection to
map the textbox value to the SQL query.
I have:
select name_last, name_first from persons where name_last = @LastName
for my SQLSelectCommand.
I am not sure how to map @LastName to textbox1.text.
Any ideas?
Aaron