Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
468b9d82
Commit
468b9d82
authored
Sep 08, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move updateCommon() into Win32 block because it is only used there.
parent
20dd23c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
106 deletions
+105
-106
src/interfaces/odbc/dlg_specific.c
src/interfaces/odbc/dlg_specific.c
+105
-106
No files found.
src/interfaces/odbc/dlg_specific.c
View file @
468b9d82
...
...
@@ -52,8 +52,8 @@ extern GLOBAL_VALUES globals;
#ifdef WIN32
static
int
driver_optionsDraw
(
HWND
,
const
ConnInfo
*
,
int
src
,
BOOL
enable
);
static
int
driver_options_update
(
HWND
hdlg
,
ConnInfo
*
ci
,
BOOL
);
#endif
static
void
updateCommons
(
const
ConnInfo
*
ci
);
#endif
#ifdef WIN32
void
...
...
@@ -390,6 +390,110 @@ ds_optionsProc(HWND hdlg,
return
FALSE
;
}
/*
* This function writes any global parameters (that can be manipulated)
* to the ODBCINST.INI portion of the registry
*/
static
void
updateCommons
(
const
ConnInfo
*
ci
)
{
const
char
*
sectionName
;
const
char
*
fileName
;
const
GLOBAL_VALUES
*
comval
;
char
tmp
[
128
];
if
(
ci
)
if
(
ci
->
dsn
&&
ci
->
dsn
[
0
])
{
mylog
(
"DSN=%s updating
\n
"
,
ci
->
dsn
);
comval
=
&
(
ci
->
drivers
);
sectionName
=
ci
->
dsn
;
fileName
=
ODBC_INI
;
}
else
{
mylog
(
"ci but dsn==NULL
\n
"
);
return
;
}
else
{
mylog
(
"drivers updating
\n
"
);
comval
=
&
globals
;
sectionName
=
DBMS_NAME
;
fileName
=
ODBCINST_INI
;
}
sprintf
(
tmp
,
"%d"
,
comval
->
fetch_max
);
SQLWritePrivateProfileString
(
sectionName
,
INI_FETCH
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
commlog
);
SQLWritePrivateProfileString
(
sectionName
,
INI_COMMLOG
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
debug
);
SQLWritePrivateProfileString
(
sectionName
,
INI_DEBUG
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
disable_optimizer
);
SQLWritePrivateProfileString
(
sectionName
,
INI_OPTIMIZER
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
ksqo
);
SQLWritePrivateProfileString
(
sectionName
,
INI_KSQO
,
tmp
,
fileName
);
/* Never update the onlyread, unique_index from this module
sprintf(tmp, "%d", comval->unique_index);
SQLWritePrivateProfileString(sectionName,
INI_UNIQUEINDEX, tmp, fileName);
sprintf(tmp, "%d", comval->onlyread);
SQLWritePrivateProfileString(sectionName,
INI_READONLY, tmp, fileName);*/
sprintf
(
tmp
,
"%d"
,
comval
->
use_declarefetch
);
SQLWritePrivateProfileString
(
sectionName
,
INI_USEDECLAREFETCH
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
unknown_sizes
);
SQLWritePrivateProfileString
(
sectionName
,
INI_UNKNOWNSIZES
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
text_as_longvarchar
);
SQLWritePrivateProfileString
(
sectionName
,
INI_TEXTASLONGVARCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
unknowns_as_longvarchar
);
SQLWritePrivateProfileString
(
sectionName
,
INI_UNKNOWNSASLONGVARCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
bools_as_char
);
SQLWritePrivateProfileString
(
sectionName
,
INI_BOOLSASCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
parse
);
SQLWritePrivateProfileString
(
sectionName
,
INI_PARSE
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
cancel_as_freestmt
);
SQLWritePrivateProfileString
(
sectionName
,
INI_CANCELASFREESTMT
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
max_varchar_size
);
SQLWritePrivateProfileString
(
sectionName
,
INI_MAXVARCHARSIZE
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
max_longvarchar_size
);
SQLWritePrivateProfileString
(
sectionName
,
INI_MAXLONGVARCHARSIZE
,
tmp
,
fileName
);
SQLWritePrivateProfileString
(
sectionName
,
INI_EXTRASYSTABLEPREFIXES
,
comval
->
extra_systable_prefixes
,
fileName
);
/* Never update the conn_setting from this module
SQLWritePrivateProfileString(sectionName,
INI_CONNSETTINGS, comval->conn_settings, fileName); */
}
#endif
/* WIN32 */
...
...
@@ -997,108 +1101,3 @@ getCommonDefaults(const char *section, const char *filename, ConnInfo *ci)
strcpy
(
comval
->
protocol
,
DEFAULT_PROTOCOL
);
}
}
/*
* This function writes any global parameters (that can be manipulated)
* to the ODBCINST.INI portion of the registry
*/
static
void
updateCommons
(
const
ConnInfo
*
ci
)
{
const
char
*
sectionName
;
const
char
*
fileName
;
const
GLOBAL_VALUES
*
comval
;
char
tmp
[
128
];
if
(
ci
)
if
(
ci
->
dsn
&&
ci
->
dsn
[
0
])
{
mylog
(
"DSN=%s updating
\n
"
,
ci
->
dsn
);
comval
=
&
(
ci
->
drivers
);
sectionName
=
ci
->
dsn
;
fileName
=
ODBC_INI
;
}
else
{
mylog
(
"ci but dsn==NULL
\n
"
);
return
;
}
else
{
mylog
(
"drivers updating
\n
"
);
comval
=
&
globals
;
sectionName
=
DBMS_NAME
;
fileName
=
ODBCINST_INI
;
}
sprintf
(
tmp
,
"%d"
,
comval
->
fetch_max
);
SQLWritePrivateProfileString
(
sectionName
,
INI_FETCH
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
commlog
);
SQLWritePrivateProfileString
(
sectionName
,
INI_COMMLOG
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
debug
);
SQLWritePrivateProfileString
(
sectionName
,
INI_DEBUG
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
disable_optimizer
);
SQLWritePrivateProfileString
(
sectionName
,
INI_OPTIMIZER
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
ksqo
);
SQLWritePrivateProfileString
(
sectionName
,
INI_KSQO
,
tmp
,
fileName
);
/* Never update the onlyread, unique_index from this module
sprintf(tmp, "%d", comval->unique_index);
SQLWritePrivateProfileString(sectionName,
INI_UNIQUEINDEX, tmp, fileName);
sprintf(tmp, "%d", comval->onlyread);
SQLWritePrivateProfileString(sectionName,
INI_READONLY, tmp, fileName);*/
sprintf
(
tmp
,
"%d"
,
comval
->
use_declarefetch
);
SQLWritePrivateProfileString
(
sectionName
,
INI_USEDECLAREFETCH
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
unknown_sizes
);
SQLWritePrivateProfileString
(
sectionName
,
INI_UNKNOWNSIZES
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
text_as_longvarchar
);
SQLWritePrivateProfileString
(
sectionName
,
INI_TEXTASLONGVARCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
unknowns_as_longvarchar
);
SQLWritePrivateProfileString
(
sectionName
,
INI_UNKNOWNSASLONGVARCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
bools_as_char
);
SQLWritePrivateProfileString
(
sectionName
,
INI_BOOLSASCHAR
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
parse
);
SQLWritePrivateProfileString
(
sectionName
,
INI_PARSE
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
cancel_as_freestmt
);
SQLWritePrivateProfileString
(
sectionName
,
INI_CANCELASFREESTMT
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
max_varchar_size
);
SQLWritePrivateProfileString
(
sectionName
,
INI_MAXVARCHARSIZE
,
tmp
,
fileName
);
sprintf
(
tmp
,
"%d"
,
comval
->
max_longvarchar_size
);
SQLWritePrivateProfileString
(
sectionName
,
INI_MAXLONGVARCHARSIZE
,
tmp
,
fileName
);
SQLWritePrivateProfileString
(
sectionName
,
INI_EXTRASYSTABLEPREFIXES
,
comval
->
extra_systable_prefixes
,
fileName
);
/* Never update the conn_setting from this module
SQLWritePrivateProfileString(sectionName,
INI_CONNSETTINGS, comval->conn_settings, fileName); */
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment