What is the diffeence bewtween a dataAdapter.Ins ertCommand and
dataAdapter.Sel ectCommand (and dataAdapter.Upd ateCommand for that matter)?
Dim da As SqlDataAdapter
conn.Open
da.SelectComman d = New SqlCommand
da.SelectComman d.Connectoin = conn
da.SelectComman d.CommandType = Command.Text
da.SelectComman d.CommandText = "insert Into tbl1 Select * from tbl2"
da.SelectComman d.ExecuteNonQue ry
Or
Dim da As SqlDataAdapter
conn.Open
da.InsertComman d = New SqlCommand
da.InsertComman d.Connectoin = conn
da.InsertComman d.CommandType = Command.Text
da.InsertComman d.CommandText = "insert Into tbl1 Select * from tbl2"
da.InsertComman d.ExecuteNonQue ry
Is there any differece between these 2 dataAdapters? It looks to me like
they both perform the same operation.
Thanks,
Rich
dataAdapter.Sel ectCommand (and dataAdapter.Upd ateCommand for that matter)?
Dim da As SqlDataAdapter
conn.Open
da.SelectComman d = New SqlCommand
da.SelectComman d.Connectoin = conn
da.SelectComman d.CommandType = Command.Text
da.SelectComman d.CommandText = "insert Into tbl1 Select * from tbl2"
da.SelectComman d.ExecuteNonQue ry
Or
Dim da As SqlDataAdapter
conn.Open
da.InsertComman d = New SqlCommand
da.InsertComman d.Connectoin = conn
da.InsertComman d.CommandType = Command.Text
da.InsertComman d.CommandText = "insert Into tbl1 Select * from tbl2"
da.InsertComman d.ExecuteNonQue ry
Is there any differece between these 2 dataAdapters? It looks to me like
they both perform the same operation.
Thanks,
Rich
Comment