-
May 3rd, 2012, 11:02 PM
#1
Thread Starter
New Member
Database technology
I had developed a VB app long ago using VB3 and updated it to VB5. I'm now trying to upgrade it to VB 2010 Express. I had used DAO and the Data control object. From a little reading I'm confused and have a few questions.
1. Is the ADO data control replaced by the BindingSource/Navigator objects. On MSDN ADO Data Control shows under VB6 while Binding.. objects are under 2008/2010.
2. I see there are OleDb... classes. Should I use these or the ADODB.Recordset etc. objects?
3. Any good books/articles to read for this? I'm looking for documentation on how to create the connection, run SQL queries etc.
Thanks in advance.
-
May 4th, 2012, 01:28 AM
#2
Re: Database technology
You need to read up on ADO .NET
That's the technology that is used within the .NET framework.
There are some advances like ORM tools that find favor with a number of developers. If you are interested, you should read up on NHibernate or Entity Tools Framework
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
May 4th, 2012, 02:46 AM
#3
Re: Database technology
1. I've never used VB6 but I can tell you that the BindingSource provides a bridge between a list of data items and your user interface that you can use as a single point of contact for accessing the data and navigating through it. The BindingNavigator provides a UI for the navigation functionality of the BindingSource, e.g. the Next and Previous buttons of the BindingNavigator map to the MoveNext and MovePrevious methods of the BindingSource.
2. Don't use anything from ADO. Use ADO.NET only. You can use the members of the OleDb namespace directly or you can use higher-level types that will use them internally.
3. Follow the Data Walkthroughs links in my signature to learn mostly how to use the Data Source wizard and typed DataSets. Follow the Database FAQ link in my signature to learn some lower-level ADO.NET stuff. You might also use the Entity Framework, which is also supported via the Data Source wizard, but that requires some LINQ knowledge. EF is probably the best choice so, if you want to do it the best way first up, you might want to learn the basics of LINQ first.
-
May 4th, 2012, 08:56 PM
#4
Thread Starter
New Member
Re: Database technology
Thanks jmcilhinney.
My app is purely windows forms based (not web based). It used to connect to a "local" Access DB which I'm thinking of changing to SQL Express. Should I still be looking at ADO.NET instead of ADO?
-
May 4th, 2012, 11:26 PM
#5
Re: Database technology
Originally Posted by atharva
Should I still be looking at ADO.NET instead of ADO?
Absolutely. The only good reason to use ADO in VB.NET is that you are upgrading an existing VB6 app using the wizard. Any new code that you write in VB.NET should use ADO.NET or something that uses ADO.NET under the hood, e.g. EF, never ADO.
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
|