Load Data | Database Programming with VB net and MS Access part 02
#vb.net
#databaseprogramming
#oledb
Database Programming with VB net and MS Access part 02
Source code
-------------------------
Public Class Form1
Dim con As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\contact.accdb")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
con.Open()
If con.State = ConnectionState.Open Then
MsgBox("Database Connected Successfully")
Else
MsgBox("Database not connencted")
End If
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim sql As String
Dim cmd As New OleDb.OleDbCommand
Dim dt As New DataTable
Dim da As New OleDb.OleDbDataAdapter
con.Open()
sql = "Select * from contacts"
cmd.Connection = con
cmd.CommandText = sql
da.SelectCommand = cmd
da.Fill(dt)
DataGridView1.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
End Sub
End Class
--------------------------
Recommended videos (prerequisites)
इस विडियो को देेखने से पहले-
https://www.youtube.com/watch?v=6frvEfDZlV8&t
{आप सभी से मेरा अनुरोध है, किसी भी विषय पर आपको यदि कोई भी सुझाव देना हो, सवाल करने हो तो कृपया उस विडियो के नीचे कमेंट कर दे। You are all requested to post comment if you any doubt, suggestion or question}
{यह चैनल लगभग सभी विश्वविद्यालय के कम्प्युटर साइन्स के विषयों के पाठ्यक्रम को कवर करता है। मुख्यतः पंडित रविशंकर शुक्ल विश्वविद्यालय, छत्तीसगढ़ और माखन लाल राष्ट्रीय पत्रकारिता विश्वविद्यालय, इसके अलावा इस चैनल में कम्प्युटर तकनीकी संबंधी विडियोस भी उपलब्ध हैं।}
चैनल की सभी प्लेलिस्ट देखने के लिए यहाँ क्लिक करें –
https://www.youtube.com/user/AtharDhamtari/playlists
Other playlist that were recorded by me: मेरे द्वारा पढ़ाये गए अन्य विषयों की प्लेलिस्ट
चैनल लिंक
https://www.youtube.com/user/AtharDhamtari/
विषयवार प्लेलिस्ट
*Fundamental*
Fundamental of Computer System – https://bit.ly/39HTR3l
Computer Organization and Architecture - https://bit.ly/2Rd8rcD
Application Softwares
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Office Automation | आफिस ऑटोमेशन Hindi| Urdu - https://bit.ly/2X9iJOR
Database Management Using MS Access 2007 डेटाबेस एम एस एक्सैस 2007 - https://bit.ly/2JHwqMW
Spreadsheet using Microsoft Excel स्प्रैडशीट माइक्रोसॉफ़्ट एक्सेल - https://bit.ly/2wiW1sG
Web Technology
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
HTML In 7 Lectures - https://bit.ly/3dTymjm
JavaScript जावास्क्रिप्ट - https://bit.ly/39JTVzN
asp.net https://bit.ly/2TF3pan
Programming and Software Development
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
VB.NET वीबी.नेट – https://bit.ly/34an4CU
Vb.net Practical Questionnaire – https://bit.ly/2yv63YJ
Java Programming - https://bit.ly/2xOSu5P
Python Programming - https://bit.ly/3aVv2SM
Object Oriented Programming OOPS and C++ - https://bit.ly/39IP3uv
Programming in C सी प्रोग्राममिंग हिन्दी में (Hindi/Urdu) - https://bit.ly/2JHe0vK
Data Structure Through C Lanuguage - https://bit.ly/2VkpdJu
Contact Me here:
Google Blogs:- athardhamtari.blogspot.com
Instagram - https://www.instagram.com/hashmi_athar/
Linkedin Profile - https://www.linkedin.com/in/sayed-athar-ali-hashmi-7346211a/
Twitter Account - https://twitter.com/ProfessorAthar
Facebook Page - https://www.facebook.com/ProfessorHashmi/
Youtube Channel Page - https://www.youtube.com/user/AtharDhamtari/