When I create a Designer-generated DataSet in Visual Studio, using the DB2 data provider, I am asked a question as to whether I want to store sensitive information in my ConnectionString object.
As it happens, I don't, as I want to force the users to enter their own username and password, in order to evaluate their authority to run the program.
The ConnectionString generated by Visual Studio at this point is ReadOnly.
How do I set the username and password supplied by the ConnectionString if the ConnectionString is Readonly?
I'm obviously missing something, but all of the solutions I've found online have failed in ways ranging up to the connection DLL not being found, to the connection suddenly mismatching its connection type (TCP/IP) and its communication API (SOCKETS). Error included here for the sake of incredulity:
ERROR [08001] [IBM] SQL30081N A communication error has been
detected. Communication protocol being used: "TCP/IP".
Communication API being used: "SOCKETS". Location where
the error was detected: "192.168.101.243".
Communication function detecting the error: "connect".
Protocol specific error code(s): "10061", "*", "*". SQLSTATE=08001
Stackoverflow, I give up. What am I doing wrong?
EDIT: Apologies for framing my issue poorly. I have a working connection string in place in the software. This is in the form:
"Database=dbName;User ID=admin;Password=adminPassword;Server=192.168.101.111:1111"
This connectionString works fine, no problems, everything is good.
My problem occurs when I try to change the connectionString at runtime to:
"Database=dbName;User ID=user;Password=userPassword;Server=192.168.101.111:1111"
What I'm looking for is an answer to the question: "How do I make changes to the designer-generated connectionString at runtime?" because everything I've tried so far has evidently been wrong.