Hi Frank:
You're close. The report does have the view in the data environment
(actually, one view and one table that are joined via an index in the
table).
The table upon which the view is based was changed.
Running the report generates the error mentioned below.
Opening the view in the IDE, however, WORKS.
I just tried VALIDATE DATABASE RECOVER. No errors were reported.
However, the report still fails.
Any other thoughts? I'm grasping at straws here!
Jon
----- Original Message -----
From: Frank Cazabon
To: [email protected]
Sent: Friday, January 14, 2011 12:40 PM
Subject: Re: Problem with VFP6 View that has stopped working
Let's see if I understand properly:
You have a report with a view in its data environment (or opened before
the report is called).
You modified the table(s) that the view is based on.
When you open the view you get the error:
"Base table fields have been changed and no longer match view
fields. View field properties cannot be set."
If you open the view to browse it in the IDE do you get the error?
I haven't worked with views in many many years, but after you changed the
table definition, did you open the view in the designer so that it would
"redefine" itself to the new layouts?
Maybe you need to validate the database to make sure the view definition
matches the table definition?
Frank.
Frank Cazabon
Samaan Systems Ltd. - Developing Solutions
www.SamaanSystems.com
Referrals are important to us.
If you know of anyone who would benefit from our services, please contact
me. We would appreciate the opportunity to work with them.
On 14/01/2011 02:10 PM, Jon Westcot wrote:
> Hi Frank:
>
> The SELECTs that are done are purely on field names, not
> variable-length
> bits of the fields.
>
> The view consists of just two tables. The SQL code looks somewhat
> like:
>
> SELECT table_a.*, table_b.subcode ;
> FROM table_a ;
> INNER JOIN table_b ;
> ON table_a.maincode = table_b.maincode ;
> ORDER BY table_b.subcode, table_a.name, table_a.zip_code
>
> Maybe that will help somewhat.
>
> Thanks for the quick response!
>
> Jon
>
>
> ----- Original Message -----
> From: Frank Cazabon
> To: [email protected]
> Sent: Friday, January 14, 2011 12:04 PM
> Subject: Re: Problem with VFP6 View that has stopped working
>
>
> This is normally due to your view being defined such that the column
> widths might vary depending on the data being returned.
>
> For example, if you have something like this in your SQL:
>
> SELECT ALLTRIM(FirstName)
>
> could vary the size depending on the filter applied to the view. You
> should change that to something like this:
>
> SELECT PADR(ALLTRIM(FirstName), 50)
>
> Frank.
>
> Frank Cazabon
> Samaan Systems Ltd. - Developing Solutions
> www.SamaanSystems.com
>
> Referrals are important to us.
> If you know of anyone who would benefit from our services, please contact
> me. We would appreciate the opportunity to work with them.
>
>
> On 14/01/2011 01:59 PM, Jon Westcot wrote:
>> Hi all:
>>
>> I've got a problem with a view in VFP6 that has stopped working.
>> The
>> error that I'm getting from the original view is:
>>
>> "Base table fields have been changed and no longer match view
>> fields. View field properties cannot be set."
>>
>> Oddly, I can still BROWSE the view without complaint. I just can't
>> seem
>> to use it within a report.
>>
>> I've tried deleting the offending view and recreating it, but that
>> didn't seem to help, which I found even odder behavior than the error
>> that
>> I
>> am getting.
>>
>> Some obvious questions, with hopefully helpful answers:
>>
>> HAS the base table actually changed? Yes. Some fields have
>> been
>> added to the table, and at least one field has increased in size.
>>
>> Can you browse the new view? Absolutely. Just like with the
>> old
>> view. They look the same, too, when browsed.
>>
>> Can anyone shed some light on this issue? This is really getting
>> frustrating. I suppose that I could rework the report to eliminate the
>> view
>> if I must, but that's kind of a drastic "last-step" solution (at least in
>> my
>> mind).
>>
>> Thanks!
>>
>> Jon
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/DB0A91D1018F4A9F8E5509410807AB14@Megabox
** 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.