connect vb.net to ms access

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 1
Reputation: dhirananda is an unknown quantity at this point 
Solved Threads: 0
dhirananda dhirananda is offline Offline
Newbie Poster

connect vb.net to ms access

 
0
  #1
Nov 6th, 2008
can someone help me how to connect database from ms access to vb.net??????
please help me..
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 32
Reputation: reena12 is an unknown quantity at this point 
Solved Threads: 4
reena12 reena12 is offline Offline
Light Poster

Re: connect vb.net to ms access

 
0
  #2
Nov 7th, 2008
Hi,


imports System.Data.OleDb

Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DATABASE PATH")
con.Open()


If solved please mark as solved
Reena Mehta

Remember to click on Mark as answer on the post that helped

http://www.indianic.com
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 8
Reputation: ksanthoshmail is an unknown quantity at this point 
Solved Threads: 0
ksanthoshmail ksanthoshmail is offline Offline
Newbie Poster

Re: connect vb.net to ms access

 
0
  #3
Nov 7th, 2008
Originally Posted by dhirananda View Post
can someone help me how to connect database from ms access to vb.net??????
please help me..
Go to http://www.connectionstrings.com/ this website you can get all connection string examples
By
Santhosh Kumar K.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 144
Reputation: sierrainfo is an unknown quantity at this point 
Solved Threads: 9
sierrainfo sierrainfo is offline Offline
Junior Poster

Re: connect vb.net to ms access

 
0
  #4
Nov 18th, 2008
Imports System.Data

Module Test

Sub Main()
Dim sConnectionString, sSQL As String

'SQL Connection String
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\yourdatabase.mdb"

sSQL = "SELECT Title FROM yourTable"

Dim conn As New System.Data.OleDb.OleDbConnection(sConnectionString)
Dim cmd As New System.Data.OleDb.OleDbCommand(sSQL, conn)
Dim dr As System.Data.OleDb.OleDbDataReader
conn.Open()

dr = cmd.ExecuteReader()

Do While dr.Read()
System.Console.WriteLine(dr.Item("Title"))
Loop

dr.Close()
conn.Close()
End Sub
End Module
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC