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 use of ADO.NET and XML web services?
Can datareader hold data from multiple tables?
Define isolation?
How to pass multiple tables in datasets simultaneously?
How do you update database through dataset?
Explain advantages of ado.net?
Is ado.net an orm?
What are the Data providers in ADO.Net?
What is ole in vb?
Do you use stored procedure in ado.net?
What is the difference between a datareader and a dataset?
What is a data control clerk?
Define ado.net?
Is bulk insert faster than insert?
What is ado.net architecture?