home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / acceserr / acceserr.bas next >
Encoding:
BASIC Source File  |  1994-11-15  |  16.0 KB  |  479 lines

  1.  
  2.  
  3. Sub Access20Error (AccessError As Integer)
  4.       Select Case AccessError
  5.         Case 1010
  6.             msg$ = "Invalid database ID."
  7.         
  8.         Case 1016
  9.             msg$ = "Can't have more than 10 fields in an index."
  10.         
  11.         Case 1029
  12.             msg$ = "Database engine hasn't been initialized."
  13.         
  14.         Case 1030
  15.             msg$ = "Database engine has already been initialized."
  16.         
  17.         Case 1034
  18.             msg$ = "Query support unavailable."
  19.         
  20.         Case 1046
  21.             msg$ = "Can't delete a field that is part of an index."
  22.         
  23.         Case 1051
  24.             msg$ = "Can't delete this index.  It is either the current index  or is used in a relationship."
  25.         
  26.         Case 1062
  27.             msg$ = "Can't create database; Invalid locale."
  28.         
  29.         Case 1066
  30.             msg$ = "Can't create a relationship."
  31.         
  32.         Case 1068
  33.             msg$ = "Invalid referential integrity constraint."
  34.         
  35.         Case 1209
  36.             msg$ = "The Jet database engine has encountered a problem in your database.  To correct the problem, you must repair and compact the database."
  37.         
  38.         Case 1308
  39.             msg$ = "Can't define field or index in a table that contains data."
  40.         
  41.         Case 1309
  42.             msg$ = "Can't modify table structure.  Another user has the table  open."
  43.         
  44.         Case 1315
  45.             msg$ = "Can't change a rule while the rules for this table are in use."
  46.         
  47.         Case 1316
  48.             msg$ = "Object is invalid for operation."
  49.         
  50.         Case 1402
  51.             msg$ = "Primary key already exists."
  52.         
  53.         Case 1403
  54.             msg$ = "Index already exists."
  55.         
  56.         Case 1406
  57.             msg$ = "Invalid index definition."
  58.         
  59.         Case 1513
  60.             msg$ = "Can't create index on Memo field or OLE Object field."
  61.         
  62.         Case 1519
  63.             msg$ = "Can't delete this field.  It's part of one or more  relationships."
  64.         
  65.         Case 1523
  66.             msg$ = "Zero length string is valid only in a text or Memo field."
  67.         
  68.         Case 1802
  69.             msg$ = "Can't open system database (typically SYSTEM.MDA)."
  70.         
  71.         Case 1910
  72.             msg$ = "You must enter a personal identifier (PID) consisting of  at least four and no more than 20 characters and digits."
  73.         
  74.         Case 1911
  75.             msg$ = "Account name already exists."
  76.         
  77.         Case 2030
  78.             msg$ = "There are several tables with that name. Please specify  owner in the format 'owner.table'."
  79.         
  80.         Case 2031
  81.             msg$ = "Invalid connection string in pass through query."
  82.         
  83.         Case 2032
  84.             msg$ = " Single row update/delete affected more than one row of a  remote table.  Index specified as unique contains duplicate values."
  85.         
  86.         Case 2033
  87.             msg$ = "The server's MSysConf table exists, but is in an incorrect format.  Contact your system administrator."
  88.         
  89.         Case 2034
  90.             msg$ = "You cannot use ODBC to attach an external Microsoft  Access or ISAM database table to your  database."
  91.         
  92.         Case 3028
  93.             msg$ = "Can't have action query as an input."
  94.         
  95.         Case 3031
  96.             msg$ = "Query does not return records."
  97.         
  98.         Case 3059
  99.             msg$ = "This query is not a properly formed data definition  query."
  100.         
  101.         Case 3060
  102.             msg$ = "No database specified in connection string or IN clause."
  103.         
  104.         Case 3063
  105.         
  106.             msg$ = "At most one field can be returned from a subquery that doesn't use the EXISTS keyword."
  107.         
  108.         Case 3064
  109.             msg$ = "The number of columns in the two selected tables or queries of a union query don't match."
  110.         
  111.         Case 3066
  112.             msg$ = "Execute method must be used on action or data definition queries."
  113.         
  114.         Case 3069
  115.             msg$ = "Pass through query with ReturnsRecords property set to True did not return any records."
  116.         
  117.         Case 3070
  118.             msg$ = "At most one record can be returned by this subquery."
  119.         
  120.         Case 3071
  121.             msg$ = "Query is too complex."
  122.         
  123.         Case 3072
  124.             msg$ = "Unions not allowed in a subquery."
  125.         
  126.         Case 3073
  127.             msg$ = "Can't perform join, group, or sort. Combined fields are too long."
  128.         
  129.         Case 3077
  130.             msg$ = "Too many FastFind Sessions were invoked."
  131.         
  132.         Case 3520
  133.             msg$ = "Number  of query values and destination fields aren't the same."
  134.         
  135.         Case 3530
  136.             msg$ = "Join expression not supported."
  137.         
  138.         Case 3531
  139.             msg$ = "Can be present only in version 1.0 format."
  140.         
  141.         Case 3532
  142.             msg$ = "Syntax error in union query."
  143.         
  144.         Case 3535
  145.             msg$ = "Pass through query must contain at least one character."
  146.         
  147.         Case 3550
  148.             msg$ = "Syntax error in CONSTRAINT clause."
  149.         
  150.         Case 3551
  151.             msg$ = "Syntax error in CREATE TABLE statement."
  152.         
  153.         Case 3552
  154.             msg$ = "Syntax error in CREATE INDEX statement."
  155.         
  156.         Case 3553
  157.             msg$ = "Syntax error in field definition."
  158.         
  159.         Case 3554
  160.             msg$ = "Syntax error in ALTER TABLE statement."
  161.         
  162.         Case 3555
  163.             msg$ = "Syntax error in DROP INDEX statement."
  164.         
  165.         Case 3556
  166.             msg$ = "Syntax error in DROP TABLE statement."
  167.         
  168.         Case 3560
  169.             msg$ = "Relationship must be on the same number of fields with the same data types."
  170.         
  171.         Case 3561
  172.             msg$ = "Can't find field in index definition."
  173.         
  174.         Case 3601
  175.             msg$ = "Property setting can't be larger than 2 KB."
  176.         
  177.         Case 3602
  178.             msg$ = "This property isn't supported for external data sources or for databases created in a previous version."
  179.         
  180.         Case 3603
  181.             msg$ = "Property specified already exists."
  182.         
  183.         Case 3604
  184.             msg$ = "DeleteOnly called with non zero cbData."
  185.         
  186.         Case 3605
  187.             msg$ = "An error has occurred.  Properties were not saved."
  188.         
  189.         Case 3606
  190.             msg$ = "Can't save property; property is a schema property."
  191.         
  192.         Case 3700
  193.             msg$ = "Validation rules and default values can't be placed on system or attached tables."
  194.         
  195.         Case 3704
  196.             msg$ = "Can't place this validation expression on this field."
  197.         
  198.         Case 3708
  199.             msg$ = "Syntax error in default value."
  200.         
  201.         Case 5015
  202.             msg$ = "External table isn't in the expected format."
  203.         
  204.         Case 5016
  205.             msg$ = "Unexpected error from external database driver."
  206.         
  207.         Case 5017
  208.             msg$ = "Numeric field overflow."
  209.         
  210.         Case 5020
  211.             msg$ = "Paradox index is not primary."
  212.         
  213.         Case 5029
  214.             msg$ = "Can't open.  Another user has the table open using a different network control file or locking style."
  215.         
  216.         Case 5030
  217.             msg$ = "Can't open this Paradox 4.x table because ParadoxNetStyle is set to 3.x."
  218.         
  219.         Case 5112
  220.             msg$ = "Format of memo file doesn't match specified external database format."
  221.         
  222.         Case 5210
  223.             msg$ = "Btrieve: Invalid IndexDDF option ."
  224.         
  225.         Case 5211
  226.             msg$ = "Invalid DataCodePage option ."
  227.         
  228.         Case 5212
  229.             msg$ = "Btrieve: Xtrieve options aren't correct in ."
  230.         
  231.         Case 5213
  232.             msg$ = "Btrieve: Can't find file FIELD.DDF."
  233.         
  234.         Case 5214
  235.             msg$ = "Btrieve: Invalid IndexDeleteRenumber option."
  236.         
  237.         Case 8056
  238.             msg$ = "No destination field name in INSERT statement."
  239.         
  240.         Case 8172
  241.             msg$ = "Top not allowed in delete queries."
  242.         
  243.         Case 8175
  244.             msg$ = "Crosstab query contains one or more invalid fixed column headings."
  245.         
  246.         Case 8176
  247.             msg$ = "Query is corrupt."
  248.         
  249.         Case 8177
  250.             msg$ = "Invalid TOP argument in select query."
  251.         
  252.         Case 8178
  253.             msg$ = "This Recordset is not updatable."
  254.         
  255.         Case 8179
  256.             msg$ = "Field is based on an expression and can't be edited."
  257.         
  258.         Case 8180
  259.             msg$ = "Table  is read only."
  260.         
  261.         Case 8181
  262.             msg$ = "Record in table  was deleted by another user."
  263.         
  264.         Case 8182
  265.             msg$ = "Record in table is locked by another user."
  266.         
  267.         Case 8183
  268.             msg$ = "To make changes to this field, first save the record."
  269.         
  270.         Case 8184
  271.             msg$ = "Can't enter value into blank field on 'one' side of outer  join."
  272.         
  273.         Case 8185
  274.             msg$ = "Records in table would have no record on the 'one'  side."
  275.         
  276.         Case 8186
  277.             msg$ = "Current field must match join key on 'one' side of outer join."
  278.         
  279.         Case 8187
  280.             msg$ = "Invalid Memo or OLE object in subquery."
  281.         
  282.         Case 8188
  283.             msg$ = "Unrecognized database format."
  284.         
  285.         Case 8189
  286.             msg$ = "ORDER BY expression uses non output fields."
  287.         
  288.         Case 8190
  289.             msg$ = "Unknown or invalid reference  in validation expression or default value in table."
  290.         
  291.         Case 8191
  292.             msg$ = "Unknown or invalid field reference."
  293.         
  294.         Case 8192
  295.             msg$ = "Can't add record(s); primary key for table not in recordset."
  296.         
  297.         Case 8193
  298.             msg$ = "Can't add record(s); join key of table not in recordset."
  299.         
  300.         Case 8194
  301.             msg$ = "The database is opened by user on machine.  You can't open this database exclusively."
  302.         
  303.         Case 8195
  304.             msg$ = "Record(s) can't be added; no corresponding record on the 'one' side."
  305.         
  306.         Case 8196
  307.             msg$ = "Can't use Memo or OLE object field   in SELECT clause of a union query."
  308.         
  309.         Case 8197
  310.             msg$ = "Unknown function   in validation expression or default value on."
  311.         
  312.         Case 8220
  313.             msg$ = "Can't modify the design of table.  It's in a read only database."
  314.         
  315.         Case 8221
  316.             msg$ = "Can't find table or constraint."
  317.         
  318.         Case 8222
  319.             msg$ = "No such index  on table."
  320.         
  321.         Case 8223
  322.             msg$ = "Can't create relationship.  Referenced table doesn't have a primary key."
  323.         
  324.         Case 8224
  325.             msg$ = "The specified fields are not uniquely indexed in table."
  326.         
  327.         Case 8225
  328.             msg$ = "Table  already has an index named."
  329.         
  330.         Case 8226
  331.             msg$ = "Table doesn't exist."
  332.         
  333.         Case 8227
  334.             msg$ = "No such relationship on table ."
  335.         
  336.         Case 8228
  337.             msg$ = "There is already a relationship named  in the current  database."
  338.         
  339.         Case 8229
  340.             msg$ = "Can't create relationships to enforce referential integrity.  Existing data in table  violates referential integrity rules with related table."
  341.         
  342.         Case 8230
  343.             msg$ = "Field already exists in table."
  344.         
  345.         Case 8231
  346.             msg$ = "There is no field named in table ."
  347.         
  348.         Case 8232
  349.             msg$ = "Field   size must be 1 to 255."
  350.         
  351.         Case 8233
  352.             msg$ = "Can't delete field.  It's part of one or more relationships."
  353.         
  354.         Case 8234
  355.             msg$ = "There is no primary key in table ."
  356.         
  357.         Case 8235
  358.             msg$ = "Invalid field name  in definition of index or relationship."
  359.         
  360.         Case 8260
  361.             msg$ = "Error in table level validation expression."
  362.         
  363.         Case 8261
  364.             msg$ = "Field  can't contain a null value."
  365.         
  366.         Case 8262
  367.             msg$ = "Field can't be a zero length string."
  368.         
  369.         Case 8263
  370.             msg$ = "This validation rule must be met."
  371.         
  372.         Case 8264
  373.             msg$ = "Can't perform cascading operation.  Since related records exist in table , referential integrity rules would be violated."
  374.         
  375.         Case 8265
  376.             msg$ = "Can't perform cascading operation.  There must be a related record in table ."
  377.         
  378.         Case 8266
  379.             msg$ = "Can't perform cascading operation.  It would result in a null key in table."
  380.         
  381.         Case 8267
  382.             msg$ = "Can't perform cascading operation.  It would result in a duplicate key in table ."
  383.         
  384.         Case 8268
  385.             msg$ = "Can't perform cascading operation.  It would result in two updates on field  in table ."
  386.             
  387.         Case 8269
  388.             msg$ = "Can't perform cascading operation.  It would cause field  to become null, which is not allowed."
  389.         
  390.         Case 8270
  391.             msg$ = "Can't perform cascading operation.  It would cause field to become a zero length string, which is not allowed."
  392.         
  393.         Case 8271
  394.             msg$ = "Can't perform cascading operation:"
  395.         
  396.         Case 8272
  397.             msg$ = "Invalid entry.  Can't perform cascading operation specified in table  because value entered is too big  for field ."
  398.         
  399.         Case 8273
  400.             msg$ = "There is no message for this error."
  401.         
  402.         Case 8274
  403.             msg$ = "Can't perform cascading update on table because it  currently in use."
  404.         
  405.         Case 20000
  406.             msg$ = "Can't open this database for update."
  407.         
  408.         Case 30001
  409.             msg$ = "No fields defined   cannot append table."
  410.         
  411.         Case 30002
  412.             msg$ = "Name not found in this collection."
  413.         
  414.         Case 30003
  415.             msg$ = "Can't append.  Field is part of a TableDefs collection."
  416.         
  417.         Case 30004
  418.             msg$ = "Property can be set only when the field is part of a Recordset object's Fields collection."
  419.         
  420.         Case 30005
  421.             msg$ = "Can't set this property once the object is part of a collection."
  422.         
  423.         Case 30006
  424.             msg$ = "Can't append.  Index is part of a TableDefs collection."
  425.         
  426.         Case 30007
  427.             msg$ = "Property not found."
  428.         
  429.         Case 30008
  430.             msg$ = " Invalid property value."
  431.         
  432.         Case 30009
  433.             msg$ = "Object isn't a collection."
  434.         
  435.         Case 30010
  436.             msg$ = "Method not applicable for this object."
  437.         
  438.         Case 30011
  439.             msg$ = "Can't set this property for remote objects."
  440.         
  441.         Case 30012
  442.             msg$ = "Can't append a relation with no fields defined."
  443.         
  444.         Case 30013
  445.             msg$ = "Can't append.  Object already in collection."
  446.         
  447.         Case 30014
  448.             msg$ = "Can't delete a built in property."
  449.         
  450.         Case 30015
  451.             msg$ = "Property  must be set before using this method."
  452.         
  453.         Case 30016
  454.             msg$ = "User defined properties don't support a Null value."
  455.         
  456.         Case 30017
  457.             msg$ = "Object is no longer valid."
  458.         
  459.         Case 30018
  460.             msg$ = "This method or property is not currently available on this Recordset."
  461.         
  462.         Case 30019
  463.             msg$ = "The action was canceled by an associated object."
  464.         
  465.         Case 30020
  466.             msg$ = "Error in DAO automation."
  467.         
  468.         Case 30021
  469.             msg$ = "Data type conversion error."
  470.         
  471.         Case 32020
  472.             msg$ = "Can't import table or query.  No records found, or all records contain errors."
  473.         
  474.         End Select
  475.         MsgBox msg$
  476.  
  477. End Sub
  478.  
  479.