@@ -87,6 +87,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
8787
8888CheckDlgButton (hdlg ,DRV_COMMLOG ,globals .commlog );
8989CheckDlgButton (hdlg ,DRV_OPTIMIZER ,globals .disable_optimizer );
90+ CheckDlgButton (hdlg ,DRV_KSQO ,globals .ksqo );
9091CheckDlgButton (hdlg ,DRV_UNIQUEINDEX ,globals .unique_index );
9192CheckDlgButton (hdlg ,DRV_READONLY ,globals .readonly );
9293CheckDlgButton (hdlg ,DRV_USEDECLAREFETCH ,globals .use_declarefetch );
@@ -128,6 +129,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
128129
129130globals .commlog = IsDlgButtonChecked (hdlg ,DRV_COMMLOG );
130131globals .disable_optimizer = IsDlgButtonChecked (hdlg ,DRV_OPTIMIZER );
132+ globals .ksqo = IsDlgButtonChecked (hdlg ,DRV_KSQO );
131133globals .unique_index = IsDlgButtonChecked (hdlg ,DRV_UNIQUEINDEX );
132134globals .readonly = IsDlgButtonChecked (hdlg ,DRV_READONLY );
133135globals .use_declarefetch = IsDlgButtonChecked (hdlg ,DRV_USEDECLAREFETCH );
@@ -168,6 +170,7 @@ int CALLBACK driver_optionsProc(HWND hdlg,
168170case IDDEFAULTS :
169171CheckDlgButton (hdlg ,DRV_COMMLOG ,DEFAULT_COMMLOG );
170172CheckDlgButton (hdlg ,DRV_OPTIMIZER ,DEFAULT_OPTIMIZER );
173+ CheckDlgButton (hdlg ,DRV_KSQO ,DEFAULT_KSQO );
171174CheckDlgButton (hdlg ,DRV_UNIQUEINDEX ,DEFAULT_UNIQUEINDEX );
172175CheckDlgButton (hdlg ,DRV_READONLY ,DEFAULT_READONLY );
173176CheckDlgButton (hdlg ,DRV_USEDECLAREFETCH ,DEFAULT_USEDECLAREFETCH );
@@ -238,8 +241,11 @@ char buf[128];
238241/*Protocol */
239242if (strncmp (ci -> protocol ,PG62 ,strlen (PG62 ))== 0 )
240243CheckDlgButton (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+
243249
244250
245251CheckDlgButton (hdlg ,DS_SHOWOIDCOLUMN ,atoi (ci -> show_oid_column ));
@@ -273,11 +279,11 @@ char buf[128];
273279/*Protocol */
274280if (IsDlgButtonChecked (hdlg ,DS_PG62 ))
275281strcpy (ci -> protocol ,PG62 );
276- else
282+ else if (IsDlgButtonChecked (hdlg ,DS_PG63 ))
283+ strcpy (ci -> protocol ,PG63 );
284+ else
277285ci -> protocol [0 ]= '\0' ;
278286
279-
280-
281287sprintf (ci -> show_system_tables ,"%d" ,IsDlgButtonChecked (hdlg ,DS_SHOWSYSTEMTABLES ));
282288
283289sprintf (ci -> row_versioning ,"%d" ,IsDlgButtonChecked (hdlg ,DS_ROWVERSIONING ));
@@ -634,6 +640,13 @@ char temp[256];
634640else if ( !override )
635641globals .disable_optimizer = DEFAULT_OPTIMIZER ;
636642
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 ;
637650
638651//Recognize Unique Index is stored in the driver section only
639652SQLGetPrivateProfileString (section ,INI_UNIQUEINDEX ,"" ,
@@ -769,6 +782,10 @@ char tmp[128];
769782SQLWritePrivateProfileString (DBMS_NAME ,
770783INI_OPTIMIZER ,tmp ,ODBCINST_INI );
771784
785+ sprintf (tmp ,"%d" ,globals .ksqo );
786+ SQLWritePrivateProfileString (DBMS_NAME ,
787+ INI_KSQO ,tmp ,ODBCINST_INI );
788+
772789sprintf (tmp ,"%d" ,globals .unique_index );
773790SQLWritePrivateProfileString (DBMS_NAME ,
774791INI_UNIQUEINDEX ,tmp ,ODBCINST_INI );