Haven't run into a problem with CAST(), but I'll add CONVERT() to my notes
for further review. 

Thanks!

Paul H. Tarver
Tarver Program Consultants, Inc.


-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Kevin J
Cully
Sent: Wednesday, November 07, 2018 2:24 PM
To: [email protected]
Subject: RE: SPT and Remote Views

I was looking for an old blog post but I couldn't find it.  At times there
may be a problem with the ODBC connection and using CAST(), especially with
VARCHAR(max).  If you ever experience problem using CAST() and accessing a
field of type VARCHAR(max), take a look at CONVERT().  This will work with
VFP ( and Xojo! ) to access these fields where CAST() fails.

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Paul H. Tarver
Sent: Wednesday, November 07, 2018 3:14 PM
To: [email protected]
Subject: RE: SPT and Remote Views

+1

Paul H. Tarver
Tarver Program Consultants, Inc.

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of
Charlie-gm
Sent: Tuesday, November 06, 2018 2:46 PM
To: [email protected]
Subject: Re: SPT and Remote Views


Just a quick FYI.

If using SQL Pass-through, don't forget you have the "CAST()" syntax
available (you can convert dates to strings, set a size of the character
length, etc). I've used it frequently to ensure a "proper" (expected) VFP
data type output result.

-Charlie

On 11/6/2018 12:08 PM, Chris Davis wrote:
> Not really, I can issue the query once and I get C(10) and again and I 
> get
M(10) with the whole value in it.
>
> It seems to be an issue with the Filemaker ODBC driver, they suggested 
> VFP
does ODBC v1? And their driver only supports ODBC v2?
>
> Whatever the issue is, Remote Views seem to get around it.  I would 
> just
like to be able to get around it using SPT.
>
> -----Original Message-----
> From: ProfoxTech <[email protected]> On Behalf Of Ted Roche
> Sent: Tuesday, 06 November 2018 16:53
> To: [email protected]
> Subject: Re: SPT and Remote Views
>
> Remote views, as you've indicated, let you specify the target 
> structure of
the query.
>
> When you execute direct SPT Fox attempts to get the first record 
> matching
the query, and uses the structure of that result as the (fixed column)
structure of the result set. So, if you have a varying-length string
> (varchar) and the first result is 3 characters, VFP might create a 
> C(3)
field, which could truncate everything else. Does that describe what you are
seeing?
>
>
>
> On Tue, Nov 6, 2018 at 10:54 AM Chris Davis <[email protected]>
wrote:
>
>> Hi All
>>
>> What extra happens when using Remove Views over SPT?
>>
>> Using the same ODBC conneciton to a Filemaker database if I do 
>> "select
>> * from ...." I get mixed results for the text strings.
>>
>> If I perform the same query via a remote view I get the same mixed
result.
>>
>> But if I go one step further with the Remote View and specifc 
>> properties of the fields it manages to pull complete information out 
>> of
filemaker.
>>
>> So what extra is Remote View managing to ask of the Filemaker ODBC 
>> driver to make it behave?
>>
>> Any ideas?
>>
>> Regards
>>
>> Chris.
>>
>>
>>
>> --- StripMime Report -- processed MIME parts --- multipart/alternative
>>    text/plain (text body -- kept)
>>    text/html
>> ---
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to