I am trying to open a connection to oracle database using following connection string:
cnstr = "Provider=ORAOLEDB.Oracle;Data Source=primedb;User ID=" & txtUserName.Text & ";Password=" & txtPassword.Text & ";"
at the following line:
it gives "Run-time Error 91"
the connection variable is set in general section as "Dim cn as new adodb.connection"
but if i provide the user name and password as hard coded it works fine e.g.
cnstr = "Provider=ORAOLEDB.Oracle;Data Source=primedb;User ID=raajaindra;Password=mypassword;"
what could be the reason and the solution.