binding to access database

Discussion in 'WebMatrix' started by texasjames, Sep 25, 2004.

  1. why is this soooooo difficult?

    ok...i've tried everything. i give up.
    can anyone explain to me how to use the webmatrix accessdatasource control to bind to an access database so that it will work on a discountasp.net server???

    i just can not get the connectionstring part to format without errors.

    i've attempted:

    <wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OleDB.4.0;Data Source="
    & server.mappath("/data/mydadabase.mdb") & "UserId=Admin";></wmx:AccessDataSourceControl>

    but when i save it it turns into the following garbage:

    <wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OleDB.4.0;Data Source="
    & ?;User permits.mdb?) server.mappath(?Data></wmx:AccessDataSourceControl>

    all i'm trying to do is get my datasouce to connect to the database and use the webmatrix gridview to display my data.

    texasjames
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Found this on the net,

    http://www.123aspx.com/redir.aspx?res=27071

    quote:Originally posted by texasjames

    why is this soooooo difficult?

    ok...i've tried everything. i give up.
    can anyone explain to me how to use the webmatrix accessdatasource control to bind to an access database so that it will work on a discountasp.net server???

    i just can not get the connectionstring part to format without errors.

    i've attempted:

    <wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OleDB.4.0;Data Source="
    & server.mappath("/data/mydadabase.mdb") & "UserId=Admin";></wmx:AccessDataSourceControl>

    but when i save it it turns into the following garbage:

    <wmx:AccessDataSourceControl id="AccessDataSourceControl1" runat="server" ConnectionString="Provider=Microsoft.Jet.OleDB.4.0;Data Source="
    & ?;User permits.mdb?) server.mappath(?Data></wmx:AccessDataSourceControl>

    all i'm trying to do is get my datasouce to connect to the database and use the webmatrix gridview to display my data.

    texasjames

    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     

Share This Page