G
Guest
Have the following situation:
I have an old C++ application, which I have managed to compile with /clr to
make it access .net functionality.
For some of the new functionality I have decided to create a C# DLL, being a
very neat and handy language. I have used wizards to create the dataset,
extracting data to a grid from an SQLServer with stored procedures, all
generated from wizards and life is fine. Except:
The connection string that I have is of course "hard coded default", so that
I could get the data in in the first place. The real life connection string
that I want is something that I have read from another database in the main
application (C++), which I now would like the C# DLL to use as well. This
connection string also contains username and password set from a user login
(using SQLServer authorisation).
The C++ application, originally being unmanaged does not read an app.config
file. The connection string is therefore not accessible through
System.Configuration.Configuration.
And the MyDLL.Properties.Settings.Default.myConnectionString is readonly,
and might not change things anyway.
Anyone, please? Or do I have to rewrite the whole db code?
Ole
I have an old C++ application, which I have managed to compile with /clr to
make it access .net functionality.
For some of the new functionality I have decided to create a C# DLL, being a
very neat and handy language. I have used wizards to create the dataset,
extracting data to a grid from an SQLServer with stored procedures, all
generated from wizards and life is fine. Except:
The connection string that I have is of course "hard coded default", so that
I could get the data in in the first place. The real life connection string
that I want is something that I have read from another database in the main
application (C++), which I now would like the C# DLL to use as well. This
connection string also contains username and password set from a user login
(using SQLServer authorisation).
The C++ application, originally being unmanaged does not read an app.config
file. The connection string is therefore not accessible through
System.Configuration.Configuration.
And the MyDLL.Properties.Settings.Default.myConnectionString is readonly,
and might not change things anyway.
Anyone, please? Or do I have to rewrite the whole db code?
Ole