torg Posted January 14, 2003 Posted January 14, 2003 (edited) I`ve got the following code: Public Class frmBudsjett Inherits System.Windows.Forms.Form Dim OleDbConnection As OleDb.OleDbConnection #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() Dim strConn As String strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=C:\Program Files\Account\account.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" OleDbConnection = New OleDb.OleDbConnection(strConn) 'OleDbConnection.Open() When I`m running the program, I receive the following errormessage: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll Additional information: No error information available: DB_SEC_E_AUTH_FAILED(0x80040E4D). What am I doing wrong? Edited January 14, 2003 by Robby Quote
*Experts* Nerseus Posted January 14, 2003 *Experts* Posted January 14, 2003 Wow, do you need all those options in your Connection String? Try it with something simple like: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Account\account.mdb The default userid for Access is Admin, so you shouldn't have to specify it. Also make sure that the database is not currently open in Access. If you database is password protected (the Admin user that is), make sure you specify the password. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.