Click here to Skip to main content
16,012,352 members

Comments by Nowfer Rifkan (Top 17 by date)

Nowfer Rifkan 27-Nov-17 0:49am View    
it is independent of system's date format. if you want to make your own date when you run the application try this >>
dtpDate.Text = Convert.ToDateTime("22/11/2017").ToString();
Nowfer Rifkan 23-Aug-17 6:39am View    
dude,, change that values according to ur variable values,, date for date integer value for integer .. got?.. anyway the problem is in passing value .... i am replying while i am working on my project.. so hope u will find a solution,,,, if u cant let m e know i will reply u when i have time ,, good luck
Nowfer Rifkan 23-Aug-17 6:30am View    
it is a simple thing dude,, there should be a very small correction , without seeing it,,, we can only suggest... change the value according to ur variables (ex: string value, int valu) into that qutation and run the program it should save in the data base

try
{
using (SqlConnection conn = new SqlConnection(@"Data source = xxxx ; Database=xxxx; User Id=xxxx; Password=xxxx"))
{
conn.Open();
SqlCommand cmd = new SqlCommand("insert intoUXFaturas(TransDocument, TransSerial, TransDocNumber, Data, Estado) values('t', 't', 'tt', 'tt','tt')", conn);
cmd.ExecuteNonQuery();
conn.Close();
MessageBox.Show("inseriu");
}
}
catch (Exception ex)
{
throw ex;
}
Nowfer Rifkan 23-Aug-17 6:26am View    
u are keep running ur wrong code... just run the code i sent u....
Nowfer Rifkan 23-Aug-17 6:11am View    
put a breakpoint and run the program ... if u do not know how to put a break point and check please google it and find... so u can easily check that where u are stuck.... run the code which i sent u finally and see...