link9 -
You already have the classes you need in the toolbox. I'm not patronising, but here is a step by step guide to writing a web form that connects to a db which supports parameters. Even if you don't find this helpful, someone else might.
I'll use oledb as the provider, but in reality you might not do this. The web form will put the results of a simple user query into a datagrid and allow the user to enter another record. I'm just going to query by primary key.
1. Start a new asp.net web application
2. On the form, drag an oledbconnection object from the data tab of the toolbox. Rename it to conn and set it's connection string to a db. You get the visual connection string designer.
3. Drag a oledbcommand object and rename it to cmdGetResults. Set it's connection to conn (existing). Leave its command type as text (in reality, you might be using stored procedures). Now click on the command text drop down arrow. You get a visual query designer. Select some fields from a table and put in a criteria for the primary key = ? (the ? is the parameter placeholder in oledb). My query ends up looking like this
SELECT SYMPTOM, CAUSE, ACTION
FROM ENTRIES
WHERE (ID = ?)
4. Press OK to the command builder dialog box. Answer yes when asked about regenerating the parameter collection.
5. Now look in the properties window under parameters. You should see one parameter matched to the data type of the field you are querying on.
6. Run thru this again to create another command object, cmdInsert. Right click in the visual designer to change it to an insert into command. Add some parameters to insert into the table. My insert query looks like this
INSERT INTO ENTRIES
(SYMPTOM, CAUSE, ACTION)
VALUES (?, ?, ?)
7. Again, when you press OK, the question about regerating parameters will come up. Press yes, and you will see that it has generated a parameter collection for you.
8. Place one text box and button on the web form. Call the text box txtIDToFind. Call the button btnFind. Place a datagrid control on the form. Call it dgResults. In the click code for the btnFind, this is my code
Dim dr As OleDbDataReader
cmdGetResults.Parameters("ID"

.Value = txtIDToFind.Text
Conn.Open()
dr = cmdGetResults.ExecuteReader
dgResults.DataSource = dr
dgResults.DataBind()
dr.Close()
Conn.Close()
9. Place three text boxes (or the number of fields in your insert query) on the form and another button. Call the text boxes by the names of the relevant fields. Call the button btnInsert. In the code for btnInsert, mine looks like this
cmdInsert.Parameters("Symptom"

.Value = txtSym.Text
cmdInsert.Parameters("Cause"

.Value = txtCause.Text
cmdInsert.Parameters("Action"

.Value = txtAction.Text
Conn.Open()
cmdInsert.ExecuteNonQuery()
Conn.Close()
10. Run the app. You can select a record on primary key or insert another one. But you have (at least) the following advantages
A. Most of the code to do this is hidden away in the web forms designer region which can look at if you want, but your main code ends up sparser and more elegant. There is no performance or flexibility penalty.
B. NetAngels problem of hackers is elegantly solved. Even if the hacker should type "This is an entry; truncate table entries" in the boxes, the text just ends up in the database. It is the same with other problematic characters like ', ", ; etc.
C. Conversions from vb.net datatypes to db data types are handled automatically. For example, if one of the fields is a date field, then this line of code puts now into it
cmdInsert.parameters("TheDate"

.value = datetime.now
If you were to construct SQL manually, you'd have to do something like use Oracle's to_date function in the SQL text.
D. It should be slightly faster, both client and db side. You can improve this more by using stored procedures rather than command text.
I use Oracle, so anyone using sqlServer has an advantage - the sqlClient .net provider supports all this visual stuff.
Finally, though I've not really looked at it, you can do all this within a component, as opposed to a web or windows form, by dragging and dropping stuff onto a component's surface (add, new item, component class)
Hope this answers your question
Mark