Some Very Newbie Questions ~ Database Interaction & VB

Posted on 2007-10-04
Medium Priority
Last Modified: 2010-04-23
Hi there...

I used to build VB apps like 4 years ago with VB 6.0 and using VBA with Access. I've since moved on to bigger and better things and I'm now a SQL Server Developer.

I've done a lot of cool things programming in SQL Server itself IE functions and stored procedures and using the Report Server to deploy our reports on our intranet.

However, I need to do some cooler things now. I need to be able to have my users update tables ... put in custom information in a form and send it back to the server to actually change values in tables and things.

I thought an easy way to do it would be to create a VB application. So, I had IT install the real version of Visual Studio 2005.

Here are my questions:

#1 Am I actually using VB.NET in Visual Studio 2005?
#2 I added a dataset to the windows application I started, and it put the connection information in as XML. Is that good? What can I do with this dataset?
#3 If I want to accomplish what I need to do ...should I be writing ADO to connect to the database? If so, do I use an ODBC type of connection or just standard ADO? I'm not entirely sure how to write a SQL Server 2005 connection string and then how I interact with it.

Sorry for the long post, but I've been out of the game for a long time and unfortunately, for me, programming is not like riding a bike... I do forget! I used to be able to just start writing VB but now I find myself at a loss.

The most I've gotten my application to do so far is display the contents of the table that I connected to. I have looked at the help files and tried to figure this stuff out...but I'm not sure if its tailored to the program that I'm using and what I specifically need to do.

Any help is appreciated.
Question by:Roxanne25
1 Comment
LVL 20

Accepted Solution

ElrondCT earned 1500 total points
ID: 20015499
As you're discovering, there are a lot of changes from VB 6.0/VBA to VB .NET. I'm in the midst of the same transition. A few comments:

#1: Visual Studio 2005 offers several languages: VB, C#, and J#, IIRC. But you can ignore the other languages and just focus on VB.

#2: The world is moving to XML for defining structures. This is a very good thing, as it means that information is no longer so buried in proprietary codes. Datasets in VB, as you've seen, are defined in XML which is automatically generated by the VS Designer when you lay out the dataset. But you really don't need to pay attention to the XML; the standard view will be a lot easier to understand.

Datasets are a convenient way of reading and writing data. You load data from the database (SQL Server, Access, whatever) into the dataset; view it, change it, add, delete, whatever; then when ready, save the revised data to the database. Note that none of the changes in your program hit the database until you send the data back to the database (using a .Update method).

#3: ADO is recommended over ODBC. The latter is an older technology that isn't as flexible, doesn't have as many features, and I think also runs more slowly.

An easy way to create the connection is to use the Designer's Data Sources setup routine, which will (once you drag a source onto your form) create the connection string and a DataGridView displaying the data.

I can't carry you farther than that, because I'm currently working in VS 2003, not 2005. But this may get you a few steps down the road. Perhaps others will chime in further.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question