I have an application (C#) which accesses data from .dbf files and populates a SQL database. This works by reading the contents of a SQL file for the query and executes this against the .dbf and populates a datatable, the contents are then inserted into the SQL database.
I have this working for various queries, apart from one:
SELECT
b.id as LegacyAppointsID,
b.perfdate as "Date",
starttime as "time",
b2.duration as duration,
b.staffid as LegacyEmployeeId,
b.clientid as LegacyClientId,
'' as Employee,''as Client,
b.serviceid as LegacyServiceId,
'' as "Service",
0 as IsTask,
b.note as "Notes"
from Book b
inner join Blocks b2 on b.id = b2.bookid
When this one runs i get the following error displayed when executing the query against the .dbf file:
System.Data.OleDb.OleDbException: File 'strzero.prg' does not exist.
Now, if I remove the join part of the query (and the referenced columns) then the query is executed and the datatable is populated correctly, without error. This is the only query that i have, which features a join to a second .dbf
The query is quite basic, so i am unsure as to what could be wrong with the join.
Is there a certain way that the join needs to be formatted?