>I'm currently using VFP database, but would like to convert to SQL server soon. I do a lot of coding using the VFP SQL statements. Will I need to change these VFP SQL statements to be useable for SQL server database? How should I code database access now in VFP using VFP databases so that when I am ready to convert, not much code change is needed?
In addition to what others have told you, SQLServer does not have the concept of an empty datetime -
{}
. The closest is NULL, but then you can't test for
EMPTY(datetimefield)
- you'll have to go with
ISNULL()
.
Also, you don't just make the query in VFP; you have to put your query in a string, then send that string to SQLServer using the
SQLExec()
function. And obviously, you can no longer use VFP's functions or a user-defined function (UDF) in the queries, since SQLServer won't know what to do with those.
Sylvain Demers