Monthly Archives: December 2010

2 posts

Christmas gift

Merry Christmas! My Christmas gift this year is a Slinky toy, the coolest toy in the whole wild world IMHO, even though it has nothing to do with computer or technology.

ORA-01745: invalid host/bind variable name, caused by reserved word in query

I wrote a simple parameterized query the other day against an Oracle database as follows: SELECT DISTINCT E.ID, E.Name, E.Department FROM Employee E WHERE E.ID = :uid Then in my application, I assign the value to the parameter as follows: cmd.Parameters.Add(new OracleParameter(":uid", OracleDbType.Varchar2)); However, when I was trying to run my application, I got an error saying: ORA-01745: invalid host/bind variable name Can you see what is causing the error? It took me hours of […]