SqlConnection conn = new SqlConnection("Data Source=*****;Initial Catalog=****;User ID=sa;Password=****"); conn.Open(); SqlCommand PaymentCommand = new SqlCommand("Select i1.job__inl as 'job__inl',i1.kla__ref as 'kla__ref',k1.cdeklaap as 'cdeklaap',i1.bkj__ref as 'bkj__ref',i1.munt_ref as 'munt_ref',v1.vdok__nr as 'vdok__nr',v1.dgbk_ref as 'dgbk_ref' from hafgfk__ i1 INNER JOIN vkpdok__ v1 on i1.fak__ref=v1.fak__ref INNER JOIN klabas__ k1 on i1.kla__ref=k1.kla__ref where i1.fak__ref='@fak__ref'", conn); PaymentCommand.Parameters.AddWithValue("@fak__ref", invid); using (SqlDataReader reader = PaymentCommand.ExecuteReader()) { if (reader.Read()) { JobInl = reader["job__inl"].ToString(); KlaRef = reader["kla__ref"].ToString(); Cdeklaap = reader["cdeklaap"].ToString(); BkjRef = reader["bkj__ref"].ToString(); MuntRef = reader["munt_ref"].ToString(); VdokNr = reader["vdok__nr"].ToString(); DgbkRef = reader["dgbk_ref"].ToString(); } } conn.Close();
... where i1.fak__ref='@fak__ref'
i1.fak__ref
@fak__ref
... where i1.fak__ref=@fak__ref
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)