RDA.Pull and INNER JOINS...
when calling method below, if use sql in red, pull method populates data correctly. but, if use sql in green, i errror message. have set breakpoints , un sql returned sql statement green, , returns records. gives? joins not allowed?
public void getdiagnosislist()
{
// connection string sql server 2000
string rdaoledbconnectstring = "provider=sqloledb; data source=workpc;initial" +
" catalog=database;user id=username;password=password";
// string sqlget = "select tblludiagnosis.strdiagnosiscode, tblludiagnosis.strdiagnosisdesc tblludiagnosis" +
// " inner join tblpatientepisode on tblludiagnosis.strdiagnosiscode = tblpatientepisode.strprimarydiagnosis" +
// " tblpatientepisode.inthospitalid =" + inthospitalid;
string sqlget = "select top 15 tblludiagnosis.strdiagnosiscode, tblludiagnosis.strdiagnosisdesc tblludiagnosis";
sqlceremotedataaccess rda = new sqlceremotedataaccess();
try
{
rda.interneturl = "http://workpc/sqlce/sscesa20.dll";
rda.localconnectionstring = "provider=microsoft.sqlserver.oledb.ce.2.0;" + conn_string;
rda.pull("tblludiagnosis",sqlget,rdaoledbconnectstring, rdatrackoption.trackingonwithindexes, "errortable");
messagebox.show("diagnosis synchronized");
}
catch(exception ex)
{
messagebox.show(ex.message);
}
}
public void getdiagnosislist()
{
// connection string sql server 2000
string rdaoledbconnectstring = "provider=sqloledb; data source=workpc;initial" +
" catalog=database;user id=username;password=password";
// string sqlget = "select tblludiagnosis.strdiagnosiscode, tblludiagnosis.strdiagnosisdesc tblludiagnosis" +
// " inner join tblpatientepisode on tblludiagnosis.strdiagnosiscode = tblpatientepisode.strprimarydiagnosis" +
// " tblpatientepisode.inthospitalid =" + inthospitalid;
string sqlget = "select top 15 tblludiagnosis.strdiagnosiscode, tblludiagnosis.strdiagnosisdesc tblludiagnosis";
sqlceremotedataaccess rda = new sqlceremotedataaccess();
try
{
rda.interneturl = "http://workpc/sqlce/sscesa20.dll";
rda.localconnectionstring = "provider=microsoft.sqlserver.oledb.ce.2.0;" + conn_string;
rda.pull("tblludiagnosis",sqlget,rdaoledbconnectstring, rdatrackoption.trackingonwithindexes, "errortable");
messagebox.show("diagnosis synchronized");
}
catch(exception ex)
{
messagebox.show(ex.message);
}
}
nevermind, got it...it
trackingonwithindexes...can't use , join statements...thanks
trackingonwithindexes...can't use , join statements...thanks
SQL Server > SQL Server Compact
Comments
Post a Comment