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

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



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: CursorAdapter, MySQL - View definition has been changed.
    ... I can fix the fixed length fields by casting the static text to a fixed ... In my MySQL database the Comment ... I am not sure what is causing this error. ... this error message? ...
    (microsoft.public.fox.programmer.exchange)
  • Unable to deliver the message due to a recipient problem
    ... After a hit by a virus, we use the ISINTEG to rebuild ... the database and show us that it fix some problems. ... receive Email and reveice the error message "Unable to ...
    (microsoft.public.exchange.clients)
  • Access 2000 date error
    ... We have a database at work that is used by many folks. ... I get an error message. ... How can I fix this? ...
    (microsoft.public.access.forms)
  • Re: Service pack2 wont install
    ... Malke wrote: ... "unable to read or write from the database". ... How can I fix this? ...
    (microsoft.public.windowsxp.newusers)
  • Re: Renaming control breaks module ?
    ... This seems like the kind of problem that a decompile might fix. ... Office Button | Access Options | Current Database | Name AutoCorrect ... Compact the database to get rid of this junk: ... Uncheck any references you do not need. ...
    (microsoft.public.access.formscoding)