We pull data from 4D into MS SQL using the 4D ODBC Driver.  On occasion, we 
have a problem with some Alpha fields where only the first 2 characters are 
pulled into SQL.

In MS SQL,  the associated field has been configure to use varchar(255) {or 
whatever the field length is for the 4D field}

I've tried several different ways to pull the data and I've found the following:
If I only query for records where the field contains data {not like ""}, the 
field doesn't get truncated.  If I try to select all records,  the truncation 
occurs.

I have a very inefficient workaround which is to pull the truncated fields one 
at a time into a temporary table and then update the record in the original 
table.  While that works,  if I have to do that for every Alpha field,  the 
process takes way to long.

Here is an example of what gets returned without filtering for blank records:

"wh
________________________________
  "
"no
________________________________
  ?                                                                             
                                                                                
                                                                                
        "
"wh
________________________________
  "


  *   Note the 2nd records appears to contain a length of 257 characters when 
in fact the field is only 10 characters.

The correct field values that should be returned are:
"wholesale"
"non_exempt"
"wholesale"


Just wondering if anyone has worked with pulling data from 4D into MSSQL and if 
have had this same issue and have found a solution to the problem.


Paul Jones


_____________________________________
Please consider the environment before printing
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to