I see a couple of potential problems with your SQL Statement
select * from Profile where profile id = '1'" :
1) profile id is two words. It should probably be profileid (1 word)
2) = '1' is a string. Most likely the profileId column is integer, so you
need to remove the single quotes.
3) You should really be using a parameterized query.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
> OracleConnection conn = new OracleConnection(ConnectionString);
> OracleCommand cmdProfile = new OracleCommand("select * from Profile where
[quoted text clipped - 11 lines]
>
> Any idea would be appreciated.
Elliot - 13 Dec 2007 05:36 GMT
Thanks for your idea, Peter.
"profile id" is just a retyping mistake. In fact, it is "profileid" in both
the code and the database. And, its datatype is varchar(Because I added some
characters before it sometimes).
What is parameterized query?
> I see a couple of potential problems with your SQL Statement
>
[quoted text clipped - 25 lines]
>>
>> Any idea would be appreciated.
Elliot - 13 Dec 2007 11:08 GMT
solved
> I see a couple of potential problems with your SQL Statement
>
[quoted text clipped - 25 lines]
>>
>> Any idea would be appreciated.