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' "
BTW: I see your NameSpace segment is single-quoted (that's where you call your wf_quoted function.
What happens if you remove 2 x [ ~' ] around ls_datasource and instead call wf_quoted same as for NameSpace?
I have a desktop application that uses ADO.NET. When I connection with a standard connection string:
Data Source = server\instance; Initial Catalog= database_name; Integrated Security = true I am successful in logging in.