connection string for oracle
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I always get this exception -- System.Data.OracleClient.OracleException: ORA-00911: invalid character at System.Data.OracleClient... which indicates the connection is not valid. Following is my code: string connectionString = "Data Source=ora01;User ID=zd01;password=1234;Persist Security Info=True;"; OracleConnection con = new OracleConnection(connectionString); con.Open(); string sql = "insert into ua_user values(4, 'vivien', 'vivien', 9);"; OracleCommand command = new OracleCommand(sql, con); command.ExecuteNonQuery(); con.Close(); the sql command is working, and this worked under .net 1.1, now I am writing under .net 2.0, it seems refuse to work. Can anyone tell me what I did wrong, thank you in advance.