home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
btrtest
/
btrtest.bas
< prev
next >
Wrap
BASIC Source File
|
1992-03-16
|
7KB
|
130 lines
Sub StartUp ()
' Initialize Btrieve
InitDB
End Sub
Sub BtrErr (Status%)
' Process Btrieve Error Messages
Select Case Status%
Case 1: Msg$ = "Invalid Operation, Error # " + Str$(Status%)
Case 2: Msg$ = "File I/O Error # " + Str$(Status%)
Case 3: Msg$ = "File Not Open, Error #" + Str$(Status%)
Case 4: Msg$ = "Key Value Not Found, Error # " + Str$(Status%)
Case 5: Msg$ = "Duplicate Key Value, Error #" + Str$(Status%)
Case 6: Msg$ = "Invalid Key Number, Error # " + Str$(Status%)
Case 7: Msg$ = "Different Key Number, Error # " + Str$(Status%)
Case 8: Msg$ = "Invalid Postioning, Error # " + Str$(Status%)
Case 9: Msg$ = "End Of File, Error # " + Str$(Status%)
Case 10: Msg$ = "Non-Modifiable Key Error # " + Str$(Status%)
Case 11: Msg$ = "Invalid File Name, Error # " + Str$(Status%)
Case 12: Msg$ = "File Not Found, Error # " + Str$(Status%)
Case 13: Msg$ = "Extended File Error # " + Str$(Status%)
Case 14: Msg$ = "Pre-Image Open Error # " + Str$(Status%)
Case 15: Msg$ = "Pre-Image I/O Error # " + Str$(Status%)
Case 16: Msg$ = "Expansion Error # " + Str$(Status%)
Case 17: Msg$ = "Close Error # " + Str$(Status%)
Case 18: Msg$ = "Disk Full, Error # " + Str$(Status%)
Case 19: Msg$ = "Unrecoverable Error # " + Str$(Status%)
Case 20: Msg$ = "Record Manager Inactive, Error # " + Str$(Status%)
Case 21: Msg$ = "Key Buffer Too Short, Error # " + Str$(Status%)
Case 22: Msg$ = "Data Buffer Length Error # " + Str$(Status%)
Case 23: Msg$ = "Postion Block Length Error # " + Str$(Status%)
Case 24: Msg$ = "Page Size Error # " + Str$(Status%)
Case 25: Msg$ = "I/O Creation Error # " + Str$(Status%)
Case 26: Msg$ = "Number of Keys Error # " + Str$(Status%)
Case 27: Msg$ = "Invalid Key Length, Error # " + Str$(Status%)
Case 28: Msg$ = "Invalid Record Length, Error # " + Str$(Status%)
Case 29: Msg$ = "Invalid Key Length, Error # " + Str$(Status%)
Case 30: Msg$ = "Not A Btrieve File, Error # " + Str$(Status%)
Case 31: Msg$ = "File Already Extended, Error # " + Str$(Status%)
Case 32: Msg$ = "Extend I/O Error # " + Str$(Status%)
Case 33: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 34: Msg$ = "Invalid Extension Partition Error # " + Str$(Status%)
Case 35: Msg$ = "Directory Error # " + Str$(Status%)
Case 36: Msg$ = "Transaction Error # " + Str$(Status%)
Case 37: Msg$ = "Transaction Is Active Error # " + Str$(Status%)
Case 38: Msg$ = "Transaction Control File Error # " + Str$(Status%)
Case 39: Msg$ = "End/Abort Transaction Error # " + Str$(Status%)
Case 40: Msg$ = "Transaction Maximum Files Error # " + Str$(Status%)
Case 41: Msg$ = "Operation Not Allowed, Error # " + Str$(Status%)
Case 42: Msg$ = "Incomplete Accelerated Access, Error # " + Str$(Status%)
Case 43: Msg$ = "Invalid Record Address, Error # " + Str$(Status%)
Case 44: Msg$ = "Null Key Path, Error # " + Str$(Status%)
Case 45: Msg$ = "Inconsistent Key Path, Error # " + Str$(Status%)
Case 46: Msg$ = "File Access Denied, Error # " + Str$(Status%)
Case 47: Msg$ = "Exceeded Open Files Maximum, Error # " + Str$(Status%)
Case 48: Msg$ = "Invalid Alternative Sequence Definition, Error # " + Str$(Status%)
Case 49: Msg$ = "Invalid Key Type, Error # " + Str$(Status%)
Case 50: Msg$ = "Owner Already Set, Error # " + Str$(Status%)
Case 51: Msg$ = "Invalid Owner, Error # " + Str$(Status%)
Case 52: Msg$ = "Writing Cache, Error # " + Str$(Status%)
Case 53: Msg$ = "Invalid Interface, Error # " + Str$(Status%)
Case 54: Msg$ = "Variable Length Record Damage, Error # " + Str$(Status%)
Case 55: Msg$ = "Auto-increment Key Error # " + Str$(Status%)
Case 56: Msg$ = "Suplimental Index Damage, Error # " + Str$(Status%)
Case 57: Msg$ = "Expanded Memory Error # " + Str$(Status%)
Case 58: Msg$ = "Compression Buffer To Short, Error # " + Str$(Status%)
Case 59: Msg$ = "File Already Exists, Error # " + Str$(Status%)
Case 60: Msg$ = "Reject Count Reached, Error # " + Str$(Status%)
Case 61: Msg$ = "Work Space Too Small, Error # " + Str$(Status%)
Case 62: Msg$ = "Incorrect Data Buffer Structure, Error # " + Str$(Status%)
Case 63: Msg$ = "Invalid Extented Insert Buffer, Error # " + Str$(Status%)
Case 64: Msg$ = "Filter Limit Reached, Error # " + Str$(Status%)
Case 65: Msg$ = "Incorrect Field Offset, Error # " + Str$(Status%)
Case 66: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 67: Msg$ = "Not Define, Error # " + Str$(Status%)
Case 68: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 69: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 70: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 71: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 72: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 73: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 74: Msg$ = "Automatic Transaction Abort, Error # " + Str$(Status%)
Case 75: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 76: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 77: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 78: Msg$ = "Deadlock Detected, Error # " + Str$(Status%)
Case 79: Msg$ = "Not Defined, Error # " + Str$(Status%)
Case 80: Msg$ = "Record Change Conflict, Error # " + Str$(Status%)
Case 81: Msg$ = "Lock Error # " + Str$(Status%)
Case 82: Msg$ = "Lost Position, Error # " + Str$(Status%)
Case 83: Msg$ = "Read Outside Transaction, Error # " + Str$(Status%)
Case 84: Msg$ = "Record Locked, Error # " + Str$(Status%)
Case 85: Msg$ = "File Locked, Error # " + Str$(Status%)
Case 86: Msg$ = "File Table Full, Error # " + Str$(Status%)
Case 87: Msg$ = "Handle Table Full, Error # " + Str$(Status%)
Case 88: Msg$ = "Incompatible Mode, Error # " + Str$(Status%)
Case 89: Msg$ = "Error 89 Not Defined, Error # " + Str$(Status%)
Case 90: Msg$ = "Redirected Device Table Full, Error # " + Str$(Status%)
Case 91: Msg$ = "Server Error # " + Str$(Status%)
Case 92: Msg$ = "Transaction table Full, Error # " + Str$(Status%)
Case 93: Msg$ = "Incompatibel Lock Type, Error # " + Str$(Status%)
Case 94: Msg$ = "Invalid Priviledges, Error # " + Str$(Status%)
Case 95: Msg$ = "Session No Longer Valid, Error # " + Str$(Status%)
Case 96: Msg$ = "Communication Environment Error # " + Str$(Status%)
Case 97: Msg$ = "Data Message Too Small, Error # " + Str$(Status%)
Case 98: Msg$ = "Internal Transaction Error # " + Str$(Status%)
Case 1010: Msg$ = "Unable To Read Btrieve During Recovery, Error # " + Str$(Status%)
Case Else: Msg$ = "Not Defined, Error # " + Str$(Status%)
End Select
Beep: Beep
Response% = MsgBox(Msg$, 0, "Data Base Error")
End Sub
Sub InitDB ()
INIT = "/P:4096 /M:48 /F:20 /U:2"
x = WBTRVINIT(INIT)
If x <> 0 Then
Response% = MsgBox("Could Not Initialize Data Base", 0, "Error Message")
End
End If
End Sub