public void GetDiagnosisList()
 {
 // Connection string to 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 FROM tblLUDiagnosis" +
// " INNER JOIN tblPatientEpisode ON tblLUDiagnosis.strDiagnosisCode = tblPatientEpisode.strPrimaryDiagnosis" +
// " WHERE tblPatientEpisode.intHospitalID =" + intHospitalID;
 string SQLGet = "SELECT TOP 15 tblLUDiagnosis.strDiagnosisCode, tblLUDiagnosis.strDiagnosisDesc FROM 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 was the
TrackingOnWithIndexes...can't use that and join statements...Thanks
 
No comments:
Post a Comment