Named parameters in SQL- SQLDataAdapter vs. OleDBDataAdapter 
Author Message
 Named parameters in SQL- SQLDataAdapter vs. OleDBDataAdapter

New to SQL and VB.NET - would appreciate any insights into the following:

First, are there any substantial performance differences between the
SQLDataAdapter and the OleDBDataAdapter? I'm assuming there are. The primary
reason I ask is that I have docs and samples that work under
OleDBDataAdapter , but I am not getting them to work under SQLDataAdapter

Here's my confusion:
I'm trying to run a parameterized query through web forms.  Basic simple
thing.

-The SQL statement that I used for the adapter is:
SELECT LastName, FirstName, Filepath, FileName, RecordDate, Length, SID,
IsArchive
FROM Table1

//if it is important, the Configuration Wizard concat'ed all those lines
together

-I set up a Dataset connected to the adapter
-I bound a datagrid to the dataset.

- created a button to load the dataset. here's the code for that:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click


txtLastName.Text

DataSet11.Clear()

SqlDataAdapter1.Fill(DataSet11)

End Sub


What I think is supposed to happen is that on submitting a name that is in
the database, the datagrid will appear with any/all records matching the
last name. It doesn't.

What am I missing here?

Thanks for any and all help

Mike Maloney



Thu, 22 Sep 2005 17:16:02 GMT  
 Named parameters in SQL- SQLDataAdapter vs. OleDBDataAdapter
Never mind - forgot to "Datagrid1.DataBind()"

intelligent life is hard to find here at 5:00 a.m.


Quote:
> New to SQL and VB.NET - would appreciate any insights into the following:

> First, are there any substantial performance differences between the
> SQLDataAdapter and the OleDBDataAdapter? I'm assuming there are. The
primary
> reason I ask is that I have docs and samples that work under
> OleDBDataAdapter , but I am not getting them to work under SQLDataAdapter

> Here's my confusion:
> I'm trying to run a parameterized query through web forms.  Basic simple
> thing.

> -The SQL statement that I used for the adapter is:
> SELECT LastName, FirstName, Filepath, FileName, RecordDate, Length, SID,
> IsArchive
> FROM Table1

> //if it is important, the Configuration Wizard concat'ed all those lines
> together

> -I set up a Dataset connected to the adapter
> -I bound a datagrid to the dataset.

> - created a button to load the dataset. here's the code for that:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click


> txtLastName.Text

> DataSet11.Clear()

> SqlDataAdapter1.Fill(DataSet11)

> End Sub


collection.

> What I think is supposed to happen is that on submitting a name that is in
> the database, the datagrid will appear with any/all records matching the
> last name. It doesn't.

> What am I missing here?

> Thanks for any and all help

> Mike Maloney



Fri, 23 Sep 2005 04:25:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. OleDbDataAdapter, SqlDataAdapter causing unhandled exception

2. Loading tables from a database via SQLDataAdapter and SQLDataAdapter.Fill

3. SQLDataAdapter parameter not supplied during insert?

4. Help me: Update SQL Server table through sqlDataAdapter...

5. SQL Stored Proc for insert/ SQLDataAdapter insertcommand Subroutine

6. Help with OleDbDataAdapter / SQL Server performance issue

7. Inline SQL vs. stored parameter query

8. Inline SQL vs. stored parameter query

9. Inline SQL vs. stored parameter query

10. Access vs SQL Server vs Sybase vs Oracle

11. Parameter query w/ parameter specifying field name?

12. Table Names vs. Alias Names

 

 
Powered by phpBB® Forum Software