Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:30:19+00:00 2026-06-09T21:30:19+00:00

Using Visual Basic (and .NET 4) in Visual Studio 2010, I would like to

  • 0

Using Visual Basic (and .NET 4) in Visual Studio 2010, I would like to read from an Access 2007 .accdb Database.

I used the build in Wizard to connect to the database (without importing it into the project), that is: “Add New Data Source” > “Database” > …
A ConnectivityString is then automatically generated.

Many articles on the net speak about how to connect to a database using connections strings like Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;

But I have already several of such commands (automatically generated) in my App.config file. For example:

<connectionStrings>
        <add name="Wolf_Calc.My.MySettings.wolf_calcConnectionString"
            connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\wolf-calc.accdb"
            providerName="System.Data.OleDb" />

Can I then just start writing queries in my code and just do something like
value = table1.SearchCriterion("x").SearchRange("y")?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:30:20+00:00Added an answer on June 9, 2026 at 9:30 pm

    When using the Wizard to add a Data Source, the connection strings are automatically created. But there are still some more steps to do in order to be able to use properly the Database.

    1. Create the TableAdapters. To do so, drag a table from the Data Source pane onto a form.
    2. Load the data into a table you can use. For example, let’s say I have a database named StarTrek containing a table Enterprise. The following line loads the data into the Enterprise table:

      Me.EnterpriseTableAdapter.Fill(Me.StarTrekDataSet.Enterprise)
      
    3. Create a scalar query. It will find a single value into your table. In the Data Designer, add a query to the Enterprise table (right click on the TableAdapter zone).
      If the desired result is the age (column “Age”) of Mister Spock (column “Name”), the query will be:

      ' Access Database
      SELECT Age FROM Enterprise WHERE (Name = ?)
      
      ' for an SQL Database
      SELECT Age FROM Enterprise WHERE Name = [@Name]
      
    4. The search can now take place. Let’s say you named the query ScalarQueryAge. The following displays the age of Mister Spock into a label.

      Dim AgeAdapter As New StarTrekDataSetTableAdapters.EnterpriseTableAdapter
      Dim Age As Integer = CType(AgeAdapter.ScalarQueryAge("Mister Spock"), Integer)
      LabelAgeMisterSpock.Text = "He is actually " & Age & "!!"
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m trying to write a basic ASP.NET form (using Visual Studio 2010) to submit
I am implementing a basic authentication WCF service in ASP.NET using Visual Studio 2010.
I'm going to be building some ASP.Net MVC 2 software using Visual Studio 2010
Trying to do basic SSL-authenticated Web Service using Visual Studio 2008 .NET 3.5 Service
I am using Virtual Basic with ASP.NET in Visual Studio 2008. I am using
I am using: Visual Studio 2010 .Net Framework Data Provider for Oracle Oracle Developer
So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided.
I'm trying to create a very basic Setup and Deployment project using Visual Studio.
I am using Microsoft Visual Studio Professional 2010. (Also SQL Management Studio for my
Having issues getting jQuery to work in this scenario: Visual Studio 2010 .Net 4.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.