just wondering, if the Fill method is working without table parameters, how come we always put a table name? Please see sample taken from MSDN. This example already has a select statement to build the query string passed to the adapter, why is the second parameter needed?
Thanks
' Assumes that connection is a valid SqlConnection object.
Dim queryString As String = _
"SELECT CustomerID, CompanyName FROM dbo.Customers"
Dim adapter As SqlDataAdapter = New SqlDataAdapter( _
queryString, connection)
Dim customers As DataSet = New DataSet
adapter.Fill(customers, "Customers")
If Im right and to answer my question, the "customers" (2nd argument) is only for a new name tag to the table just in case it will be used again in the code?
Thanks
' Assumes that connection is a valid SqlConnection object.
Dim queryString As String = _
"SELECT CustomerID, CompanyName FROM dbo.Customers"
Dim adapter As SqlDataAdapter = New SqlDataAdapter( _
queryString, connection)
Dim customers As DataSet = New DataSet
adapter.Fill(customers, "Customers")
If Im right and to answer my question, the "customers" (2nd argument) is only for a new name tag to the table just in case it will be used again in the code?