They are rather confusing and we can use ConnInfo.onlyread and ConnInfo.conn_settings.
if (NULL == self->locale_encoding)
{
encoding = check_client_encoding(ci->conn_settings);
- if (!encoding)
- encoding = check_client_encoding(ci->drivers.conn_settings);
CC_set_locale_encoding(self, encoding);
qlog(" extra_systable_prefixes='%s', conn_settings='%s' conn_encoding='%s'\n",
ci->drivers.extra_systable_prefixes,
- PRINT_NAME(ci->drivers.conn_settings),
+ PRINT_NAME(ci->conn_settings),
encoding ? encoding : "");
}
if (self->status == CONN_DOWN)
* function instead.
*/
- /* Global settings */
- retsend = CC_send_settings(self, GET_NAME(self->connInfo.drivers.conn_settings));
/* Per Datasource settings */
- if (retsend)
- retsend = CC_send_settings(self, GET_NAME(self->connInfo.conn_settings));
+ retsend = CC_send_settings(self, GET_NAME(self->connInfo.conn_settings));
if (CC_get_errornumber(self) > 0)
saverr = strdup(CC_get_errormsg(self));
comval->unknowns_as_longvarchar = DEFAULT_UNKNOWNSASLONGVARCHAR;
comval->bools_as_char = DEFAULT_BOOLSASCHAR;
strcpy(comval->extra_systable_prefixes, DEFAULT_EXTRASYSTABLEPREFIXES);
- comval->onlyread = DEFAULT_READONLY;
strcpy(comval->protocol, DEFAULT_PROTOCOL);
}
if (NULL == section || strcmp(section, INVALID_DRIVER) == 0)
/* Dont allow override of an override! */
if (inst_position)
{
- char conn_settings[LARGE_REGISTRY_LEN];
-
- /*
- * ConnSettings is stored in the driver section and per datasource
- * for override
- */
- SQLGetPrivateProfileString(section, INI_CONNSETTINGS, "",
- conn_settings, sizeof(conn_settings), filename);
- if ('\0' != conn_settings[0])
- STRX_TO_NAME(comval->conn_settings, conn_settings);
-
- /* Default state for future DSN's Readonly attribute */
- SQLGetPrivateProfileString(section, INI_READONLY, "",
- temp, sizeof(temp), filename);
- if (temp[0])
- comval->onlyread = atoi(temp);
-
/*
* Default state for future DSN's protocol attribute This isn't a
* real driver option YET. This is more intended for
/***
memcpy(to, from, sizeof(GLOBAL_VALUES));
SET_NAME_DIRECTLY(to->drivername, NULL);
- SET_NAME_DIRECTLY(to->conn_settings, NULL);
***/
NAME_TO_NAME(to->drivername, from->drivername);
CORR_VALCPY(fetch_max);
CORR_VALCPY(debug);
CORR_VALCPY(commlog);
CORR_VALCPY(unique_index);
- CORR_VALCPY(onlyread); /* readonly is reserved on Digital C++
- * compiler */
CORR_VALCPY(use_declarefetch);
CORR_VALCPY(text_as_longvarchar);
CORR_VALCPY(unknowns_as_longvarchar);
CORR_VALCPY(parse);
CORR_STRCPY(extra_systable_prefixes);
CORR_STRCPY(protocol);
- NAME_TO_NAME(to->conn_settings, from->conn_settings);
mylog("copy_globals driver=%s\n", SAFE_NAME(to->drivername));
}
void finalize_globals(GLOBAL_VALUES *glbv)
{
NULL_THE_NAME(glbv->drivername);
- NULL_THE_NAME(glbv->conn_settings);
}
#undef CORR_STRCPY
CheckDlgButton(hdlg, DRV_COMMLOG, comval->commlog > 0);
CheckDlgButton(hdlg, DRV_UNIQUEINDEX, comval->unique_index);
/* EnableWindow(GetDlgItem(hdlg, DRV_UNIQUEINDEX), enable); */
- CheckDlgButton(hdlg, DRV_READONLY, comval->onlyread);
- EnableWindow(GetDlgItem(hdlg, DRV_READONLY), enable);
+ EnableWindow(GetDlgItem(hdlg, DRV_READONLY), FALSE);
CheckDlgButton(hdlg, DRV_USEDECLAREFETCH, comval->use_declarefetch);
/* Unknown Sizes clear */
SetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, comval->extra_systable_prefixes);
/* Driver Connection Settings */
- SetDlgItemText(hdlg, DRV_CONNSETTINGS, SAFE_NAME(comval->conn_settings));
- EnableWindow(GetDlgItem(hdlg, DRV_CONNSETTINGS), enable);
+ EnableWindow(GetDlgItem(hdlg, DRV_CONNSETTINGS), FALSE);
ShowWindow(GetDlgItem(hdlg, ID2NDPAGE), enable ? SW_HIDE : SW_SHOW);
ShowWindow(GetDlgItem(hdlg, ID3RDPAGE), enable ? SW_HIDE : SW_SHOW);
comval->commlog = IsDlgButtonChecked(hdlg, DRV_COMMLOG);
comval->unique_index = IsDlgButtonChecked(hdlg, DRV_UNIQUEINDEX);
- if (!ci)
- {
- comval->onlyread = IsDlgButtonChecked(hdlg, DRV_READONLY);
- }
comval->use_declarefetch = IsDlgButtonChecked(hdlg, DRV_USEDECLAREFETCH);
/* Unknown (Default) Data Type sizes */
GetDlgItemText(hdlg, DRV_EXTRASYSTABLEPREFIXES, comval->extra_systable_prefixes, sizeof(comval->extra_systable_prefixes));
- /* Driver Connection Settings */
- if (!ci)
- {
- char conn_settings[LARGE_REGISTRY_LEN];
-
- GetDlgItemText(hdlg, DRV_CONNSETTINGS, conn_settings, sizeof(conn_settings));
- if ('\0' != conn_settings[0])
- STR_TO_NAME(comval->conn_settings, conn_settings);
- }
-
/* fall through */
return 0;
}
char debug;
char commlog;
char unique_index;
- char onlyread; /* readonly is reserved on Digital C++
- * compiler */
char use_declarefetch;
char text_as_longvarchar;
char unknowns_as_longvarchar;
char parse;
char extra_systable_prefixes[MEDIUM_REGISTRY_LEN];
char protocol[SMALL_REGISTRY_LEN];
- pgNAME conn_settings;
} GLOBAL_VALUES;
void copy_globals(GLOBAL_VALUES *to, const GLOBAL_VALUES *from);