Best blogging tips and web technology tips in varun's blog


Software programming tips and tricks
Oneof my readers mailed me to solve his problemActually he is working for a software firm in Chennai,India.There in their project,there was a module to create a database connection,create a database,and create a table....These are much complicated in a sense.Tell you..the actual value of each database should not be static.Done ..he send me a mail to solve this.Ok where ever you are please check my blogMr.Anand kumarIt will help you i am sure....------------------------------------------------------------------------------------First of all we must addnamespaceson our programA complete general notes on basics of .net will present you later ok?using;Thenadd thisstring source = (@"Data Source=.;Initial Catalog=*yourdatabasename*;Integrated Security=True");string insert = ("insert into tbl_soft values('" + textBox1.Text + "','" + textBox2.Text + "')");SqlConnection cnn = new SqlConnection(source);cnn.Open();SqlCommand cmd = new SqlCommand(insert,cnn);cmd.ExecuteNonQuery();MessageBox.Show("files added successfully");here i've used certain controls to give the values in database rathersql server.Those aretextboxes.Once it generates the values ,it will add itself asMainandSubTables.

0 Reactions: