Some Very Newbie Questions ~ Database Interaction & VB

Posted on 2007-10-04
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

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    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.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now