Click here to Skip to main content
15,889,732 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using oracle database and getting
invalid username/password
while calling it.
this is my connection string-

"DefaultConnection": "Pooling=false;User Id=username;Password=pass;Data Source=192.168.111.100:1521/userdata;"

What I have tried:

private OracleConnection openConnection()
{
try
{
Connection = new OracleConnection(ConnectionString);
if (Connection.State == ConnectionState.Closed || Connection.State == ConnectionState.Broken)
{
Connection.Open();
}
}
catch (Exception ex)
{
Connection.Close();
}
finally
{
//Connection.Close();
//Connection.Dispose();
//OracleConnection.ClearPool(Connection);
}
return Connection;
}
Posted
Updated 11-Dec-20 1:33am

1 solution

You tell us that the username and password is correct for the server you are connecting to.

The error message tells us that they are not correct.

Guess which one we're going to believe? :)

Either the username or password is not correct, or you are not connecting to the server you think you're connecting to.
 
Share this answer
 
Comments
Member 14512875 12-Dec-20 1:03am    
I don't thing so, I can connect with toad with same ip and username and password.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900