Click here to Skip to main content
15,897,226 members

Comments by houssem eddine ayari (Top 16 by date)

houssem eddine ayari 27-Jul-22 6:05am View    
i've tried before this and my problem still persist
houssem eddine ayari 27-Jul-22 3:31am View    
This is my code to insert in the database from datagridview :
SqlCommand cc = new SqlCommand("INSERT INTO [dbo].[C9_V] ([C9],[V],[OID],[USERMODIF]) VALUES ('" + dataGridView1.Rows[i].Cells[0].Value + "', '" + dataGridView1.Rows[i].Cells[1].Value + "', '" + textBox1f2.Text + "', '" + user + "')", conn);
cc.ExecuteNonQuery();
houssem eddine ayari 15-Nov-21 10:15am View    
I did the same thing but the problem continues. Error: "Unable to open data file 'C: \ Users \ Nemos \ Desktop \ H\ T\ Contrats_INC_202110_VD.csv"."
If the files doesnt exist i added delay validation and still not working
houssem eddine ayari 5-Feb-21 4:40am View    
this is my connectionstring before encryption :
<connectionstrings>
<add name="AffecAnalytiqueConnectionString"
="" connectionstring="Data Source=***1;Initial Catalog=***2;Persist Security Info=True;User ID=***3;Password=***4" providername="System.Data.SqlClient">

and this is how i call it in my forms :
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["AffecAnalytiqueConnectionString"].ConnectionString);
houssem eddine ayari 28-Jan-21 7:24am View    
@RickZeeland thanks