Click here to Skip to main content
15,905,616 members

Comments by Venkatachalam Vijayakumar (Top 7 by date)

Venkatachalam Vijayakumar 27-Jan-17 4:15am View    
Hi thanks your response,
I already created sql table name tax fixation, fields are tax id, tax type, and amount
Now include member type.
How can I include member type and how can i assign multiple values.
Venkatachalam Vijayakumar 11-Jan-17 5:25am View    
Database 'C:\PROGRAM FILES\DEFAULT COMPANY NAME\TTCS SETUP\TTCSSQL.MDF' cannot be
upgraded because it is read-only, has read-only files or the user does not have
permissions to modify some of the files. Make the database or files writable,
and rerun recovery.
An attempt to attach an auto-named database for the C:\Program Files\Default
Company Name\TTCS Setup\TTCSSQL.mdf failed. A database with the same
name exists, or specified file cannot be opened, or it is located on UNC share.
Venkatachalam Vijayakumar 21-Dec-16 8:22am View    
Hi thanks your response. i did not used any store procedure and xml files is my project work client system? i am used Microsoft sql server 2008. where i collect sql 2008 developer version.
Venkatachalam Vijayakumar 12-Dec-16 20:31pm View    
Hi thanks your reply. i need clear idea i did not used any store procedure, is possible without store procedure sql work client system.
Venkatachalam Vijayakumar 6-Dec-16 9:52am View    
private void button1_Click(object sender, EventArgs e)
{

string con = System.Configuration.ConfigurationManager.ConnectionStrings["TTCS"].ConnectionString;
using (SqlConnection conn = new SqlConnection(con))
{
SqlDataAdapter da = new SqlDataAdapter();

if (textBox2.Text == "")
{
MessageBox.Show("Enter the Tax Type", "TTCS", MessageBoxButtons.OK);
textBox2.Focus();
return;


}

da.InsertCommand = new SqlCommand("INSERT INTO Taxfixation VALUES (@Taxtype, @Amount, @Startdate, @Enddate)", conn);

da.InsertCommand.Parameters.Add("@Taxtype", SqlDbType.NVarChar).Value = textBox2.Text;
da.InsertCommand.Parameters.Add("@Amount", SqlDbType.NVarChar).Value = textBox3.Text;
da.InsertCommand.Parameters.Add("@Startdate", SqlDbType.Date).Value = dateTimePicker1.Text;
da.InsertCommand.Parameters.Add("@Enddate", SqlDbType.Date).Value = dateTimePicker2.Text;


MessageBox.Show("Tax Fixation Created");
textBox2.Text = "";
textBox3.Text = "";
dateTimePicker1.Text = "";
dateTimePicker2.Text = "";
textBox2.Focus();

conn.Open();

da.InsertCommand.ExecuteNonQuery();
conn.Close();
}
}