T
Thomas Storey
Hi all,
For the last couple of years I have been using regular ASP to code my web
pages, but now I would like to get into ASP.NET
Ive been playing around a little but have not been able to figure out how to
connect to an SQL 2000 server and run a bunch of SELECT, DELETE, and UPDATE
queries against it.
In the old days, I would do something like this:
dim objDB
set objDB = server.createobject("ADODB.Connection")
objDB.Open "insert connection string"
dim objRS
set objRS = server.createobject("ADODB.Recordset")
And then either do a select, delete or update query by typing:
objRS.Open "sql query"
When extracting data from the database after doing a select query, I would
type:
variable = objRS.Fields("field name")
However, I have not been able to figure out how to do the same thing using
ASP.NET.
Can anyone give me a code sample to do something the same as the above, only
in ASP.NET?
All of the examples I have seen on the internet use some datagrid and
display all of the data on a web page, but I just want to extract certain
rows and then certain columns.
Cheers.
For the last couple of years I have been using regular ASP to code my web
pages, but now I would like to get into ASP.NET
Ive been playing around a little but have not been able to figure out how to
connect to an SQL 2000 server and run a bunch of SELECT, DELETE, and UPDATE
queries against it.
In the old days, I would do something like this:
dim objDB
set objDB = server.createobject("ADODB.Connection")
objDB.Open "insert connection string"
dim objRS
set objRS = server.createobject("ADODB.Recordset")
And then either do a select, delete or update query by typing:
objRS.Open "sql query"
When extracting data from the database after doing a select query, I would
type:
variable = objRS.Fields("field name")
However, I have not been able to figure out how to do the same thing using
ASP.NET.
Can anyone give me a code sample to do something the same as the above, only
in ASP.NET?
All of the examples I have seen on the internet use some datagrid and
display all of the data on a web page, but I just want to extract certain
rows and then certain columns.
Cheers.