Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    100

    Lightbulb Unanswered: Handle Access erros by Visual Basic

    Hello people,

    This question is very basic knowledge.
    When I execute a SQL against an Access database from a VisualBasic script, it doesn't work if the data I enter doesn't match the restriction of the field, I mean things like Not Null restriction, data type restriction, length restrictions and so on. I would like to handle this kind of errors of Access, in this way I just show the correspondent message of Access, and I don't have to control all the requirements by means of Visual Basic scripts before executing a SQL. Otherwise I must do a lot of controls each time I execute a SQL, like Not Null fields, data types, unique values, and so on.

    Do you know where I can find this information. Or if this is possible?

    Thanks a lot.

  2. #2
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    vb and vba in acces aint exactly the same, vba in acces is stripped, or with other words some statements or methods are not supported in vba access, so i think the errornumbers are not the same, stupid ....

    i think so

    so i think in that case your problem lays here.

    hope its help full

    greetings emiel

  3. #3
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    100
    Ok, thanx Emiel

    I give up with this. I am controlling the restrictions of the fields in Access manually, i.e., by means of visual basic scripts.

    Thanks a lot, now I Know that I cannot do it. I spent a lot of time trying to find a solution.

Posting Permissions

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