>>SELECT * FROM billing WHERE inv_date = ?({^2017-01-31}) >>>>
#DEFINE MSSQL_DB .F. #DEFINE MYSQL_DB .T. LOCAL BackEnd AS String LOCAL DataManager m.BackEnd = "" IF MSSQL_DB m.BackEnd = "MSSQL" ELSE IF MYSQL_DB m.BackEnd = "MySQL" ENDIF ENDIF m.DataManager = CREATEOBJECT(m.BackEnd + "DataManager") ? m.DataManager.GetServerDateTime() DEFINE CLASS DataManager AS Custom ConnectionHandle = 0 FUNCTION GetServerDateTime RETURN DATETIME() ENDFUNC FUNCTION ExecuteServerCommand (Statement AS String, OutputCursor AS String) LOCAL CurrentWorkArea AS Integer m.CurrentWorkArea = SELECT() SQLEXEC(This.ConnectionHandle, m.Statement, m.OutputCursor) SELECT(m.CurrentWorkArea) ENDFUNC ENDDEFINE DEFINE CLASS SQLDataManager AS DataManager ConnectionHandle = SQLCONNECT() PROCEDURE Destroy IF This.ConnectionHandle != -1 SQLDISCONNECT(This.ConnectionHandle) ENDIF ENDPROC ENDDEFINE DEFINE CLASS MSSQLDataManager AS SQLDataManager FUNCTION GetServerDateTime This.ExecuteServerCommand("SELECT GETDATE() AS ServerDateTime", "trash") RETURN trash.ServerDateTime ENDFUNC ENDDEFINE DEFINE CLASS MySQLDataManager AS SQLDataManager FUNCTION GetServerDateTime This.ExecuteServerCommand("SELECT NOW() AS ServerDateTime", "trash") RETURN trash.ServerDateTime ENDFUNC ENDDEFINEThe application does not have to worry about which data back-end is being used. Once the data manager is instantiated, calling the data manager object may be safely unaware of which server is actually being used. In the case of the VFP data object, this wouldn't even require a SQL statement.