i want 2 pass values(enterd in textbox)to table in sql
server without using stored procedure in c#.plz tell me
code with an example.
Answer Posted / michael and tubax
sqlconnection con=new sqlconnection
("server=servername;datasource=databasename;uid=sa;pwd=passw
ord);
con.open();
sqlcommand cmd=new sqlcommand("insert into tblname values
('"+txtname.text+"','"+txtage.text+"'",con);
cmd.executnonquery();
con.close();
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is the default provider in ado.net?
What is difference between connected and disconnected architecture in ado.net?
How would you connect to database using .NET?
What is connection string?
Which is faster ado.net or linq?
Which is better ole db or odbc?
What are the benefits of using ado.net?
What connected data?
What are good ado.net object to replace to ado recordset object.
What is sql command in ado net?
What are the essential features of ado.net?
What is executenonquery ado.net?
Explain the various objects in dataset.
What is acid in ado.net?
Explain how to create dynamic gridview?