Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 10th, 2003, 03:13 PM
Registered User
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to an Access 2000 database


I have been using the following code successfully to connect to an Access 98 database (? - it is the Northwind database on Microsoft's website and it is pre-2000):

    OleDbConnection oleDbConn = new OleDbConnection(
        @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Nwind.mdb; ");

    OleDbDataAdapter dAdapt = new OleDbDataAdapter("SELECT ContactName FROM Customers", oleDbConn);
    DataSet ds = new DataSet("Customers");
    dAdapt.Fill(ds, "Customers");

    return ds;

catch(Exception e)
    Console.WriteLine("" + e.Message);

For some reason if I convert the database to Access 2000, this code no longer works. When I invoke the web service no data is collected and it complains that the database is locked exclusively by another user (which is not true) or that I don't have permission to view the data.

I have tried adding the parameters:

    User ID=Admin; Password=

in the connection string but this does not help.

I am running Windows XP Pro, and using MS Visual C# .NET.

Any help or suggestions are very much appreciated!



Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to a remote Access Project Database bright_mulenga Access 3 August 23rd, 2006 06:18 AM
Chapter 5 Connecting to Access Database robodent BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 May 11th, 2006 03:32 PM
Connecting to SQL 2000 Database - New at this Tee88 Classic ASP Databases 14 October 2nd, 2004 04:23 AM
Issues Connecting to an Access 2000 Database... Jonny ADO.NET 1 February 11th, 2004 09:54 AM
connecting PHP to an MS Access database pb7 PHP Databases 1 September 18th, 2003 04:28 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.