@@ -87,6 +87,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
87
87
88
88
CheckDlgButton (hdlg , DRV_COMMLOG , globals .commlog );
89
89
CheckDlgButton (hdlg , DRV_OPTIMIZER , globals .disable_optimizer );
90
+ CheckDlgButton (hdlg , DRV_KSQO , globals .ksqo );
90
91
CheckDlgButton (hdlg , DRV_UNIQUEINDEX , globals .unique_index );
91
92
CheckDlgButton (hdlg , DRV_READONLY , globals .readonly );
92
93
CheckDlgButton (hdlg , DRV_USEDECLAREFETCH , globals .use_declarefetch );
@@ -128,6 +129,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
128
129
129
130
globals .commlog = IsDlgButtonChecked (hdlg , DRV_COMMLOG );
130
131
globals .disable_optimizer = IsDlgButtonChecked (hdlg , DRV_OPTIMIZER );
132
+ globals .ksqo = IsDlgButtonChecked (hdlg , DRV_KSQO );
131
133
globals .unique_index = IsDlgButtonChecked (hdlg , DRV_UNIQUEINDEX );
132
134
globals .readonly = IsDlgButtonChecked (hdlg , DRV_READONLY );
133
135
globals .use_declarefetch = IsDlgButtonChecked (hdlg , DRV_USEDECLAREFETCH );
@@ -168,6 +170,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
168
170
case IDDEFAULTS :
169
171
CheckDlgButton (hdlg , DRV_COMMLOG , DEFAULT_COMMLOG );
170
172
CheckDlgButton (hdlg , DRV_OPTIMIZER , DEFAULT_OPTIMIZER );
173
+ CheckDlgButton (hdlg , DRV_KSQO , DEFAULT_KSQO );
171
174
CheckDlgButton (hdlg , DRV_UNIQUEINDEX , DEFAULT_UNIQUEINDEX );
172
175
CheckDlgButton (hdlg , DRV_READONLY , DEFAULT_READONLY );
173
176
CheckDlgButton (hdlg , DRV_USEDECLAREFETCH , DEFAULT_USEDECLAREFETCH );
@@ -238,8 +241,11 @@ char buf[128];
238
241
/* Protocol */
239
242
if (strncmp (ci -> protocol , PG62 , strlen (PG62 )) == 0 )
240
243
CheckDlgButton (hdlg , DS_PG62 , 1 );
241
- else
242
- CheckDlgButton (hdlg , DS_PG62 , 0 );
244
+ else if (strncmp (ci -> protocol , PG63 , strlen (PG63 )) == 0 )
245
+ CheckDlgButton (hdlg , DS_PG63 , 1 );
246
+ else
247
+ CheckDlgButton (hdlg , DS_PG64 , 1 );
248
+
243
249
244
250
245
251
CheckDlgButton (hdlg , DS_SHOWOIDCOLUMN , atoi (ci -> show_oid_column ));
@@ -273,11 +279,11 @@ char buf[128];
273
279
/* Protocol */
274
280
if ( IsDlgButtonChecked (hdlg , DS_PG62 ))
275
281
strcpy (ci -> protocol , PG62 );
276
- else
282
+ else if ( IsDlgButtonChecked (hdlg , DS_PG63 ))
283
+ strcpy (ci -> protocol , PG63 );
284
+ else
277
285
ci -> protocol [0 ] = '\0' ;
278
286
279
-
280
-
281
287
sprintf (ci -> show_system_tables , "%d" , IsDlgButtonChecked (hdlg , DS_SHOWSYSTEMTABLES ));
282
288
283
289
sprintf (ci -> row_versioning , "%d" , IsDlgButtonChecked (hdlg , DS_ROWVERSIONING ));
@@ -634,6 +640,13 @@ char temp[256];
634
640
else if ( ! override )
635
641
globals .disable_optimizer = DEFAULT_OPTIMIZER ;
636
642
643
+ // KSQO is stored in the driver section only
644
+ SQLGetPrivateProfileString (section , INI_KSQO , "" ,
645
+ temp , sizeof (temp ), filename );
646
+ if ( temp [0 ] )
647
+ globals .ksqo = atoi (temp );
648
+ else if ( ! override )
649
+ globals .ksqo = DEFAULT_KSQO ;
637
650
638
651
// Recognize Unique Index is stored in the driver section only
639
652
SQLGetPrivateProfileString (section , INI_UNIQUEINDEX , "" ,
@@ -769,6 +782,10 @@ char tmp[128];
769
782
SQLWritePrivateProfileString (DBMS_NAME ,
770
783
INI_OPTIMIZER , tmp , ODBCINST_INI );
771
784
785
+ sprintf (tmp , "%d" , globals .ksqo );
786
+ SQLWritePrivateProfileString (DBMS_NAME ,
787
+ INI_KSQO , tmp , ODBCINST_INI );
788
+
772
789
sprintf (tmp , "%d" , globals .unique_index );
773
790
SQLWritePrivateProfileString (DBMS_NAME ,
774
791
INI_UNIQUEINDEX , tmp , ODBCINST_INI );
0 commit comments