B
Brett Baisley
Hello,
I am trying to write C# code (for an ASP.NET 2.0 page) that will query an
SQL database.
Every tutorial I find online always says "don't write code, drag and drop
the server controls", such as the dataSource and bind it to a control.
The problem is, I don't want to drag and drop, I want to do it via code. I
have a connection already made, and I want to, via code, run an SQL select
to get the next available ID number from a table and store it in a variable
for futher processing.
Can anyone point me to something that will show me how to do this? Do I need
to create a new datasource to execute my query?
Thanks,
Brett
I am trying to write C# code (for an ASP.NET 2.0 page) that will query an
SQL database.
Every tutorial I find online always says "don't write code, drag and drop
the server controls", such as the dataSource and bind it to a control.
The problem is, I don't want to drag and drop, I want to do it via code. I
have a connection already made, and I want to, via code, run an SQL select
to get the next available ID number from a table and store it in a variable
for futher processing.
Can anyone point me to something that will show me how to do this? Do I need
to create a new datasource to execute my query?
Thanks,
Brett