|
-
Jun 19th, 2007, 07:02 PM
#1
Thread Starter
Lively Member
-
Jun 19th, 2007, 07:08 PM
#2
Re: Data controls different in vs 2003 - 2005 ?
What are you after that you cant find?
-
Jun 19th, 2007, 07:09 PM
#3
Re: Data controls different in vs 2003 - 2005 ?
Nothing from 2003 has been removed, they just aren't displayed in the Toolbox by default. The DataGrid is not displayed because the DataGridView is better in almost all cases. The BindingSource and BindingNavigator are both new. All the provider-specific classes like SqlConnection and OleDbDataAdapter still exist but they are not included in the Toolbox because you are intended to use the new Data Sources feature that makes their direct use obsolete. You can certainly use them if you like though, and many people do. Like any components, if you want to use them in the designer you simply right-click the Toolbox, select Choose Items and then navigate to the library containing the components you want to use.
-
Jun 19th, 2007, 08:09 PM
#4
Thread Starter
Lively Member
Re: Data controls different in vs 2003 - 2005 ?
I was trying to emulate this old vb example --->
Code:
Dim strValue As String
Dim Sql As String = "select pkRoomID,fldStatus from tblRoom where fldStatus = False"
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\VilliageDatabase\Ainslie.mdb"
Dim adapter As New OleDbDataAdapter(Sql, strConn)
Dim ds As New DataSet
Dim intR As Integer
intR = adapter.Fill(ds)
For the moment I will stick with it. I just added
Code:
using System.Data.OleDb;
which works. , I didnt have the namespace completed right through.
thanks. I will look into other ways of implementation.
-
Jun 19th, 2007, 08:18 PM
#5
Re: Data controls different in vs 2003 - 2005 ?
As I said, you can add the OleDbConnection and OleDbDataAdapter components to the Toolbox if you so desire. Microsoft would prefer you to create a Data Source for your database though, which would generate a typed DataSet including TableAdapters. Your DataSet class and TableAdapter classes will then be automatically added to the Toolbox and you can drag them to forms as needed. The TableAdapters take the place of untyped OleDbDataAdapters and the connection is incorporated into each one already.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|