Re: CursorAdapter, MySQL - View definition has been changed.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have found the problem in a post on the MySQL forum. It was actually the
connection parameters not the syntax of my SQL.

http://forums.mysql.com/read.php?126,96016,96242#msg-96242


"Dan" <dan@xxxxxxxxxx> wrote in message
news:OWIoHsosHHA.4424@xxxxxxxxxxxxxxxxxxxxxxx
After working on this some more I seem to be having some sort of timing
issue causing this problem. I have 3 grids (Customers, Parts, and Quotes)
that are recursively populated based off of the user changed rows in the
parent grid.

Customers have many parts, parts have many quotes.

If I step through the code in the debugger I don't get any errors. If I
let the program run at full speed I get the "View definition has changed"
error messages.

Is it possible that the datasource is not fully refreshed even though the
CursorRefresh method has executed?


"Anders Altberg" <anders.altberg> wrote in message
news:OQOEQVosHHA.1420@xxxxxxxxxxxxxxxxxxxxxxx
CAST ('Static comment' AS Text) AS comment

Perhaps CAST(comment AS Char(254)) As comment
if this wouldn't mean loss of data.

-Anders


"Dan" <dan@xxxxxxxxxx> wrote in message
news:%23wI7oJnsHHA.4880@xxxxxxxxxxxxxxxxxxxxxxx
I have found the code that is causing the problem but I am not sure how
to fix it. Here is what I am doing.

I am doing a union of 2 tables where not all of the fields are common
between the tables. For the fields in the table that aren't common I
select some static text as a field name. For example:

SELECT
Action,
Approval,
Comment ;
FROM
Table1
UNION ALL
SELECT
"N" AS Action,
CAST("Yes" AS CHAR(3)) AS Approval,
"Static Comment" AS Comment ;
FROM
Table2

I can fix the fixed length fields by casting the static text to a fixed
field length but I have a problem with the Comment field. In my FoxPro
database the Comment field is a Memo. In my MySQL database the Comment
field is a TEXT field. I have not found a way to use the CAST function
with the TEXT field nor can I use any padding functions since the TEXT
field could be of variable lenght.

Do you see any other way of fixing this other than adding permanent
fields for the static data from Table1 to Table2?



"Anders Altberg" <anders.altberg> wrote in message
news:uxFiApfsHHA.1416@xxxxxxxxxxxxxxxxxxxxxxx
This can be caused by using TRIM() or NVL() on a field. It causes the
field to change size when the view is requeried, depending on what the
first row of data contains - it determines the size of the column. Use
PADR() or a more specific replacement for nulls so that the column
stays the same width.

-Anders

"Dan" <dan@xxxxxxxxxx> wrote in message
news:ODbZkuesHHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
I have created my first program using CursorAdapters and a native VFP9
database and it works great. I am now trying to convert it to use
MySQL. I keep getting the message "View definition has changed" when
refreshing my CursorAdapters.

I am not sure what is causing this error. Can anybody shed some light
on this error message?

Thanks.












.



Relevant Pages

  • Re: Session Cannot Always Access Database
    ... >> various pages query a MySQL database to get information (mostly to ... >> attempts to run the query. ... >> Thanks for any insight as to what may be causing this. ... cwab.php is a MySQL connection script written by Dreamweaver. ...
    (comp.lang.php)
  • Re: How to delay execution in /etc/rc.local ?
    ... > start early in the init process and the jssbots latter in the init ... >> as well as database. ... > Any error messages? ... > looking for mysql on the wrong port or server. ...
    (alt.os.linux)
  • Re: Problems with Net::MySQL...
    ... mysql -u root -p ... into Perl -- the error messages from the command line are slightly less ... username is '' and your database is '!' ...
    (comp.lang.perl.misc)
  • Error Message
    ... When ever I open this database, I get an error messages that says this. ... "This file may not be safe if it contains code that was intended to harm ... How do I find out or clean up the code that is causing this issue? ...
    (microsoft.public.access.forms)
  • Re: MySQL Database problem (probably already solved in a message, but this is somewhat urgent)
    ... MySQL server has a database with a table, ... columns, an FSR column, and a password column. ... checked if the supposed arrays that were returned were actually arrays ...
    (comp.lang.php)