I am non IT professional, but do build small applications for my own team too.
I am not sure how to ask the question, but I will try to make my question as clearly as possible.
Let us say: I want to build an application, and I design two text-boxes: Username & Password. Then I use below code to test a database created by IT department, in order to verify the user. It somehow works, but the method is silly.
Basically, I am assuming that the database is open to all employees. It could be true, it could be false. I have no ideas how IT department sets up each database.
Now if I build an application for organization-wide use, and I will create an Access file as back end for this application. Now I don't feel comfortable to use below code to verify an user. I am not sure if the database sampletest (in below code) is open
to organization-wide employees or only some employees.
My question: for most organizations, how does IT department manage employee directory? As an non-IT employee,
how can I access employee directory? If there is something only opening to IT employees, then I can still use below code to build application, just assuming the database is open to organization-wide employees. It is silly to test irrelevant
database, in order to verify an user.
GlobalVariables.ConnectionString = "Driver={Adaptive Server Enterprise};server=sample;port=12345;db=sampletest;uid=" + txtUsername.Text + ";pwd=" + txtPassword.Text + ";";
Cn = new OdbcConnection(GlobalVariables.ConnectionString);
bool SuccessfulConnection = false;
try
{
Cn.Open();
SuccessfulConnection = true;
}
catch
{
MessageBox.Show("Connection failed. Invalid Username/Password.", "Error Message");
}