Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with system.data.sqloledb

Status
Not open for further replies.

iqof188

IS-IT--Management
Nov 9, 2000
228
0
0
GB
Hi. I have some troubles getting the example from an O'Reilly book to work. The first part of the code is like this:

<%@ WebService Language=&quot;C#&quot; Class=&quot;PubsWS.PubsWS&quot; %>
namespace PubsWS
{
using System;
using System.Data;
using System.Data.OleDB;
using System.Web;
using System.Web.Services;

[WebService Namespace=&quot;[URL unfurl="true"]http://Oreilly/DotNetEssentials/&quot;)[/URL]]
public class PubsWS : WebService
{

The compilation error I get is:
&quot;CS0234: The type or namespace name 'OleDB' does not exist in the class or namespace 'System.Data' (are you missing an assembly reference?)&quot;
I have installed the .Net framework SDK, I have SQL Server 2000 running, using IE6 and I have installed MDAC 2.7 beta. What am I missing here?


<webguru>iqof188</webguru>
 
Hmmm...not that I think it'll solve it, but worth a shot:
Try moving all the &quot;using&quot; statments above the namespace declaration. In VisualStudio.NET, all the assemply declarations (&quot;using&quot; statements) are before the initial namespace declaration. Worth a shot.

Jack
 
This statement is case sensitive so try change
using System.Data.OleDB;
to
using System.Data.OleDb;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top