Hi, I hope I'm in the right place,
I'm not an ASP.NET expert, I'm developing a site where I use MSAccess to data base.
All works well except for a Class, cut and pasted, where I tried to open my access table. I used the same namespace used in all other pages but in this class I can't find the OleDb namespace:

using System.Collections.Generic;
using System.Web.Services;
using System.Data.OleDb;
using System.Data;
using System.Data.Odbc;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public class AutoComplete : WebService
    public AutoComplete()


    public string[] GetCompletionList(string prefixText, int count)
       OleDbConnection Connection = new OleDbConnection(); //THIS SHOULD BE CYAN COLOR

there's some namespace visibility limitations for the class?

thanks in advance.


6 Years
Discussion Span
Last Post by james6754

You should add a reference to this namespace also...right click your project, click add reference and find System.Data then click add reference.

Votes + Comments
Many thanks this solved!.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.