Getting Started - Redbook Examples

    I just finished typing the example of the red book, and I wrote a blog to commemorate the problems I encountered while typing the example of the red book:
1. Real-time error '-2147217842' operation has been canceled
Solution: Put the project and the required access in the same folder, and then you can run it
2. Real-time error 3265, no item found in the set corresponding to the required name or ordinal
Problem and solution: This kind of problem means that there is no data mentioned in the code in the access, for example, in the Red Book example 5, the identity item can be ignored
3. Real-time error 424 request object
Problem and solution: MSFlesGrid1-MSFlexGrid1, misspelled, double check the code
4. Compilation error: At least one parameter has no value specified
Solution: forget (record while solving next time)
5. Compile Error: Method or data member not found
Problem and solution: objRs.Field.Count-objRs.Fields.Count, if you miss an s, don't underestimate a ta, it is also very willful
6. Real-time error '-2147467259' file not found
Solution: The project and access are placed in the same folder, and the path is " & App.Path & "\Instance n.mdb "
7. Compilation error: User-defined type is undefined
Problem: The content in the book is not 100% correct, so there is no problem. This kind of problem is because the user type is not defined
Solution:
Project - Reference - Microsoft ActiveX Data Objects 2.5 Library - OK
    Finally, I would like to remind you that you should combine the book and the source file when knocking out the redbook example, because the book is not necessarily correct.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324874570&siteId=291194637