how save recoreed in the database
Answers were Sorted based on User's Feedback
Answer / ajrun
Dim Query
Query="insert into TableName(username)values('" &
txt_username.text & "')"
Dim cmd as sqlclient.sqlcommand=new
sqlclient.sqlcommand(Query,connection)
cmd.ExecuteNonquery()
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vishnu
System.Data.SqlClient.SqlConnection sqlConnection1 =
new System.Data.SqlClient.SqlConnection("YOUR CONNECTION
STRING");
System.Data.SqlClient.SqlCommand cmd = new
System.Data.SqlClient.SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
cmd.CommandText = "INSERT Region (RegionID,
RegionDescription) VALUES (5, 'NorthWestern')";
cmd.Connection = sqlConnection1;
sqlConnection1.Open();
cmd.ExecuteNonQuery();
sqlConnection1.Close();
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / venky
string cns=@"server=.\SQLEXPRESS;Database=emp;Integrated Security=SSPI";
cn=new SqlConnection(cns);
string sql = "select * from mytable";
DataSet ds = new DataSet();
SqlDataAdapter adpt=new SqlDataAdapter(sql,cn);
adpt.Fill(ds,"emp1");
.....after altering table....
sqlcommandbuilder cbdr=new sqlcommandbuilder(adpt);
adpt.Update(ds,"emp1");
your changes automaically save into databases...
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / y.gangi reddy
SqlConnection cn = new SqlConnection("user id=sa;pwd=xxx;database=yyy;data source=.");
SqlDataAdapter da = new SqlDataAdapter("select * from tablename", cn);
DataSet ds = new DataSet();
da.Fill(ds, "tablename");
| Is This Answer Correct ? | 1 Yes | 2 No |
Suppose I am implementing one windows form. I am inserting some values into ms access. In that table 5 columns there. But I want to insert three columns only. When I am clicking another button then other two values also insert into that table?
How many nuber of controls are there in form?
write a program to create login form
What is formdata?
Explain about crystal report in brief?
how print PGL by XML
0 Answers Bank Of America, Wipro,
List out controls which does not have events?
Explain the difference between listindex and tab index?
What are the forms of database?
which Property is used to count no. of items in a combobox?
What are ACID properties of a transaction in DBMS (Database Management System)?
What is datagrid?