Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Nov 2006
    Location
    Denver, Colorado, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB 2005 Norms for Database Connections (VB 2005)

    I am learning VB.NET using VB.NET 2005 and .NET 2.0. The application I'm working on connects to an Access database back-end. I've been using the dataset, table adapter and binding source provided by VB; placing them on the design surface of the forms. I believe development would be easier if I was using a SQL Server database and integrated logins but I'm not. Because of that I am having some issues with the database connection; specifically with having to create a connection string with persisted credentials. I was wondering:

    1) Is there a way to get VB 2005 to prompt me for credentials while in the developer environment so I don't have to include them in the connection string?

    2) The connection string is being saved in My Settings. I would like to remove it from the application, or at least remove the credentials. Is this possible without causing other problems?

    3) I attempted to remove the reference to the connection string from the table adapter objects but when I closed and reopened the development environment the settings were back. Is there some way to permanently remove those references so I can just set them in the opening code?

    4) In general, what is the normal way for dealing with the data set and database connection in VB 2005? Should I even be placing the data objects on the design surface?

    Patrick.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB 2005 Norms for Database Connections (VB 2005)

    There are any number of ways to approach it. The Server Explorer will allow you to create a link to an Access database and that should persist between sessions as long as you don't move the database or the workgroup file. The easiest way to work with the data objects is to create typed datasets for each table and then work with the typed datasets. They make life in .Net a lot easier and you can then create a data adapter and and bind it to the typed dataset. We save settings to xml files and then load the information from the xml file when the project is run.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •