KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Always check SQL syntax against the SQL Server you are connecting to
PRODUCT: 4D SQL | VERSION: 12.1 | PLATFORM: Mac & Win
Published On: April 29, 2011

When connecting to external databases from 4D using SQL LOGIN, if an error occurs during the execution of the SQL statement, it is important to understand that the error may be coming from the external database:

  • If you are connecting to MS SQL Server you must make sure that the syntax of the SQL statement is valid for the version of MS SQL Server that you are connecting to.The documentation for MS SQL Server can be found here.


  • If you are connecting to Oracle database you must make sure that the syntax of the SQL statement is valid for the version of Oracle that you are connecting to. The documentation for Oracle can be found here.


  • If you are connecting to mySQL database you must make sure that the syntax of the SQL statement is valid for the version of mySQL that you are connecting to. The documentation for mySQL can be found here.


  • If you are connecting to PostgreSQL database you must make sure that the syntax of the SQL statement is valid for the version of PostgreSQL that you are connecting to. The documentation for PostgreSQL can be found here.

In other words; just because a SQL statement is valid in 4D, it does not mean the same SQL statement is valid in an external database. The opposite of this is also true; if you are connecting from an external application to 4D, it is important to understand whether or not the statement is actually valid inside of 4D.

If possible you should execute the SQL statement directly from within the native client application of the external database you are connecting to in order to make sure the statement is valid.

Checking the documentation for the specific server software that you are attempting to connect to is also a very good idea as 4D's documentation is not intended to cover the syntax or commands of other database vendors.

See Also: