Howdy
I am trying to create a VB program, which directly links to a Timberline/Pervasive SQL2000 (SP2) DSN. I can make the connection without any problem.
I looked at the Pervasive SQL documentation prior to setting out on this project. It appeared to support a very workable SQL toolbox, so I began the application coding. It was much faster downloading the TL data into Access for the development stage. My plan was to simply change the Access syntax to Pervasive SQL syntax at the end, and point to the pervasive DSN.
I reached that point last week, and simply cannot get the first serious SQL statement to execute. I am using an ADODC connection object to load a DataGrid object. The ADODC RecordSource property is:
SELECT If(MJJ.project_manager is NOT null,MJJ.project_manager,ACC.project_manager) "ProjectManager",MAC.Name,If(BBI.Job_Address_1 is NOT null,BBI.Job_Address_1,MJJ.description) "JobName",If(AAS.contract is NOT null,AAS.contract,AAS.job) "JobNumber",(AAS.Due_Date+30) "Due_Date",AAS.Invoice,AAS.Status,AAS.Customer, If("textday"='Saturday',((AAS.Actual_Complete_Date + "DaysToAdd"-1),If("textday"='Sunday',((AAS.Actual_Complete_Date +"DaysToAdd"-2),'')) "LienDate",AAS.Outstanding_Amount,If(AAS.Retainage>0,0,AAS.Outstanding_Amount) "InvAmount",AAS.Retainage_Billed,If(AAS.Retainage_Billed>0,AAS.Outstanding_Amount,0) "Retainage",AAS.Status_Notes,MJJ.Actual_Complete_Date,MJJ.Work_State,If(MJJ.Work_State='WA',85,If(MJJ.Work_State='OR',70,0)) "DaysToAdd",If(MJJ.Actual_Complete_Date Is Not Null,(MJJ.Actual_Complete_Date+DaysToAdd),MJJ.Actual_Complete_Date) "NewDate",Weekday("NewDate" "TextDay FROM ACTIVITY_ARA_ACTIVITY AAA outer join ACTIVITY_ARA_ACTIVITY AAS ON (AAA.Invoice = AAS.Invoice) outer join MASTER_ARM_CUSTOMER MAC ON (AAS.Customer = MAC.Customer) left outer join MASTER_JCM_JOB_1 MJJ ON (AAS.Job = MJJ.Job) left outer join ACTIVE_CNC_CONTRACT ACC on (AAS.Contract = ACC.Contract) left outer join BILLED_BLI_INVOICE BBI ON (AAS.Invoice = BBI.Invoice) WHERE AAS.Status='unpaid'
Now, I am not asking anyone to troubleshoot this statement. I have been doing it, piece by piece. I can get some parts to work, but not others.
I went to Pervasive's web-site, and read; "With ....SP2a, and earlier, the provider only supported the iRowset interface and as such did not support SQL syntax."
Is this my problem, even though Pervasive documents the full SQL toolset?
I would appreciate any insight you may have.
Thanks
Steve
I am trying to create a VB program, which directly links to a Timberline/Pervasive SQL2000 (SP2) DSN. I can make the connection without any problem.
I looked at the Pervasive SQL documentation prior to setting out on this project. It appeared to support a very workable SQL toolbox, so I began the application coding. It was much faster downloading the TL data into Access for the development stage. My plan was to simply change the Access syntax to Pervasive SQL syntax at the end, and point to the pervasive DSN.
I reached that point last week, and simply cannot get the first serious SQL statement to execute. I am using an ADODC connection object to load a DataGrid object. The ADODC RecordSource property is:
SELECT If(MJJ.project_manager is NOT null,MJJ.project_manager,ACC.project_manager) "ProjectManager",MAC.Name,If(BBI.Job_Address_1 is NOT null,BBI.Job_Address_1,MJJ.description) "JobName",If(AAS.contract is NOT null,AAS.contract,AAS.job) "JobNumber",(AAS.Due_Date+30) "Due_Date",AAS.Invoice,AAS.Status,AAS.Customer, If("textday"='Saturday',((AAS.Actual_Complete_Date + "DaysToAdd"-1),If("textday"='Sunday',((AAS.Actual_Complete_Date +"DaysToAdd"-2),'')) "LienDate",AAS.Outstanding_Amount,If(AAS.Retainage>0,0,AAS.Outstanding_Amount) "InvAmount",AAS.Retainage_Billed,If(AAS.Retainage_Billed>0,AAS.Outstanding_Amount,0) "Retainage",AAS.Status_Notes,MJJ.Actual_Complete_Date,MJJ.Work_State,If(MJJ.Work_State='WA',85,If(MJJ.Work_State='OR',70,0)) "DaysToAdd",If(MJJ.Actual_Complete_Date Is Not Null,(MJJ.Actual_Complete_Date+DaysToAdd),MJJ.Actual_Complete_Date) "NewDate",Weekday("NewDate" "TextDay FROM ACTIVITY_ARA_ACTIVITY AAA outer join ACTIVITY_ARA_ACTIVITY AAS ON (AAA.Invoice = AAS.Invoice) outer join MASTER_ARM_CUSTOMER MAC ON (AAS.Customer = MAC.Customer) left outer join MASTER_JCM_JOB_1 MJJ ON (AAS.Job = MJJ.Job) left outer join ACTIVE_CNC_CONTRACT ACC on (AAS.Contract = ACC.Contract) left outer join BILLED_BLI_INVOICE BBI ON (AAS.Invoice = BBI.Invoice) WHERE AAS.Status='unpaid'
Now, I am not asking anyone to troubleshoot this statement. I have been doing it, piece by piece. I can get some parts to work, but not others.
I went to Pervasive's web-site, and read; "With ....SP2a, and earlier, the provider only supported the iRowset interface and as such did not support SQL syntax."
Is this my problem, even though Pervasive documents the full SQL toolset?
I would appreciate any insight you may have.
Thanks
Steve