|
To use EasySQL4Fox, you simply attach a EFoxSQL.FLL library (use 'Set Library to EFoxSQL.FLL Additive') and replace every SQL statement in your code with a call to its E_SQL_Select_Convert function or some other functions you may need. For example, if your MAIN program contains a logical variable named UsingSQL, and it is .True. for SQL access and .False. for DBF access, you can use this:
******************************************************
If UsingSQL
Cmd = E_SQL_Select_Convert(E_SQL_Find_Variables(OriginalSelectCmd))
IF SQLEXEC(connection_id, cmd, alias) <= 0
* Error message display here...
ENDIF
ELSE
Cmd = E_SQL_Remove_Directives(OriginalSelectCmd)
&Cmd
ENDIF
*******************************************************
Certainly, it is impossible to foresee all syntax problems which may occur when you switch from FoxPro to SQL Server. The problems solved by EasySQL4Fox are those we faced and those we could predict. Our experience of using EasySQL4Fox since 2002 proves that it is rather difficult to find a problem not solved by this library. Still, if there are any other SQL syntax problems you come across, let us know and we will include their solutions into new versions of EasySQL4Fox. Remember that it is users who make software better.
|