OnlineKnowledgeRepository


For Questions and Assistance please use the proper Category.. please..
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome guys!!.. In order for you guys to post your Questions and assistance requests,, please REGISTER first.. Only members can post.. If you have requests then feel free to email ADMIN neuron or SPAMMER onatzky.. thanks!
Search
 
 

Display results as :
 
Rechercher Advanced Search
Donation box
Latest topics
» Abia State Polytechnic Admission form for 2013/2014 out!
Tue Oct 08, 2013 9:30 am by stevejoo

» Convert ZD to SIGNED PD
Sun Sep 08, 2013 9:22 pm by neuron

» How to Speed Up My PC
Tue Feb 26, 2013 9:15 am by alphysudaria143

» Hi I'm alphysudaria143
Sun Feb 17, 2013 12:25 am by alphysudaria143

» How to Copy all the Generations of a GDG
Thu Oct 11, 2012 8:30 am by neuron

» Remove Duplicates in a dataset though Sort
Thu Oct 11, 2012 8:23 am by neuron

» how to insert data into your access database vb.net
Tue Aug 14, 2012 9:56 am by neuron

» how to populate combobox in vb.net during form load
Tue Aug 14, 2012 9:53 am by neuron

» Loading datagridview with data from SQL
Tue Aug 14, 2012 9:50 am by neuron

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Help
Please support me my registering to NEOBUX
advertisements
Affiliates
free forum
 


How to open an access database and populate datagrid view in VB.NET551
Share | 
 

 How to open an access database and populate datagrid view in VB.NET

View previous topic View next topic Go down 
AuthorMessage
neuron
Administrator
Administrator


Posts: 37
Join date: 2009-08-06

PostSubject: How to open an access database and populate datagrid view in VB.NET   Fri Aug 21, 2009 9:22 pm

I've been using this for some time and this works perfectly.

Code:


        Dim con As New OleDb.OleDbConnection
        Dim ds As New DataSet
        Dim da As OleDb.OleDbDataAdapter
        Dim sql As String
        Dim maxrow As Integer
        Dim x As Integer


        con.ConnectionString = "PROVIDER=Microsoft.jet.oledb.4.0;data Source = C:\your db.mdb"
        sql = "SELECT * FROM PC_database"
        da = New OleDb.OleDbDataAdapter(sql, con)
        da.Fill(ds, "your db")
        con.Close()

        maxrow = ds.Tables("your db").Rows.Count


credit goes to :http://www.homeandlearn.co.uk/NET/vbNET.html

_________________
credit goes to the original uploader of the codes..

In this forum we will share the knowledge we have to every single individual who shows respect and interest.. If you stay.. you learn.. if not.. then please go.........

--it's me Admin"D"
Back to top Go down
View user profile http://myonlinekr.forumotion.com
 

How to open an access database and populate datagrid view in VB.NET

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» THE BAR IS NOW OPEN
» tobi wants some access
» Access to God
» Can anyone access bid documents?
» Confused over access gap cover?

Permissions in this forum:You cannot reply to topics in this forum
OnlineKnowledgeRepository ::  ::  :: -