Re: CursorAdapter, MySQL - View definition has been changed.
- From: "Dan" <dan@xxxxxxxxxx>
- Date: Tue, 19 Jun 2007 16:41:51 -0400
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.
.
- Follow-Ups:
- References:
- CursorAdapter, MySQL - View definition has been changed.
- From: Dan
- Re: CursorAdapter, MySQL - View definition has been changed.
- From: Anders Altberg
- Re: CursorAdapter, MySQL - View definition has been changed.
- From: Dan
- Re: CursorAdapter, MySQL - View definition has been changed.
- From: Anders Altberg
- Re: CursorAdapter, MySQL - View definition has been changed.
- From: Dan
- CursorAdapter, MySQL - View definition has been changed.
- Prev by Date: Re: Mouse droppings
- Next by Date: Re: How to convert arrow keys to tab/shift-tab in a grid
- Previous by thread: Re: CursorAdapter, MySQL - View definition has been changed.
- Next by thread: Re: CursorAdapter, MySQL - View definition has been changed.
- Index(es):
Relevant Pages
|