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 is better ole db or odbc?
What is the difference between linq and ado.net?
What are the 3 major types of connection objects in ado.net?
Define ado.net?
What is the hierarchy of data in databases?
How can we check that some changes have been made to dataset since it was loaded?
What is the meaning of object pooling?
What is defaultview in datatable?
How can we save all data from dataset?
Can you explain how to enable and disable connection pooling?
What are the Features of a dataset
What is the executescalar method?
How to store data in memory?
What is connection in ado.net?
Is entity framework better than ado.net?