B
Bodo
Hi,
my app imports win32 api SQLConfigDataSourceW(..) that requires attributes
parameter of type string (lpszAttributes).
When my code executes the following line, string ODBC_attributes contains
only the chars from parameter {0} and {1} the rest is missing:
ODBC_attributes = String.Format("{0}={1}\0 {2}={3}\0 ",ODBC_ATTRIB_DSN,
ODBC_DatasourceName , ODBC_ATTRIB_DATABASE, ODBC_Database )
"\0" termination of each key/value pair seems to be required by the api
function.
Can anyone advise on how to use string concatenation with 0-terminate chars?
Appreciate any thoughts.
Thanks in advance.
Bodo
my app imports win32 api SQLConfigDataSourceW(..) that requires attributes
parameter of type string (lpszAttributes).
When my code executes the following line, string ODBC_attributes contains
only the chars from parameter {0} and {1} the rest is missing:
ODBC_attributes = String.Format("{0}={1}\0 {2}={3}\0 ",ODBC_ATTRIB_DSN,
ODBC_DatasourceName , ODBC_ATTRIB_DATABASE, ODBC_Database )
"\0" termination of each key/value pair seems to be required by the api
function.
Can anyone advise on how to use string concatenation with 0-terminate chars?
Appreciate any thoughts.
Thanks in advance.
Bodo