Solved

Connection string for MS access 2000 data base in vb.net

Posted on 2010-09-18
7
692 Views
Last Modified: 2012-05-10
Hi,

I am using MS access 2000 as data base with vb.net windows application.Using VS 2005 version.

Thanks in advance
0
Comment
Question by:futurebuilders
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33708172
Take a look www.connectionstrings.com ...and check strings with access
hope it helps...
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 250 total points
ID: 33708226
For vb.net you have to use OleDbConnection as that supports Jet

this is sample code I have in my test app. It reads the db, runs the sql and returns the result


        Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\temp\test.mdb"
        Dim conn As OleDbConnection
        Dim cmd As OleDbCommand
        Dim reader As OleDbDataReader
        Dim sql As String

        conn = New OleDbConnection(connectionString)

        conn.Open()
        sql = "SELECT COUNT(*) AS MyTotal FROM Table1"
        cmd = New OleDbCommand(sql, conn)
        reader = cmd.ExecuteReader()
        reader.Read()

        MsgBox(reader.Item("MyTotal"))
        conn.Close()


and the two namespaces I included are

Imports System.Data.SqlClient
Imports System.Data.OleDb


0
 

Author Comment

by:futurebuilders
ID: 33708253
Thanks for your reply.

But the above code is giving error as "Could not find installation of ISAM"



0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33708297
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33708310
what version dotnet are you using? not your vs version but the framework. earlier versions of ado.net didnt work very well apparently http://support.microsoft.com/kb/318161

can u post the connection string you used? make sure no errors in there.
0
 
LVL 12

Expert Comment

by:Mohamed Abowarda
ID: 33710687
0
 

Author Comment

by:futurebuilders
ID: 34478688
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Format column on datatable 7 29
VB.Net - Oracle BulkCopy from CSV Date Format 7 47
Close word object 13 38
Exit the loop 4 40
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

24 Experts available now in Live!

Get 1:1 Help Now