[Solved] Error .accdb access file added in vb.net Error Name : unrecognized database format .accdb
[Solved] Error .accdb access file added in vb.net Error Name : unrecognized database format .accdb
In access old version file extension is .mdb and new version is .accdb
In Visual Basic .mdb file add successfully no error will occur but .accdb file have error that
unrecognized database format .accdb.
so first you need to download AccessDatabaseEngine than install it and restart your computer.
ConnectionString = "Provider=xyz;Data Source=YourDataBase"
for .mdb we use Provider=Microsoft.Jet.OLEDB.4.0;
and for .accdb we use Provider=Microsoft.ACE.OLEDB.12.0;
Example for Access database Connectivity
Private conn As New OleDbConnection
Private cmd As New OleDbCommand
Private DR As OleDbDataReader
Private DT As New DataTable
Private path As String = "C:\Database.accdb"
'Put this code where you want to fetch the data
Try
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & path & "'"
cmd.Connection = conn
cmd.CommandText = "Select * from TableName"
conn.Open()
DR = cmd.ExecuteReader
DT.Load(DR)
'feedTable is GridView in vb.net
FeedTable.DataSource = DT
conn.Close()
Catch ex As Exception
conn.Close()
MsgBox("Error : " & ex.Message)
End Try
Thank You Give your Comments for help others.
How can i move Border less form in Vb.net , easy method to move Border less Form in Vb.NET
How can I move Border less form in Vb.net , easy method to move Border less Form in Vb.NET visual studio 2015...
How can i move Border less form in Vb.net , easy method to move Border less Form in Vb.NET
visual Basic 2015 programming.
Private IsFormBeingDragged As Boolean = False
Private MouseDownX As Integer
Private MouseDownY As Integer
'Using Mouse Down Event in selected Form.
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
IsFormBeingDragged = True
MouseDownX = e.X
MouseDownY = e.Y
End If
End Sub
'Using MouseUp Event in selected Form.
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseUp
If e.Button = MouseButtons.Left Then
IsFormBeingDragged = False
End If
End Sub
'Using Mouse Move Event in selected Form.
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseMove
If IsFormBeingDragged Then
Dim temp As Point = New Point()
temp.X = Me.Location.X + (e.X - MouseDownX)
temp.Y = Me.Location.Y + (e.Y - MouseDownY)
Me.Location = temp
temp = Nothing
End If
End Sub
Free Download ShutDownMe 2016
Free Download ShutDownMe 2016
ShutDownMe.rar
Software Look...
Password : soomro4u (For Unrar File)
ThankYou...
ShutDownMe.rar
Software Look...
Password : soomro4u (For Unrar File)
ThankYou...
Hindu poet Lata Haya ki Hindi Kavita Deen E Islam par - MUST WATCH
ہندو شاعرہ لتا حیا کی اسلام کے بارے میں انتہائی خوبصورت شاعری
انڈین ہندو شاعرہ لتا حیا کی اسلام کے بارے میں انتہائی خوبصورت شاعری، مکمل سنیں لطف آ جائے گا
انڈین ہندو شاعرہ لتا حیا کی اسلام کے بارے میں انتہائی خوبصورت شاعری، مکمل سنیں لطف آ جائے گا
Subscribe to:
Posts
(
Atom
)