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
Which control of the BindingNavigator returns the current position within the data source?
Define data access layer?
What is ole used for?
Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?
how can implement dropdownlist in particular of dataset when try to update?
What are the several execute methods of ado.net?
What are the key events of sqlconnection class?
What is two way data binding android?
What is the full form of ado.net?
What is connection in ado.net?
Which components of a data provider is used to retrieve, insert, delete, or modify data in a data source?
Explain what are the steps to connect to a database?
Does sqlclient and oledb class share the same functionality?
What is ado full form?
What is Data Provider?