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
How can we serialize the dataset object?
Explain the difference in record set and dataset?
What are the namespaces used in ado.net for data access?
What is the difference between Optimistic and Pessimistic locking?
Does sqlclient and oledb class share the same functionality?
What does executequery return?
What is the difference between executenonquery () and executescalar ()?
What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?
What are the major difference between classic ADO and ADO.NET?
Can we load multiple tables in a dataset?
Explain what are acid properties?
What are dataproviders?
What you mean by filtering of data?
Explain the difference between data reader and data adapter?
What is namespace in ado.net?