Bug #59966 | ODBC Options Flags using names of flags in string | ||
---|---|---|---|
Submitted: | 5 Feb 2011 17:57 | Modified: | 23 Feb 2011 18:12 |
Reporter: | Tim Gold | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 5.1.8 | OS: | Windows |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
[5 Feb 2011 17:57]
Tim Gold
[10 Feb 2011 11:01]
Bogdan Degtyariov
Hi Tim, The correct format for the options in the connection string is as follows: AUTO_RECONNECT=1;FOUND_ROWS=1;NO_PROMPT=1 There are two allowed values for the options to set: 0 (disabled) or 1 (enabled). Sometimes the task is to override settings in the DSN, so it is important to be able not only to set, but unset the option. Sett the report status: "Not a bug".
[10 Feb 2011 16:32]
Tim Gold
Thank you for your help!
[12 Feb 2011 23:35]
Tim Gold
I just tried adding The flags in the format "Driver={MySQL ODBC 5.1 Driver};Server=IP;Port=3306;Database=DB;User=User;Password=Pwd;FIELD_LENGTH=1;FOUND_ROWS=1;BIG_PACKETS=1;NO_PROMPT=1;AUTO_RECONNECT=1" The Flags do not seem to work. The only way I can seem to get the flags to work are to use Option=4194331
[16 Feb 2011 11:01]
Bogdan Degtyariov
Tim, There is one non-existing option in your connection string: FIELD_LENGTH. This flag has been removed (See ChangeLog). I checked how the other options worked using your connection string and all flags were set correctly. Please check the following QuickWatch output (return_matching_rows, allow_big_results, auto_reconnect and dont_prompt_upon_connect): - ds 0x01c94be8 {name=0x00000000 <Bad Ptr> driver=0x01c94d80 "MySQL ODBC 5.1 Driver" description=0x00000000 <Bad Ptr> ...} DataSource * + name 0x00000000 <Bad Ptr> unsigned short * + driver 0x01c94d80 "MySQL ODBC 5.1 Driver" unsigned short * + description 0x00000000 <Bad Ptr> unsigned short * + server 0x01c94de8 "localhost" unsigned short * + uid 0x01c94e80 "root" unsigned short * + pwd 0x00000000 <Bad Ptr> unsigned short * + database 0x01c94e38 "test" unsigned short * + socket 0x00000000 <Bad Ptr> unsigned short * + initstmt 0x00000000 <Bad Ptr> unsigned short * + charset 0x00000000 <Bad Ptr> unsigned short * + sslkey 0x00000000 <Bad Ptr> unsigned short * + sslcert 0x00000000 <Bad Ptr> unsigned short * + sslca 0x00000000 <Bad Ptr> unsigned short * + sslcapath 0x00000000 <Bad Ptr> unsigned short * + sslcipher 0x00000000 <Bad Ptr> unsigned short * port 3306 unsigned int readtimeout 0 unsigned int writetimeout 0 unsigned int clientinteractive 0 unsigned int + name8 0x00000000 <Bad Ptr> unsigned char * + driver8 0x00000000 <Bad Ptr> unsigned char * + description8 0x00000000 <Bad Ptr> unsigned char * + server8 0x00000000 <Bad Ptr> unsigned char * + uid8 0x00000000 <Bad Ptr> unsigned char * + pwd8 0x00000000 <Bad Ptr> unsigned char * + database8 0x00000000 <Bad Ptr> unsigned char * + socket8 0x00000000 <Bad Ptr> unsigned char * + initstmt8 0x00000000 <Bad Ptr> unsigned char * + charset8 0x00000000 <Bad Ptr> unsigned char * + sslkey8 0x00000000 <Bad Ptr> unsigned char * + sslcert8 0x00000000 <Bad Ptr> unsigned char * + sslca8 0x00000000 <Bad Ptr> unsigned char * + sslcapath8 0x00000000 <Bad Ptr> unsigned char * + sslcipher8 0x00000000 <Bad Ptr> unsigned char * return_matching_rows 1 int allow_big_results 1 int use_compressed_protocol 0 int change_bigint_columns_to_int 0 int safe 0 int auto_reconnect 1 int auto_increment_null_search 0 int handle_binary_as_char 0 int dont_prompt_upon_connect 1 int dynamic_cursor 0 int ignore_N_in_name_table 0 int user_manager_cursor 0 int dont_use_set_locale 0 int pad_char_to_full_length 0 int dont_cache_result 0 int return_table_names_for_SqlDescribeCol 0 int ignore_space_after_function_names 0 int force_use_of_named_pipes 0 int no_catalog 0 int read_options_from_mycnf 0 int disable_transactions 0 int force_use_of_forward_only_cursors 0 int allow_multiple_statements 0 int limit_column_size 0 int min_date_to_zero 0 int zero_date_to_min 0 int default_bigint_bind_str 0 int save_queries 0 int no_information_schema 0 int sslverify 0 unsigned int
[23 Feb 2011 7:26]
Bogdan Degtyariov
Tim, How do you verify that the flag has not been set?
[23 Feb 2011 18:12]
Tim Gold
After I removed the invalid flag everything now works fine. Thanks for your help.