Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in VFP9 with NODATA in remote views ?
Message
De
10/05/2006 01:14:04
Walter Meester
HoogkarspelPays-Bas
 
 
À
09/05/2006 15:08:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01120484
Message ID:
01120602
Vues:
32
Hi aleksey,

>The error indicates that the server produces results with different schema for "USE RoomType" and for "USE RoomType NODATA". It is easy to check, compare the schema for cursors created by VFP. To avoid this error, try to adjust the query to return result with the same schema regardless whether NODATA is used.

I can confirm that i've hit some case in VFP8 SP1, where the schema resulting from a USE with and without NODATA were EXACTLY the same (including .NULL. defenition) and still it would raise an error when I loaded with NODATA and REQUERY() right there after, even if the REQUERY did not produce any results.

So I suspect this is a bug in both versions (VFP8 and VFP9)
Though complex, the viewdefinition is:
CREATE SQL VIEW "VW_SEMENLIST_NORMAL" ;
   AS SELECT smb_semenid as semenid, smb_semdate, PADR(GetCaption("headers.basesemen"),60), ;
   		PADR(LEFT(smb_summary,200),200) smb_summary, 01 as actionid, smb_pk as pk  ;
   	FROM t_semenbase  ;
   	WHERE (smb_semenid = ?semen_main.semenid OR smb_semenid = ?semen_main.Oldsemenid) AND smb_basic AND smb_semenid > 0 ;
UNION ALL ;
	SELECT smb_semenid as semenid, smb_prepdate, PADR(GetCaption("headers.prepsemen"),60), ;
		PADR(LEFT(smb_psummary,200),200), 08 as actionid, smb_pk as pk  ;
	FROM t_semenbase  ;
	WHERE (smb_semenid = ?semen_main.semenid OR smb_semenid = ?semen_main.oldsemenid) AND smb_prepared AND smb_semenid > 0  ;
UNION ALL ;
	SELECT smb_semenid, smb_survdate, PADR(GetCaption("headers.survival"),60), ;
		PADR(LEFT(smb_survsumm,200),200), 04 as actionid, smb_pk as pk  ;
	FROM t_semenbase  ;
	WHERE (smb_semenid = ?semen_main.semenid OR smb_semenid = ?semen_main.oldsemenid) AND smb_survival AND smb_semenid > 0  ;
UNION ALL ;
	SELECT imm_semenid as SemenId, imm_Date, PADR(GetCaption("headers.immuno1"),60), ;
		PADR(LEFT(imm_summary,200),200), 05 as actionid, imm_pk as PK  ;
	FROM t_immunobeads  ;
	WHERE (imm_semenid = ?semen_main.semenid OR imm_semenid = ?semen_main.oldsemenid) AND imm_type = 1 AND imm_semenid > 0  ;
UNION ALL ; 
	SELECT imm_semenid as SemenId, imm_Date, PADR(GetCaption("headers.immuno2"),60), ;
	PADR(LEFT(imm_summary,200),200), 06 as actionid, imm_pk as PK  ;
	FROM t_immunobeads  ;
	WHERE (imm_semenid = ?semen_main.semenid OR imm_semenid = ?semen_main.oldsemenid) AND imm_type = 2 AND imm_semenid > 0  ;
UNION ALL ;
	SELECT smb_semenid as semenid, smb_morphdate, PADR(GetCaption("headers.semenmorph"),60), ;
	PADR(LEFT(smb_morphsumm,200),200), 02 as actionid, smb_pk as pk  ;
	FROM t_semenbase  ;
	WHERE (smb_semenid = ?semen_main.semenid OR smb_semenid = ?semen_main.oldsemenid) AND smb_morph AND smb_semenid > 0  ;
UNION ALL ;
	SELECT smb_semenid as semenid, smb_thawdate, PADR(GetCaption("storagelbl.sementhaw"),60), ;
	PADR(LEFT(smb_thawsumm,200),200), 10 as actionid, smb_pk as pk  ;
	FROM t_semenbase  ;
	WHERE smb_semenid = ?semen_main.semenid AND smb_thawed ;
UNION ALL ;
	SELECT sem_semenid as semenid, sem_freezedate, PADR(GetCaption("patchlabels.freezelab"),60) ,;
	SPACE(200), 09 as actionid, sem_pk as Pk  ;
	FROM t_semenmain  ;
	WHERE (sem_semenid = ?semen_main.semenid OR sem_semenid = ?semen_main.oldsemenid) AND sem_stored AND sem_semenid > 0  ;
UNION  ALL ;
SELECT thw_semenid as semenid, thw_thawdate, PADR(GetCaption("storagelbl.sementhaw"),60),;
	PADR(LEFT(thw_thawsumm,200),200), 07 as actionid, thw_pk as pk  ;
	FROM t_thawresults  ;
	WHERE (thw_semenid = ?semen_main.semenid OR thw_semenid = ?semen_main.oldsemenid) AND thw_semenid > 0 ORDER BY 1 DESC



>Thanks,
>Aleksey.
>
>
>>I have read this article about fixed problem in VFP9.
>>
>>http://support.microsoft.com/kb/894011/EN-US/
>>
>>But the error stay there.
>>I have a remote view in a DBC VFP with mySQL5
>>
>>SELECT Roomtype.descrip, Roomtype.rooms, Roomtype.features,;
>>  Roomtype.pic_path, Roomtype.pic360_path, Roomtype.roomtypeid,;
>>  Roomtype.roomTypeCode;
>> FROM ;
>>     roomtype Roomtype;
>> WHERE  Roomtype.roomtypeid BETWEEN ?nRT_ID1 AND ?nRT_ID2
>>
>>
>>The next example gives an error "View definition has been changed (Error 1494)"
>>
>>nRT_ID1 = 0
>>nRT_ID2 = 999
>>USE RoomType NODATA
>>REQUERY()
>>
>>
>>but, if use the same example without "NODATA" parameter, works fine.
>>
>>Any idea ?
>>Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform