The first change simply involved adding a new record to TypeMap.DBF, the table containing the type mappings. Set LocalType to "M" (for Memo), FullLocal to "memo", RemoteType to "varchar(max)", and Server to "SQL Server". Leave the logical fields as .F., especially VarLength, which determines whether the user is prompted for a field length.
The second was a little more work. First, BulkXMLLoad.PRG needs a change to support this because it used a hard-coded value. Change the statement setting ltBlank to:
ltBlank = iif(vartype(ttBlank) $ 'TD', ttBlank, SQL_SERVER_EMPTY_DATE_Y2K)and add the following statement after the LOCAL statement:
#include Include\AllDefs.HSecond, JimExport (interesting method name!) in WizUsz.PRG also used a hard-coded value, so change the assignment to lcEmptyDateValue in the first CASE statement to:
lcEmptyDateValue = "IIF(EMPTY(" + ALLT(lcCursorName)+'.'+ALLT(aTblFields[ii,1])+ "), " + ;Finally, to change the actual date, change these two constants in AllDefs.H to the desired values:
transform(This.BlankDateValue) + ","
#DEFINE SQL_SERVER_EMPTY_DATE_Y2K {^1900-01-01}Rebuild UpsizingWizard.APP and you're ready to go.
#DEFINE SQL_SERVER_EMPTY_DATE_CHAR "01/01/1900"
The top of the JimExport method says:
ReplyDelete*Thanks Jim Lewallen for this code (or the important and bug-free parts of it anyway)
Google Groups turns up a few messages from him in the 92-96 time frame, and he evidently had some expertise in client/server. I couldn't find much since, but he is immortalized forever in code!