ho due dataset il cui contenuto va unito, ho pensato di usare il merge, visot che i dati sono simili, ma non riesco ad impostarlo...
codice:
bool ret2 = false;
ret2 = clsFunctions.LoadDataSetFromSqlStatement(Cnnstr, "SELECT kiave1 FROM amicizie WHERE (amicizie.kiave2 = '" + userP + "')", "PROVA2", ref DSetR, true);
bool ret3 = false;
ret3 = clsFunctions.LoadDataSetFromSqlStatement(Cnnstr, "SELECT kiave2 FROM amicizie WHERE (amicizie.kiave1 = '" + userP + "')", "PROVA2", ref DSetR2, true);
if (ret2 == true)
{
if (ret3 == true)
{
if (DSetR2.Tables["PROVA2"].Rows.Count > 0)
{
DSetR2.Tables["PROVA2"].Rows[0]["kiave2"].ToString();
DSetR.Merge(DSetR2, true);
}
}
è la sintassi sbagliata?