Some Very Newbie Questions ~ Database Interaction & VB

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.
Roxanne25Asked:
Who is Participating?
 
ElrondCTConnect With a Mentor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.