Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 28th, 2005, 10:17 AM
Registered User
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abbee99 Send a message via Yahoo to abbee99
Default how vb.net connect access database

 any one tell me about how connect access database in vb.net
 plz send me complete solution about it.

Old April 29th, 2005, 04:21 AM
Friend of Wrox
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts

 Function GetData() As System.Data.DataSet

        Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=D:\Tecnical Stu"& _
        Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString )

        Dim queryString As String = "SELECT [Employees].* FROM [Employees]"
        Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
        dbCommand.CommandText = queryString
        dbCommand.Connection = dbConnection

        Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter
        dataAdapter.SelectCommand = dbCommand
        Dim dataSet As System.Data.DataSet = New System.Data.DataSet

        Return dataSet
    End Function

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect to Access db thru VB.NET? am_kuthus Visual Studio 2008 1 June 3rd, 2008 04:48 AM
How to connect to remote database with vb net? qiux ADO.NET 4 May 8th, 2008 08:11 PM
Adding New Record to Access Database Using VB.NET TechHelp ASP.NET 1.0 and 1.1 Basics 1 September 13th, 2006 03:19 AM
How vb.net connect to the MySQL server database? cwliong2508 VB.NET 0 May 29th, 2006 07:58 PM
VB.Net + Web App. + Access Database SeemaChivate ADO.NET 6 July 7th, 2005 04:06 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.