Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how save recoreed in the database

Answers were Sorted based on User's Feedback



how save recoreed in the database..

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

how save recoreed in the database..

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

how save recoreed in the database..

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

how save recoreed in the database..

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

Post New Answer

More Dot Net WindowsForms Interview Questions

What is a fillable form?

0 Answers  


What is the advantage of a form?

0 Answers  


How many navigational features are provided by visual studio.net ide?

0 Answers  


Explain the difference between listbox and combo box?

0 Answers  


how can u split a column header in gridview using C#.net

2 Answers   IBM,


what are container objects?

1 Answers  


What?s the difference between the System.Web.UI.WebControls.DataGrid and System.Windows.Forms.DataGrid?

1 Answers  


How to use the FindControl() function to preselect an item in my dropdownlist?

0 Answers  


What is the difference between desktop application and windows application?

0 Answers  


Which property of the progressbar control specifies the amount to increment the current value of the control?

0 Answers  


what is the Difference between listbox and combo box?

20 Answers   Alpha, Google,


If you are calling three SPs from a window application how do u check for the performance of the SPS ?

1 Answers   Accenture, BirlaSoft,


Categories