Application-defined error 3315 during table.Update method 
Author Message
 Application-defined error 3315 during table.Update method

Quote:
>I have a piece of 32-bit  Visual Basic 4.0 code which adds a new
>record to a table (happens to be an MS Access database), sets field
>values, and then executes the UPDATE method on the table object.  When
>I execute the UPDATE method, I get a run-time error 3315.

>If I inspect the value of ERROR$(3315) it says "User-defined or
>Application-defined error".  Any ideas about finding what the actual
>problem is?  I've check all the obvious causes of database i/o errors,
>including validation logic in the database itself (which is actually
>non-existant).

>I've tried looking for HLP files for the Jet engine, but can't find
>anything.

>Philip Scott


For the sake of anyone else who has a problem finding error
descriptions on database errors:

I found a set of functions in VB 4.0 related to DAO errors.  It's a
DAO Errors() collection.  It works like this:

        Dim nLastErrIdx as integer

        nLastErrIdx = DBEngine.Count -1
        If ERR = DBEngine.Errors(nLastErrIdx).Number Then
                Debug.Print "Source of Err: " & DBEngine.Errors(nLastErrIdx).Source
                Debug.Print "Err Number: " & DBEngine.Errors(nLastErrIdx).Number
                Debug.Print "Description: " & DBEngine.Errors(nLastErrIdx).Description
        End If

So, using Errors(x).Description, I found that my error was caused by a
field which was marked "Allow Null Value=No", and which had been
asigned no value prior to my table.Update call.

Philip Scott



Sun, 17 Jan 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Application-defined error 3315 during table.Update method

2. No Error Decode for Err 3315

3. Error 3315 whats up with that

4. Database error during update-method: 3426

5. Error 32768, Application-defined or object-defined error

6. Error 713: Application-defined or object defined error

7. Error 713: Application-defined or object defined error

8. run-time error '713': Application-defined or object-defined error

9. Error 40038, Application-defined or object-defined error

10. why error 40038 : application-defined or object-defined error

11. Application-defined or object-defined error when saving taskitem

12. application defined or object defined error

 

 
Powered by phpBB® Forum Software