G
Guest
I am trying to use a parameter to retrieve some entry from my Oracle table
I used Microsfot OleDB Provider for Oracle
Here are the codes
cmd.CommandText="select * from users where user_name= ?")
cmd.Parameters.Add("@user_name",OleDbType.Char,60).Value="jt5289"
da.SelectCommand=cmd;
da.Fill(ds,"Results")
But I cannot get the result I want, it returned 0 rows
I used tool(SQL Monitor) and it showed me the SQL I used
select * from users where user_name= :V0000
:V00001 = 'jt5289
Is there something wrong with this
If I type in select * from users where user_name='jt5289' it returns me the one row I wanted
Thanks
I used Microsfot OleDB Provider for Oracle
Here are the codes
cmd.CommandText="select * from users where user_name= ?")
cmd.Parameters.Add("@user_name",OleDbType.Char,60).Value="jt5289"
da.SelectCommand=cmd;
da.Fill(ds,"Results")
But I cannot get the result I want, it returned 0 rows
I used tool(SQL Monitor) and it showed me the SQL I used
select * from users where user_name= :V0000
:V00001 = 'jt5289
Is there something wrong with this
If I type in select * from users where user_name='jt5289' it returns me the one row I wanted
Thanks