jgsteeldev
Programmer
Code:
The Microsoft Jet database engine cannot open the file 'C:\DBName.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
Here is the code.
Code:
Dim silpadaConn As OleDbConnection = New OleDbConnection("Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=""C:\DBName.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk T" & _
"ransactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet " & _
"OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database" & _
" Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on" & _
" Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet " & _
"OLEDB:Encrypt Database=False")
Dim selectCMD As OleDbCommand = New OleDbCommand("SELECT intPersonID, txtEmail, txtFirstName, txtLastName, txtPhone, txtWebsite FRO" & _
"M tblContacts", silpadaConn)
selectCMD.CommandTimeout = 30
Dim custDA As OleDbDataAdapter = New OleDbDataAdapter
custDA.SelectCommand = selectCMD
Dim custDS As DataSet = New DataSet
custDA.Fill(custDS, "tblContacts")
DataGrid1.DataSource = custDS
DataGrid1.DataMember = "tblContacts"
DataGrid1.DataBind()
Here we go Royals! Here we go!!!!!