I think you are confusing dataset with dataAdapter. The dataAdapter is the
component that contains/uses the sql statements. You have the 4 basic sql
commands "Select", "Insert", "Update", "Delete" that are part of the
dataAdapter. Note: it is way better/easier to write out the
dataAdapters/datasets than to use the designer. Here is a sample:
Imports System.Data.SqlClient
sub something()
Dim da As sqlDataAdapter, ds As Dataset, conn As Sql Connection
conn = New SqlConnection
conn.ConnectionString = "Data
Source=yourserver;UID=yourID;PWD=yourpassword;DATABASE=someDB"
da = New sqlDataAdapter
ds = New Dataset
da.SelectCommand = New SqlCommand
da.SelectCommand.Connection = conn
da.SelectCommand.CommandText = "Select * from tbl1 Where RecordID = @ID"
da.SelectCommand.Parameters.Add(New SqlParameter("@ID", SqlDBType.Int, 4,
"RecordID")
da.SelectCommand.Parameter("@ID").Value = txtRecordID.Text
da.Fill(ds, "tbl1")
Datagridview1.Datasource = ds.Tables("tbl1")
End Sub
Now your dataset contains a table called "tbl1" which is a copy of the table
from the database -- except in memory and gets displayed in the datagridview.
HTH,
Rich