Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Using HTML code in Access database

    We have been having problems with corruption in an Access database we worked on. We use html code in one of the fields (the problem seems to be originating here). My question is this: If you have links to outside websites, images and/or documents in this field, could it be causing the problems we are having? We keep getting the error: "The search key was not found in any record."

    Would appreciate any help.

    Thanks,
    Michelle

  2. #2
    Join Date
    Aug 2003
    Location
    Belgrade
    Posts
    68

    Re: Using HTML code in Access database

    I am not sure what do you mean exactly by "use html code in one of the fields". Is the field type Hyperlink, or Text/Memo in which you store HTML code?

    In the first case, I don't think you can search a Hyperlink field the same way as any other Text field. Although it displays its content as plain text, it has different internal representation (just as dates are not actually dates but numbers). When do you get the error you mention? If possible, send some sample code.

    As for database corruption, I don't think the reason could be the Hyperlink field. Unfortunately, there are litterally dozens of reasons why corruption may occur, both software and hardware. For example, I have one VB app with a backend Access database. It works fine on three machines, but I on a fourth machine every now and then I get random "Unrecognized database format" or "Member not found" errors. After a machine reset or a database repair everything is back to normal for a while (a couple of days) and then it crashes again. It has been driving me mad for months and still no solution.

  3. #3
    Join Date
    Oct 2003
    Posts
    2

    Re: Using HTML code in Access database

    Thanks for your reply. It is a memo field in which we are using HTML code for the description of products in the client's store. The problem seems to have started when the client started uploading descriptions to the database that contain images and pdf files being pulled from other sites (I have informed that that they should not do this without permission). We receive the error message when trying to make changes to the database.

    I have repaired the database several times, but it only works temporarily. I haven't been able to find anyone that knows what could be causing this. The site is at a temp IP and hasn't even gone live yet.




    Originally posted by mashinovodja
    I am not sure what do you mean exactly by "use html code in one of the fields". Is the field type Hyperlink, or Text/Memo in which you store HTML code?

    In the first case, I don't think you can search a Hyperlink field the same way as any other Text field. Although it displays its content as plain text, it has different internal representation (just as dates are not actually dates but numbers). When do you get the error you mention? If possible, send some sample code.

    As for database corruption, I don't think the reason could be the Hyperlink field. Unfortunately, there are litterally dozens of reasons why corruption may occur, both software and hardware. For example, I have one VB app with a backend Access database. It works fine on three machines, but I on a fourth machine every now and then I get random "Unrecognized database format" or "Member not found" errors. After a machine reset or a database repair everything is back to normal for a while (a couple of days) and then it crashes again. It has been driving me mad for months and still no solution.

  4. #4
    Join Date
    Aug 2003
    Location
    Belgrade
    Posts
    68

    Re: Using HTML code in Access database

    Hmmm ...

    It is bit unusal to store HTML code in a database. Usually, when a dynamical content is needed, HTML is generated by scripts and combined with data from your database. Of course, nothing particularly wrong in storing chunks of HTML code in a database. HTML being just text, a Memo field should handle it without problems.

    But, if you try to insert an image or PDF file directly into a Memo field, I am not sure it will work because those are binary files and Memo fields are designed to support only pure text data, not streams of bytes. Maybe that is the source of your problem. I never tried to do anything similar, so I don't know how Access behaves in such a case: raises an error and doesn't accept the data, accepts the data without complaining but displays garbage, or says nothing and gets corrupted.

    If you have binary files and you want to store them in an Access database (which I don't think is good idea) you should use OLE fields.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •