212 lines
9.2 KiB
Plaintext
212 lines
9.2 KiB
Plaintext
Compile Insert MySql_Equates
|
|
;*###############################################################################
|
|
;*###############################################################################
|
|
;* MyVBQL - Visual Basic library to interface with a MySQL database
|
|
;* Copyright (C) 2000,2001 icarz, Inc.
|
|
;*
|
|
;* VBMySQLDirect - Extension of the original MyVBQL library
|
|
;* Copyright (C) 2004 Robert Rowe
|
|
;*
|
|
;* This library is free software; you can redistribute it and/or
|
|
;* modify it under the terms of the GNU Library General Public
|
|
;* License as published by the Free Software Foundation; either
|
|
;* version 2 of the License, or (at your option) any later version.
|
|
;*
|
|
;* This library is distributed in the hope that it will be useful,
|
|
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
;* Library General Public License for more details.
|
|
;*
|
|
;* You should have received a copy of the GNU Library General Public
|
|
;* License along with this library; if not, write to the Free
|
|
;* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
;*
|
|
;*###############################################################################
|
|
;*###############################################################################
|
|
;*
|
|
;* Written by Eric Grau (with additions and changes by Robert Rowe)
|
|
;*
|
|
;* Please send questions, comments, and changes to robert_rowe@yahoo.com
|
|
;*
|
|
;*###############################################################################
|
|
;*###############################################################################
|
|
;*
|
|
|
|
equ LONG_SIZE to 4
|
|
equ INT_SIZE to 2
|
|
equ BYTE_SIZE to 1
|
|
|
|
|
|
;*Error Description Constants
|
|
equ E40000 to "No Query Specified."
|
|
equ E40001 to "A valid Connection object is required to Open a recordset."
|
|
equ E40002 to "Connection Closed."
|
|
equ E40003 to "Server Error Detected." ;*(Server error appended)
|
|
equ E40004 to "Invalid Flush Option."
|
|
equ E40005 to "Recordset Closed."
|
|
equ E40006 to "Invalid Field Specified."
|
|
equ E40007 to "Add/Edit in progress. Call CancelUpdate first."
|
|
equ E40008 to "Cannot Add or Delete if source query is based on multiple tables."
|
|
equ E40009 to "Could not identify the table to delete from."
|
|
equ E40010 to "Could not identify the record to delete. Include the Primary Key in your query."
|
|
equ E40011 to "Could not identify the table to update."
|
|
equ E40012 to "Could not identify the record to update. Include the Primary Key in your query."
|
|
equ E40013 to "Could not identify the table to Insert Into."
|
|
equ E40014 to "Cannot Insert new record. You must set the value of at least one field."
|
|
equ E40015 to "No Current Record. The requested operation requires a current record and either BOF or EOF are true."
|
|
equ E40016 to "No Table specified."
|
|
equ E40017 to "Operation not allowed when Connection is opened."
|
|
equ E40018 to "Invalid Lock Option."
|
|
equ E40019 to "Missing Parameter. The specified Show Type requires a Table Name."
|
|
equ E40020 to "Missing Parameter. The specified Show Type requires a User."
|
|
equ E40021 to "Invalid Show Option."
|
|
equ E40022 to "No Database specified."
|
|
equ E40023 to "Operation not allowed when Recordset is opened."
|
|
equ E40024 to "Invalid Record Position. The requested position refers to a Deleted record or is greater than RecordCount."
|
|
equ E40025 to "Mismatched Number of Elements. FieldList and Values must contain the same number of elements."
|
|
equ E40026 to "Invalid Save Option."
|
|
equ E40027 to "Invalid Destination File Name."
|
|
|
|
|
|
|
|
*Private Type MyOption ;*option variable to send to the server during OpenConnection
|
|
* eOption As MYSQL_OPTION
|
|
* sArg As String
|
|
*End Type
|
|
|
|
|
|
;*===============================================================================================
|
|
;*========= connection state enum ===============================================================
|
|
;*===============================================================================================
|
|
|
|
*Public Enum MYSQL_CONNECTION_STATE
|
|
equ MY_CONN_OPEN to 0
|
|
equ MY_CONN_CLOSED to 1
|
|
*End Enum
|
|
|
|
;*===============================================================================================
|
|
;*========= server options enum =================================================================
|
|
;*===============================================================================================
|
|
|
|
*Public Enum MYSQL_OPTION
|
|
equ MYSQL_OPT_CONNECT_TIMEOUT to 0
|
|
equ MYSQL_OPT_COMPRESS to 1
|
|
equ MYSQL_OPT_NAMED_PIPE to 2
|
|
equ MYSQL_INIT_COMMAND to 3
|
|
equ MYSQL_READ_DEFAULT_FILE to 4
|
|
equ MYSQL_READ_DEFAULT_GROUP to 5
|
|
equ MYSQL_SET_CHARSET_DIR to 6
|
|
equ MYSQL_SET_CHARSET_NAME to 7
|
|
equ MYSQL_OPT_LOCAL_INFILE to 8
|
|
*End Enum
|
|
|
|
;*===============================================================================================
|
|
;*========= connection flags enum ===============================================================
|
|
;*===============================================================================================
|
|
|
|
;*Public Enum MYSQL_FLAG
|
|
equ CLIENT_LONG_PASSWORD to 1 ;*new more secure passwords
|
|
equ CLIENT_FOUND_ROWS to 2 ;*Found instead of affected rows
|
|
equ CLIENT_LONG_FLAG to 4 ;*Get all column flags
|
|
equ CLIENT_CONNECT_WITH_DB to 8 ;*One can specify db on connect
|
|
equ CLIENT_NO_SCHEMA to 16 ;*Don;*t allow database.table.column
|
|
equ CLIENT_COMPRESS to 32 ;*Can use compression protocol
|
|
equ CLIENT_ODBC to 64 ;*Odbc client
|
|
equ CLIENT_LOCAL_FILES to 128 ;*Can use LOAD DATA LOCAL
|
|
equ CLIENT_IGNORE_SPACE to 256 ;*Ignore spaces before ;*(;*
|
|
equ CLIENT_CHANGE_USER to 512 ;*Support the mysql_change_user()
|
|
equ CLIENT_INTERACTIVE to 1024 ;*This is an interactive client
|
|
equ CLIENT_SSL to 2048 ;*Switch to SSL after handshake
|
|
equ CLIENT_IGNORE_SIGPIPE to 4096 ;*IGNORE sigpipes
|
|
equ CLIENT_TRANSACTIONS to 8192 ;*Client knows about transactions
|
|
equ CLIENT_RESERVED to 16384 ;*Old flag for 4.1 protocol
|
|
equ CLIENT_SECURE_CONNECTION to 32768 ;*New 4.1 authentication
|
|
equ CLIENT_MULTI_STATEMENTS to 65536 ;*Enable/disable multi-stmt support
|
|
equ CLIENT_MULTI_RESULTS to 131072 ;*Enable/disable multi-results
|
|
;*End Enum
|
|
|
|
;*===============================================================================================
|
|
;*========= flush types enum ====================================================================
|
|
;*===============================================================================================
|
|
|
|
;*Public Enum MYSQL_FLUSH
|
|
equ MY_FLUSH_ALL to 0
|
|
equ MY_FLUSH_HOSTS to 1
|
|
equ MY_FLUSH_LOGS to 2
|
|
equ MY_FLUSH_PRIVILEGES to 3
|
|
equ MY_FLUSH_STATUS to 4
|
|
equ MY_FLUSH_TABLES to 5
|
|
equ MY_FLUSH_TABLES_WITH_READ_LOCK to 6
|
|
;*End Enum
|
|
|
|
;*Public Enum MYSQL_LOCKTYPE
|
|
equ MY_LOCK_READ to 1
|
|
equ MY_LOCK_READ_LOCAL to 2
|
|
equ MY_LOCK_WRITE to 3
|
|
equ MY_LOCK_LOW_PRIORITY_WRITE to 4
|
|
;*End Enum
|
|
|
|
;*Public Enum MYSQL_SHOWTYPE
|
|
equ MY_SHOW_DATABASES to 1
|
|
equ MY_SHOW_TABLES to 2
|
|
equ MY_SHOW_COLUMNS to 3
|
|
equ MY_SHOW_INDEX to 4
|
|
equ MY_SHOW_TABLE_STATUS to 5
|
|
equ MY_SHOW_STATUS to 6
|
|
equ MY_SHOW_VARIABLES to 7
|
|
equ MY_SHOW_LOGS to 8
|
|
equ MY_SHOW_PROCESSLIST to 9
|
|
equ MY_SHOW_GRANTS_FOR to 10
|
|
equ MY_SHOW_CREATE_TABLE to 11
|
|
equ MY_SHOW_MASTER_STATUS to 12
|
|
equ MY_SHOW_MASTER_LOGS to 13
|
|
equ MY_SHOW_SLAVE_STATUS to 14
|
|
;*MY_SHOW_WARNINGS to 15
|
|
;*MY_SHOW_ERRORS to 16
|
|
equ MY_SHOW_TABLE_TYPES to 17
|
|
equ MY_SHOW_PRIVILEGES to 18
|
|
;*End Enum
|
|
|
|
*Public Enum CursorLocationEnum
|
|
equ adUseNone to 1
|
|
equ adUseServer to 2
|
|
equ adUseClient to 3
|
|
*End Enum
|
|
|
|
|
|
|
|
*connection management routines
|
|
declare subroutine mysql_close
|
|
declare function mysql_init
|
|
declare function mysql_options
|
|
declare function mysql_ping
|
|
declare function mysql_real_connect
|
|
|
|
*status and error-reporting routines
|
|
declare function mysql_errno
|
|
declare function mysql_error
|
|
|
|
*query contruction and execution routines
|
|
declare function mysql_query
|
|
declare function mysql_select_db
|
|
|
|
*string escaping - Added by Robert Rowe - 02/07/04
|
|
declare function mysql_escape_string
|
|
declare function mysql_real_escape_string
|
|
declare function mysql_real_query
|
|
|
|
*result set processing routines
|
|
declare subroutine mysql_data_seek
|
|
declare subroutine mysql_free_result
|
|
declare function mysql_affected_rows
|
|
declare function mysql_fetch_field_direct
|
|
declare function mysql_fetch_lengths
|
|
declare function mysql_fetch_row
|
|
declare function mysql_field_count
|
|
declare function mysql_info
|
|
declare function mysql_insert_id
|
|
declare function mysql_num_fields
|
|
declare function mysql_num_rows
|
|
declare function mysql_store_result
|
|
declare function mysql_use_result
|