Re: What's wrong with my connection string to the Access db?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Aries (a)
Date: 06/10/04


Date: Thu, 10 Jun 2004 10:52:08 -0700

Sorry that I forgot to put down. Here is the error message

Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name
'OleDbDataAdapter' could not be found (are you missing a using directive or
an assembly reference?)

-- 
                                                                   還我本色
                                                                Forever Bad.
"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:Ot1J70uTEHA.1172@TK2MSFTNGP11.phx.gbl...
> What exactly is "the compilation error?"
>
> -- 
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Aries" <a> wrote in message news:MamdnbdSGpyEFlrdRVn-hg@speakeasy.net...
> > I have a connection string like this, anyone know how can I fix it?
> >
> > <%@ Import Namespace="System.Data" %>
> > <%@ Import Namespace="System.Data.OleDb" %>
> > <html>
> > <body>
> > <!-- #include file = "linkx.inc" -->
> > <script language="C#" runat="server">
> >
> >
> >     protected void Page_Load(Object sender, EventArgs e)
> >     {
> >  string mysql;
> >         OleDbConnection myConnection = new OleDbConnection();
> >  myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> > Source=c:\\inetpub\\wwwroot\\break.mdb;";
> >
> >  mysql = "SELECT Date, Build, Count(*) as num FROM BVTbreak GROUP BY
Date,
> > Build where status = 5 order by Build DESC;";
> >  OleDbDataAdapter myCommand = OleDbDataAdapter(mysql, myConnection);
> >
> >         DataSet ds = new DataSet();
> >         myCommand.Fill(ds, "Waive");
> >
> >         MyDataGrid.DataSource=ds.Tables["Waive"].DefaultView;
> >         MyDataGrid.DataBind();
> >     }
> >
> >
> > I got the compilation error:
> >
> > Line 18: OleDbAdapter myCommand = OleDbAdapter(mysql, myConnection);
> >
> >
> >
> >
> > -- 
> >
> >
> 還我本色
> >                                                                 Forever
> Bad.
> >
> >
>
>


Relevant Pages

  • Re: intel compiler problem
    ... The error message seems ... Declarations are absolutely critical to diagnosing compilation ... Just seeing the isolated code line doesn't help ...
    (comp.lang.fortran)
  • Bug Report: Unclear Error Message
    ... When you by mistake have two properties with same id in dual interface in ... idl file the compilation fails and the error message does not point to the ...
    (microsoft.public.vstudio.general)
  • Re: No syntax control during webservice validation in Visual Studio 8
    ... An error occurred during the compilation of a resource ... Compiler Error Message: CS1002:; expected ... I created another web service solution and everything works fine there ... Validating Web Site ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Error Occured during compilation
    ... > I get two different errors when i compile it with 'gcc' as well as ... > gcc compilation ... If you don't show us the actual error message, ... I compiled your code under Cygwin, ...
    (comp.lang.c)
  • Re: Backup Error
    ... denied" error message when you log on to Windows SharePoint Services ... An error occurred during the compilation of a resource ... Compiler Error Message: CS0016: Could not write to output file ...
    (microsoft.public.windows.server.sbs)