SQL statements are limited by the SQL definitions held at the end of the
dictionary item.  These fields contain both a type and a length.  SQL
standard requires that these be strongly applied so data that is
acceptable to U2 will give a data type error if the wrong SQL type is used
and the field will be truncated to the maximum length defined.

Rich Taylor | Senior Programmer/Analyst| VERTIS
250 W. Pratt Street | Baltimore, MD 21201
P 410.361.8688 | F 410.528.0319 
[EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.

"The more they complicate the plumbing
  the easier it is to stop up the drain"

- Montgomery Scott NCC-1701


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rod Hills
Sent: Friday, December 03, 2004 11:47 AM
To: [EMAIL PROTECTED]
Subject: [U2] uvodbc truncating field

I've wrote a small program to return a record set of part numbers and
part descriptions.
Then I wrote a data query under MS Excel and ran the SQL process as
follows-
{ CALL "TALKTOME" (19) }

I get 2 columns returned, the first being the part numbers, but for some
reason the part
descriptions are being chopped at 8 characters.

Here is the subroutine-
0001 SUBROUTINE TALKTOME(CPN)
0002 OPEN "ITMMST" TO IM ELSE GOTO 99
0003 EXECUTE "SELECT ITMMST = '":CPN:"]'"
0004 MOREDATA=1
0005 DARRAY=""
0006 LOOP
0007  READNEXT ITMKEY ELSE MOREDATA=0
0008 WHILE MOREDATA
0009  READ IM.REC FROM IM,ITMKEY ELSE GOTO 99
0010  PNBR=IM.REC<1>
0011  DESC=IM.REC<2>
0012  IF DARRAY <> "" THEN DARRAY := @FM
0013  DARRAY := PNBR:@TM:DESC
0014 REPEAT
0015 SELECTN DARRAY TO 9
0016 ST=SQLExecDirect(@HSTMT, "SELECT F1,F2 FROM @TMP SLIST 9 ORDER BY
1")
0017 RETURN
0018 99:
0019 PRINT "ERROR IN OPEN OR READ FOR ITMMST"
0020 RETURN
0021 END

I am using the technique described in the UCI documentation for Universe
10.0.16. It is
discussed in chapter 6.

Anyone have any ideas what would cause this?

Thanks in advance

-- Rod Hills
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to