SCM

[#1000704] Specify port in connection string

View Trackers | Bugs | Download .csv | Monitor

Date:
2006-08-11 01:36
Priority:
3
State:
Open
Submitted by:
Phil Cairns (oti169)
Assigned to:
Nobody (None)
Category:
Missing functionality
Group:
Resolution:
None
 
Summary:
Specify port in connection string

Detailed description
In combatting really slow performance, I needed to try and contact the server on a different port. I put this code into the RefreshConnectString method:

if( bParam ) {
_bstr_t param;

if (results[0].rgProperties[i].dwPropertyID == DBPROP_INIT_DATASOURCE) {
char buf[1024];
strcpy(buf, (const char*)_bstr_t(results[0].rgProperties[i].vValue));
char* sz = strtok(buf, ":,");
_variant_t vt(sz);
FormatParameter(param, vt);
m_strConnect+=param;
m_strConnect+=OLESTR(" ");

sz = strtok(0, ":,");
if (sz) {
m_strConnect+=OLESTR("port=");
vt = sz;
FormatParameter(param, vt);
m_strConnect+=param;
m_strConnect+=OLESTR(" ");
}
}
else {
FormatParameter( param, results[0].rgProperties[i].vValue );
m_strConnect+=param;
m_strConnect+=OLESTR(" ");
}
}

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge