can we see the entire sql statement you are using. What version of 4D?

Lastly, If you can I have always found it easier to go from 4D to sql
server. If you are on PC you already have odbc on PC if on mac you
would have to buy odbc driver for sql server. I always use the one
from actual technologies

Regards

Chuck

On Thu, Oct 3, 2019 at 12:56 PM Paul Jones via 4D_Tech
<4d_tech@lists.4d.com> wrote:
>
> 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:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************



-- 
-----------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
       Providers of 4D, Sybase & SQL Server connectivity
          https://www.informed-solutions.com
-----------------------------------------------------------------------------------------
This message and any attached documents contain information which may
be confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution,
disclosure, printing, copying, storage, modification or the taking of
any action in reliance upon this transmission is strictly prohibited.
Delivery of this message to any person other than the intended
recipient shall not compromise or waive such confidentiality,
privilege or exemption from disclosure as to this communication.
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to