String ConnectionString2 = @"Data Source = hemsql02;Initial Catalog=OTITest;User ID=wgtest;Password=Testit$1";
SqlConnection conn = new SqlConnection(ConnectionString2);
con.Open();
String SqlSelectRecords = ("select g.[Year] ,g.[EffectiveDate],g.[Volume] ,g.[Currency] ,g.[RateType] ,g.[MinimumRate] ,i.[State], i.[Location], i.[IndexEffective], i.[Page], i.[PageDescription] FROM[MultiYearWageGuide]as g join[MultiYearWageIndex] as i ON g.Volume= i.Volume AND g.Page = i.Page AND g.LocCode = i.Location WHERE store= " + int.Parse(textBox2.Text));
SqlCommand cmd = new SqlCommand(SqlSelectRecords, con);
SqlDataReader sqldr = cmd.ExecuteReader();
if (sqldr.Read())
{
dataGridView1.Rows.Add(YearVal, EffDateVal, VolumeVal, CurrVal, RateTypeVal, MinRateVal);
What I have tried:
I have tried everything but dont know enough C# to do this