Okay - I am not sure why this is happening, but I need to understand.
When I execute the application via the IDE the SQLCA.dbparm = "DataSource='**************',TrustedConnection=1,Namespace='System.Data.SqlClient',Database='*******',CommandTimeout= '1200'"
When I execute the application via the server that is hosting the EXE the SQLCA.dbparm = "DataSource=**************,TrustedConnection=1,Namespace='System.Data.SqlClient',Database=*******,CommandTimeout= '1200'"
The difference between the two is the ' mark associate to the DataSource and DataBase. These values are being provided by the application.ini file.
My application provides the following snippet of code:
SQLCA.DBParm = "DataSource='" + profilestring(gs_inidbloc, 'DBMS_PROFILES', 'DataSource', '') + "'" &
+ ",TrustedConnection=" + profilestring(gs_inidbloc, 'DBMS_PROFILES', 'TrustedConnection', '') &
+ ",Namespace='" + profilestring(gs_inidbloc, 'DBMS_PROFILES', 'Namespace', '') + "'" &
+ ",Database='" + profilestring(gs_inidbloc, 'DBMS_PROFILES', 'DataBase', '') + "'" &
+ ",CommandTimeout= '1200' "
ls_datasource = ProfileString( . . . )
IF Left(ls_datasource, 1) + Right(ls_datasource, 1) <> " ' ' " THEN ls_datasource = " ' " + ls_datasource + " ' "
That one-liner colud be wrapper in a function to return a guaranteed quoted string. (see separate reply for code example)