Unrecognized database format

Discussion in 'ASP .Net' started by timmso, Dec 13, 2003.

  1. timmso

    timmso Guest

    I'm using Ado.net in an asp.net project with an Access backend.

    Whenever I try to do a simple Select or Update, I inevitably see the error
    "Unrecognized database format". I'm using Access 2000.

    Here is some code for an aspx page:

    Sub Page_Load(Source As Object, E As EventArgs)
    Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _
    "data source=D:\Data\Codelib\codelib.mdb;"
    Dim objConnection As New OleDbConnection(strConnection)
    Dim strSQL As String = "SELECT CodeID, Title from tblCode;"
    Dim objCommand As New OleDbCommand(strSQL, objConnection)
    objConnection.Open()
    Repeater1.DataSource = objCommand.ExecuteReader()
    Repeater1.DataBind()
    objConnection.Close()
    End Sub

    So when I run this a few times, it works fine. Then I get that error message
    and the code no longer works. The error occurs on line

    objConnection.Open()

    Can somebody please tell me what I must to to alleviate this?

    Thanks for any pointers.

    Tim
     
    timmso, Dec 13, 2003
    #1
    1. Advertising

  2. Are you sure you are using an Access 2000 database? I bet the file is
    really an Access97 version. Then if the server has MDAC 2.6 or higher, I
    believe, you will get this kind of error.

    In the past, I had some sites that used Access97 databases and the web host
    upgraded to a higher version of MDAC than 2.5 (I think it was) resulting in
    that sort of message. When I updated the databases to Access version 2000,
    the error message disappeared.


    "timmso" <> wrote in message
    news:%...
    > I'm using Ado.net in an asp.net project with an Access backend.
    >
    > Whenever I try to do a simple Select or Update, I inevitably see the error
    > "Unrecognized database format". I'm using Access 2000.
    >
    > Here is some code for an aspx page:
    >
    > Sub Page_Load(Source As Object, E As EventArgs)
    > Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _
    > "data source=D:\Data\Codelib\codelib.mdb;"
    > Dim objConnection As New OleDbConnection(strConnection)
    > Dim strSQL As String = "SELECT CodeID, Title from tblCode;"
    > Dim objCommand As New OleDbCommand(strSQL, objConnection)
    > objConnection.Open()
    > Repeater1.DataSource = objCommand.ExecuteReader()
    > Repeater1.DataBind()
    > objConnection.Close()
    > End Sub
    >
    > So when I run this a few times, it works fine. Then I get that error

    message
    > and the code no longer works. The error occurs on line
    >
    > objConnection.Open()
    >
    > Can somebody please tell me what I must to to alleviate this?
    >
    > Thanks for any pointers.
    >
    > Tim
    >
    >
    >
     
    William LaMartin, Dec 13, 2003
    #2
    1. Advertising

  3. timmso

    timmso Guest

    Thanks for responding.

    I'm positive that it is an Access 2000 database. I created it on my machine
    and got the error here first. Then I tried a compact/repair and the error
    temporarily disappeared. I uploaded the DB to my web host and got the error
    again after I ran several select and update queries.

    So I exported the tables into a fresh Access 2000 DB and uploaded that to my
    web host, and the error is happening all the time now.

    In addition, I have also been seeing an error intermittantly when trying to
    update a record:

    "Search key was not found in any record."

    This only happens with ONE particular row in my table.

    Thaks for any more info.

    Tim


    "William LaMartin" <> wrote in message
    news:uWhF#...
    > Are you sure you are using an Access 2000 database? I bet the file is
    > really an Access97 version. Then if the server has MDAC 2.6 or higher, I
    > believe, you will get this kind of error.
    >
    > In the past, I had some sites that used Access97 databases and the web

    host
    > upgraded to a higher version of MDAC than 2.5 (I think it was) resulting

    in
    > that sort of message. When I updated the databases to Access version

    2000,
    > the error message disappeared.
    >
    >
    > "timmso" <> wrote in message
    > news:%...
    > > I'm using Ado.net in an asp.net project with an Access backend.
    > >
    > > Whenever I try to do a simple Select or Update, I inevitably see the

    error
    > > "Unrecognized database format". I'm using Access 2000.
    > >
    > > Here is some code for an aspx page:
    > >
    > > Sub Page_Load(Source As Object, E As EventArgs)
    > > Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _
    > > "data source=D:\Data\Codelib\codelib.mdb;"
    > > Dim objConnection As New OleDbConnection(strConnection)
    > > Dim strSQL As String = "SELECT CodeID, Title from tblCode;"
    > > Dim objCommand As New OleDbCommand(strSQL, objConnection)
    > > objConnection.Open()
    > > Repeater1.DataSource = objCommand.ExecuteReader()
    > > Repeater1.DataBind()
    > > objConnection.Close()
    > > End Sub
    > >
    > > So when I run this a few times, it works fine. Then I get that error

    > message
    > > and the code no longer works. The error occurs on line
    > >
    > > objConnection.Open()
    > >
    > > Can somebody please tell me what I must to to alleviate this?
    > >
    > > Thanks for any pointers.
    > >
    > > Tim
    > >
    > >
    > >

    >
    >
     
    timmso, Dec 13, 2003
    #3
  4. Perhaps it is a corrupted database. Why don't you try the same code with a
    fresh test database that has nothing to do with the one giving you the
    trouble. Make sure it has a primary key also.


    "timmso" <> wrote in message
    news:...
    > Thanks for responding.
    >
    > I'm positive that it is an Access 2000 database. I created it on my

    machine
    > and got the error here first. Then I tried a compact/repair and the error
    > temporarily disappeared. I uploaded the DB to my web host and got the

    error
    > again after I ran several select and update queries.
    >
    > So I exported the tables into a fresh Access 2000 DB and uploaded that to

    my
    > web host, and the error is happening all the time now.
    >
    > In addition, I have also been seeing an error intermittantly when trying

    to
    > update a record:
    >
    > "Search key was not found in any record."
    >
    > This only happens with ONE particular row in my table.
    >
    > Thaks for any more info.
    >
    > Tim
     
    William LaMartin, Dec 13, 2003
    #4
  5. timmso

    timmso Guest

    Do you mean not to export the tables from one db to another, but just
    recreate the db from scratch?

    Also, it does have a primary key.

    "William LaMartin" <> wrote in message
    news:#...
    > Perhaps it is a corrupted database. Why don't you try the same code with

    a
    > fresh test database that has nothing to do with the one giving you the
    > trouble. Make sure it has a primary key also.
    >
    >
    > "timmso" <> wrote in message
    > news:...
    > > Thanks for responding.
    > >
    > > I'm positive that it is an Access 2000 database. I created it on my

    > machine
    > > and got the error here first. Then I tried a compact/repair and the

    error
    > > temporarily disappeared. I uploaded the DB to my web host and got the

    > error
    > > again after I ran several select and update queries.
    > >
    > > So I exported the tables into a fresh Access 2000 DB and uploaded that

    to
    > my
    > > web host, and the error is happening all the time now.
    > >
    > > In addition, I have also been seeing an error intermittantly when trying

    > to
    > > update a record:
    > >
    > > "Search key was not found in any record."
    > >
    > > This only happens with ONE particular row in my table.
    > >
    > > Thaks for any more info.
    > >
    > > Tim

    >
    >
     
    timmso, Dec 13, 2003
    #5
  6. Just make up a test database with one table which has a couple of records
    and see if you can access that.

    "timmso" <> wrote in message
    news:uQI%...
    > Do you mean not to export the tables from one db to another, but just
    > recreate the db from scratch?
    >
    > Also, it does have a primary key.
    >
    > "William LaMartin" <> wrote in message
    > news:#...
    > > Perhaps it is a corrupted database. Why don't you try the same code

    with
    > a
    > > fresh test database that has nothing to do with the one giving you the
    > > trouble. Make sure it has a primary key also.
    > >
    > >
    > > "timmso" <> wrote in message
    > > news:...
    > > > Thanks for responding.
    > > >
    > > > I'm positive that it is an Access 2000 database. I created it on my

    > > machine
    > > > and got the error here first. Then I tried a compact/repair and the

    > error
    > > > temporarily disappeared. I uploaded the DB to my web host and got the

    > > error
    > > > again after I ran several select and update queries.
    > > >
    > > > So I exported the tables into a fresh Access 2000 DB and uploaded that

    > to
    > > my
    > > > web host, and the error is happening all the time now.
    > > >
    > > > In addition, I have also been seeing an error intermittantly when

    trying
    > > to
    > > > update a record:
    > > >
    > > > "Search key was not found in any record."
    > > >
    > > > This only happens with ONE particular row in my table.
    > > >
    > > > Thaks for any more info.
    > > >
    > > > Tim

    > >
    > >

    >
    >
     
    William LaMartin, Dec 14, 2003
    #6
  7. timmso

    timmso Guest

    Ok, I have created a brand new database and am trying it out. So far it
    seems OK. I'll have to play around with it and see how it goes.

    Thanks for your help.

    "William LaMartin" <> wrote in message
    news:#...
    > Just make up a test database with one table which has a couple of records
    > and see if you can access that.
    >
    > "timmso" <> wrote in message
    > news:uQI%...
    > > Do you mean not to export the tables from one db to another, but just
    > > recreate the db from scratch?
    > >
    > > Also, it does have a primary key.
    > >
    > > "William LaMartin" <> wrote in message
    > > news:#...
    > > > Perhaps it is a corrupted database. Why don't you try the same code

    > with
    > > a
    > > > fresh test database that has nothing to do with the one giving you the
    > > > trouble. Make sure it has a primary key also.
    > > >
    > > >
    > > > "timmso" <> wrote in message
    > > > news:...
    > > > > Thanks for responding.
    > > > >
     
    timmso, Dec 14, 2003
    #7
  8. timmso

    han4 Guest

    "timmso" <> wrote in message
    news:...
    > Thanks for responding.
    >
    > I'm positive that it is an Access 2000 database. I created it on my

    machine
    > and got the error here first. Then I tried a compact/repair and the error
    > temporarily disappeared. I uploaded the DB to my web host and got the

    error
    > again after I ran several select and update queries.
    >
    > So I exported the tables into a fresh Access 2000 DB and uploaded that to

    my
    > web host, and the error is happening all the time now.
    >
    > In addition, I have also been seeing an error intermittantly when trying

    to
    > update a record:
    >
    > "Search key was not found in any record."
    >
    > This only happens with ONE particular row in my table.
    >
    > Thaks for any more info.
    >
    > Tim
    >
    >
    > "William LaMartin" <> wrote in message
    > news:uWhF#...
    > > Are you sure you are using an Access 2000 database? I bet the file is
    > > really an Access97 version. Then if the server has MDAC 2.6 or higher,

    I
    > > believe, you will get this kind of error.
    > >
    > > In the past, I had some sites that used Access97 databases and the web

    > host
    > > upgraded to a higher version of MDAC than 2.5 (I think it was)

    resulting
    > in
    > > that sort of message. When I updated the databases to Access version

    > 2000,
    > > the error message disappeared.
    > >
    > >
    > > "timmso" <> wrote in message
    > > news:%...
    > > > I'm using Ado.net in an asp.net project with an Access backend.
    > > >
    > > > Whenever I try to do a simple Select or Update, I inevitably see the

    > error
    > > > "Unrecognized database format". I'm using Access 2000.
    > > >
    > > > Here is some code for an aspx page:
    > > >
    > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > > Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;" &

    _
    > > > "data source=D:\Data\Codelib\codelib.mdb;"
    > > > Dim objConnection As New OleDbConnection(strConnection)
    > > > Dim strSQL As String = "SELECT CodeID, Title from tblCode;"
    > > > Dim objCommand As New OleDbCommand(strSQL, objConnection)
    > > > objConnection.Open()
    > > > Repeater1.DataSource = objCommand.ExecuteReader()
    > > > Repeater1.DataBind()
    > > > objConnection.Close()
    > > > End Sub
    > > >
    > > > So when I run this a few times, it works fine. Then I get that error

    > > message
    > > > and the code no longer works. The error occurs on line
    > > >
    > > > objConnection.Open()
    > > >
    > > > Can somebody please tell me what I must to to alleviate this?
    > > >
    > > > Thanks for any pointers.
    > > >
    > > > Tim
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    han4, Dec 15, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rabbit
    Replies:
    1
    Views:
    1,468
    Rabbit
    May 3, 2006
  2. Chu
    Replies:
    3
    Views:
    4,222
    Shawn
    Aug 15, 2006
  3. tesis
    Replies:
    2
    Views:
    355
    Saverio Tedeschi
    Nov 2, 2005
  4. Simon
    Replies:
    1
    Views:
    1,266
    Serkan DIRIARIN
    Feb 24, 2006
  5. TekCat

    ERROR: Request format is unrecognized

    TekCat, Nov 8, 2006, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    528
    TekCat
    Nov 9, 2006
Loading...

Share This Page