Re: What's wrong with my connection string to the Access db?
From: Aries (a)
Date: 06/10/04
- Next message: T Cordon: "Re: Reading Text"
- Previous message: bruce barker: "Re: What way to send large data from .NET to Linux-platform"
- In reply to: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Next in thread: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Reply: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Messages sorted by: [ date ] [ thread ]
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.
> >
> >
>
>
- Next message: T Cordon: "Re: Reading Text"
- Previous message: bruce barker: "Re: What way to send large data from .NET to Linux-platform"
- In reply to: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Next in thread: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Reply: Kevin Spencer: "Re: What's wrong with my connection string to the Access db?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|