Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: string.Empty Vs "" Pin
Christian Graus27-Jun-08 0:23
protectorChristian Graus27-Jun-08 0:23 
GeneralRe: string.Empty Vs "" Pin
N a v a n e e t h27-Jun-08 0:40
N a v a n e e t h27-Jun-08 0:40 
GeneralRe: string.Empty Vs "" Pin
Guffa27-Jun-08 1:31
Guffa27-Jun-08 1:31 
AnswerRe: string.Empty Vs "" Pin
Guffa27-Jun-08 1:43
Guffa27-Jun-08 1:43 
GeneralRe: string.Empty Vs "" Pin
Pete O'Hanlon27-Jun-08 1:53
mvePete O'Hanlon27-Jun-08 1:53 
GeneralRe: string.Empty Vs "" Pin
Mark Churchill27-Jun-08 16:39
Mark Churchill27-Jun-08 16:39 
AnswerRe: string.Empty Vs "" Pin
Jamal Mavadat27-Jun-08 5:34
Jamal Mavadat27-Jun-08 5:34 
Questionscalar variable Pin
j_tush26-Jun-08 23:52
j_tush26-Jun-08 23:52 
Hi I'm suffering with following error "Must declare the scalar variable "@name_txtbx". " here is my code

public void Bindgrid()
{
try
{
dt.Clear();
string query = "Select * From consumer where name_con like ' + txtbx_name.Text + %' AND ward_no = " + txtbx_ward.Text + "";
query = "select * from consumer where name_con = '" + txtbx_name.Text + "' And name_con_father = '" + txtbx_con_father.Text + "' And ward_no = " + txtbx_ward.Text + " ";
con.ConnectionString = constr;
cmd.Parameters.AddWithValue("@name_txtbx", txtbx_name.Text);
cmd.Parameters.AddWithValue("@ward_txtbx", txtbx_ward.Text);
cmd.Parameters.AddWithValue("@fname_txtbx", txtbx_con_father.Text);



cmd.CommandText = "select * from consumer where name_con like % @name_txtbx %OR name_con_father like % @fname_txtbx % Or ward_no like % @ward_txtbx ";


query = "select * from consumer where name_con = @name_txtbx %OR name_con_father like % @fname_txtbx % Or ward_no like % @ward_txtbx ";

SqlDataAdapter da = new SqlDataAdapter(query, constr);
da.Fill(dt);
gv_search.DataSource = dt;
gv_search.DataBind();

}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}


please help me out, I'm new in programming field
thanks
AnswerRe: scalar variable Pin
Christian Graus27-Jun-08 0:25
protectorChristian Graus27-Jun-08 0:25 
QuestionNeed help with an regular expression Pin
Paw Jershauge26-Jun-08 23:43
Paw Jershauge26-Jun-08 23:43 
AnswerRe: Need help with an regular expression Pin
Vimalsoft(Pty) Ltd27-Jun-08 0:59
professionalVimalsoft(Pty) Ltd27-Jun-08 0:59 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:07
Paw Jershauge27-Jun-08 1:07 
AnswerRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:58
Paw Jershauge27-Jun-08 1:58 
AnswerRe: Need help with an regular expression Pin
User 665827-Jun-08 4:19
User 665827-Jun-08 4:19 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge28-Jun-08 3:22
Paw Jershauge28-Jun-08 3:22 
GeneralRe: Need help with an regular expression Pin
User 665828-Jun-08 3:31
User 665828-Jun-08 3:31 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge30-Jun-08 8:47
Paw Jershauge30-Jun-08 8:47 
Questionarray string using dynamically Pin
maruthi26-Jun-08 23:24
maruthi26-Jun-08 23:24 
AnswerRe: array string using dynamically Pin
Guffa26-Jun-08 23:36
Guffa26-Jun-08 23:36 
GeneralRe: array string using dynamically Pin
maruthi26-Jun-08 23:56
maruthi26-Jun-08 23:56 
AnswerRe: array string using dynamically Pin
dan!sh 26-Jun-08 23:38
professional dan!sh 26-Jun-08 23:38 
QuestionAsynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h26-Jun-08 23:23
N a v a n e e t h26-Jun-08 23:23 
AnswerRe: Asynchronous processing - More number of processes are not running parallel Pin
leppie27-Jun-08 3:43
leppie27-Jun-08 3:43 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h27-Jun-08 20:38
N a v a n e e t h27-Jun-08 20:38 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
leppie27-Jun-08 23:56
leppie27-Jun-08 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.