C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Save Dynamically


Posted Date: 06 Nov 2009      Posted By: sirisha      Member Level: Silver     Points: 1   Responses: 4



Hi All
I have a query. Is is possible to save data to access database from textboxes which are added dynamically to a form in vb.net windows application.





Responses

Author: Manick    06 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Yes. You can write an insert query after dynamic generation value in a textbox in textbox_valuechanged event handler.

Regards,
Manick



Author: sirisha    06 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Pls can u give some sample coding


Author: Manick    06 Nov 2009Member Level: GoldRating: 3 out of 53 out of 53 out of 5     Points: 3

private void txtBox1_TextChanged(object sender, System.EventArgs e)
{
string txt;
txt = textBox1.text;
cmd as SqlCommand;
cmd = "insert into table_name values('" + txt +"')";
cmd.ExecuteNonQuery();
txt.clear();
}

This is in C# with SQL server. Kindly change it according to Vb.net with access.

Regards,
Manick



Author: pradeep kumar reddy    06 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Yes. You can write an insert query after dynamic generation value in a textbox in textbox_valuechanged event handler.



private void txtBox1_TextChanged(object sender, System.EventArgs e)
{
string txt;
txt = textBox1.text;
cmd as SqlCommand;
cmd = "insert into table_name values('" + txt +"')";
cmd.ExecuteNonQuery();
txt.clear();
}


try this code
you can get it

all the best



Post Reply
You must Sign In to post a response.
Next : Diff B/w the Debug and Release folder
Previous : Stored procedure
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use