05-15-2018 02:46 PM
I'm using the Database connectivity toolkit to store [Widget Data] in a relational database on my network server.
Unfortunately, the network speed is very slow during peak hours so, I'd like to create a read-only copy of the main database on my local computers in (similar the answer to this question on SO ) and update it periodically when my system is not in use.
Trying my best to implement their solution I have the following:
However, I'm getting a syntax error for an incomplete query clause. How can I fix this?
05-16-2018 06:36 AM
Looking at your expressions... and the SQL tutorial site https://www.w3schools.com/sql/sql_update.asp
It would seem that you have not used a complete SQL expression.
SQL UPDATE:
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
SQL INNER JOIN:
SELECT column_name(s)
FROM table1
INNER JOIN table2 ON table1.column_name = table2.column_name;
I would suspect that you would need syntax something like
UPDATE table_name
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
(But wouldn't know for certain without playing to get rid of the expression errors)
Hope this helps
James
05-16-2018 12:21 PM - edited 05-16-2018 12:24 PM
I think it has something to do with my paths. Right now I've simplified my Execute to
SELECT * FROM C:\Database File\LocalDbname.MyTable as LT RIGHT JOIN \\Server\Database File\GlobalDbname.MyTable as OT ON LT.Col1 = OT.Col1
I've confirmed that
SELECT * FROM MyTable as LT RIGHT JOIN MyTable as OT ON LT.Col1 = OT.Col1
Works
That means my problem is selecting the file paths from the two different databases. I know that the file path:
C:\Database File\LocalDbname.mdb
has a few spaces in it. Is there something I need to do to deal with that?
05-17-2018 08:05 AM
If you use an ODBC database connection, with a database driver, then you can bin the paths and just use the database name.
Have you tried just using the database name instead?
It does look like a path issue - you probably have illegal chars in there.
James