Advertisement
idsystems

VBNETBD_Ejercicio18

Mar 12th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.51 KB | None | 0 0
  1. Imports System.Data
  2. Imports System.Data.OleDb
  3.  
  4. Public Class Form1
  5.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  6.  
  7.         Dim cnn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=peliculas.mdb; User Id=admin;Password=;")
  8.         Dim da As New OleDbDataAdapter("SELECT * FROM Peliculas", cnn)
  9.         Dim ds As New DataSet
  10.  
  11.         da.Fill(ds)
  12.  
  13.         DataGridView1.DataSource = ds.Tables(0)
  14.  
  15.     End Sub
  16.  
  17. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement