3
Answers

Sql Query Editor Text problem

Kiran Karale

Kiran Karale

13y
2.1k
1
Hi,
I have a problem in Application

Now in  My Application  have a TextBox1 in this Text Box Pass a connection String
&  Second TextBox2 is Multiline TextBoxt in this TextBox  To Write A SqlQuery .
& one Submit  Button  if u click in submit button then Result show in a label  like(Command is Executed Succesfully or Any Error Message)


Please help me..
Answers (3)
0
Shirsendu Nandi

Shirsendu Nandi

NA 10.1k 3.6m 13y
See your coding will look like
Sqlconnection con=new SqlConnection(txtbox1.text);
con.open();
Sqlcommand cmd=new SqlCommand(txtbox2.text.con);
cmd.ExecuteNonquery();
con.close();
Accepted
0
Shirsendu Nandi

Shirsendu Nandi

NA 10.1k 3.6m 13y
thxx kiran..
0
Abhimanyu K Vatsa

Abhimanyu K Vatsa

NA 50.9k 12.4m 13y
the way you wish here is not good. first decide you are developing app for your use or for another users because you always need to type correct sql query in text box that will be very difficult. to develop such thing is very easy, but tougph for another users. like how they know the tabel and fields name. do one thing provide the user some control for selections. 

thanks