|
| [WD90] Dynamically open a WD55-HF-file |
| Iniciado por sb, 24,may. 2006 16:06 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 24,mayo 2006 - 16:06 |
Hello forum, I am trying to open a HF55-file that is dynamically defined in an earlier version of our software to convert it to a HF7-file defined in the analysis. The problem is opening the 55-file from WD90. I've use the following code to declare the HF55-file: //// Onderstaande description-types voor definieren van bestand INGELPRD TableDesc is File Description ItemDesc is an Item Description // Beschrijving (WD 5.5) bestand INGELPRD voor bijhouden van ingelezen productie per project/jaar/week ... // describing the file TableDesc..Name="INGELPRD" TableDesc..Type=hFileHF5 // TableDesc..Type becomes 51 instead of 56 !!! TableDesc..FicCryptMethod=hCryptNo // // describing the "PROJECTNR" item ItemDesc..Name="PROJECTNR" ItemDesc..Type=hItemInteger4 HDescribeItem(TableDesc, ItemDesc) // // describing the "JAAR" item ItemDesc..Name="JAAR" ItemDesc..Type=hItemInteger2 HDescribeItem(TableDesc, ItemDesc) // // describing the "WEEK" item ItemDesc..Name="WEEK" ItemDesc..Type=hItemInteger2 HDescribeItem(TableDesc, ItemDesc) // describing the "IPKey0" item ItemDesc..Name="IPkey0" ItemDesc..KeyExpression="PROJECTNR+JAAR+WEEK" ItemDesc..KeyType=hUniqueKey HDescribeItem(TableDesc, ItemDesc) // validating the file description HDescribeFile(TableDesc) // Change file directory HChangeDir("INGELPRD",CompleteDir(gsDatadrive)+pad_admin) // OK // Open file HOpen("INGELPRD","",hORead) // produces an error ******************************************************************** The declaration works OK, except that at TableDesc..Type=hFileHF5 gives TableDesc..Type the value 51 (constant hFileNormal) instead of 56 (constant hFileHF5). At opening the file I get the following error message: Error in Method hfHOpen process, line 12. HOpen function called. File not in WinDev 9.0 format: F:\WDProj90\testbedrijven\data\RENOVATIE\INGELPRD.FIC file in WinDev 5.5 (or earlier) format.
********************************************** Technical Information Project : 3Borg Dump error of module <9.00Df>. - WL Call: Processing , line <12>, thread <0> Function , syntax # <1> - Level: fatal error (EL_FATAL) - Error Code: 70150 - WD55 Error Code: 150 - No system error code - No system error message - What happened? File not in WinDev 9.0 format: F:\WDProj90\testbedrijven\data\RENOVATIE\INGELPRD.FIC file in WinDev 5.5 (or earlier) format. - Debug Information: ##(CWDFile)-Signature gérée=<5456720>, signature lue=<825241898>## Fonction (7,17) - Attached Information: EIT_SRCFILE : EIT_LOGICALTABLENAME : EIT_DATEHEURE : 22/05/2006 11:17:34 EIT_PILEWL : Method hfHOpen (HFFUNC.hfHOpen), ligne 12 Local Procedure cnv_IngelPrd (autoconv.PROCEDURE.cnv_IngelPrd), ligne 100 Global Declarations of autoconv (autoconv), ligne 73 Initialization of BASIS3B (BASIS3B), ligne 69 - Identifier in .err: 70411 ***************************************************************************** I've tried to use the declarationmethod of WD55, but then I get an error message that the file is already declared (). Who can give me a hint to open this HF5 type file from WD90 ? Thanks in advance. Stefan. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,mayo 2006 - 16:48 |
G'day Stephan Wouldn't you have to declare the file first before setting up the descriptions ? This would establish its type and original analysis format Result = HDeclare([File name, Full path of the .WDD file [,Password of the WDD file [, Alias name]]) From the Help This function lets you use files that were described in older WebDev analysis (WinDev 4.1 to 5.5, WebDev 1.0 to 1.5). Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,mayo 2006 - 17:08 |
Hello Al, thanks for your quick response, but I can't use HDeclare(). It is use to open files described in the "analysis" of earlier WD-versions. Not for dynamically described files of earlier WD-versions. Thanks anyway. Stefan.
G'day Stephan Wouldn't you have to declare the file first before setting up the descriptions ? This would establish its type and original analysis format Result = HDeclare([File name, Full path of the .WDD file [,Password of the WDD file [, Alias name]]) From the Help This function lets you use files that were described in older WebDev analysis (WinDev 4.1 to 5.5, WebDev 1.0 to 1.5). Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,mayo 2006 - 17:52 |
G'day Stephan Sorry I missed the importance of your initail phrase about a dynamically created file but this has me intrigued now - how to create a temporary description of somthing that is itself temporary. HDescribeFile does not allow a type hFileHf5 only an HfileNormal, I assume because that's the only type of temporary file you are allowed to describe in this version. The "HFileHF5" type you are using is a general purpose value for the ..type attribute and only available "If the name of a file, view or query is specified " for the command Result = Object Name..Type. However there it looks like you can describe a temporary file in WD format using HFileNormal and then at the actual HDescribeFile() command convert it to 5.5 format See the note in the HDescribeHelp "Describing a temporary file in Hyper File 5.5 format (backward compatibility only)" If you then create this file using a data source and hcreation() it might be possible to HAlias this new file back to the original file and read the data ?? Is there a patron saint for WIndev programmers? If so.. Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,mayo 2006 - 18:45 |
Hi Al, I've tried to declare the file in the old (5.5) way, but than I get an error on the statement HDescribeFile(). I declared the file as follows: // Beschrijving bestand voor bijhouden ingelezen productie per project/jaarwk ... HDescribeFile("INGELPRD","IP") HDescribeItem("INGELPRD","projectnr,L") HDescribeItem("INGELPRD","jaar,E") HDescribeItem("INGELPRD","week,E") HDescribeItem("INGELPRD","vulling,T,12") HDescribeKey("INGELPRD","IPkey0","projectnr,jaar,week",False) And I get the following error (at runtime): Error in Local Procedure cnv_IngelPrd process, line 66. HDescribeFile function called. file already defined.
********************************************** Technical Information Project : 3Borg Dump error of module <9.00Df>. - WL Call: Processing , line <66>, thread <0> Function , syntax # <1> - Level: fatal error (EL_FATAL) - Error Code: 70207 - WD55 Error Code: 207 - No system error code - No system error message - What happened? file already defined. - Debug Information: iehf2002 Fonction (7,98) - Attached Information: EIT_DATEHEURE : 23/05/2006 09:16:20 EIT_PILEWL : Local Procedure cnv_IngelPrd (autoconv.PROCEDURE.cnv_IngelPrd), ligne 66 Global Declarations of autoconv (autoconv), ligne 73 Initialization of BASIS3B (BASIS3B), ligne 69 - Identifier in .err: 70103 So I didn't got the chance to HAlise() the file, etc. I'am afraid there is no patron saint for WIndev programmers? Thanks for your help, but I need other hints. Regards, Stefan.
G'day Stephan Sorry I missed the importance of your initail phrase about a dynamically created file but this has me intrigued now - how to create a temporary description of somthing that is itself temporary. HDescribeFile does not allow a type hFileHf5 only an HfileNormal, I assume because that's the only type of temporary file you are allowed to describe in this version. The "HFileHF5" type you are using is a general purpose value for the ..type attribute and only available "If the name of a file, view or query is specified " for the command Result = Object Name..Type. However there it looks like you can describe a temporary file in WD format using HFileNormal and then at the actual HDescribeFile() command convert it to 5.5 format See the note in the HDescribeHelp "Describing a temporary file in Hyper File 5.5 format (backward compatibility only)" If you then create this file using a data source and hcreation() it might be possible to HAlias this new file back to the original file and read the data ?? Is there a patron saint for WIndev programmers? If so.. Regards Al |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 14 mensajes |
|
| Publicado el 05,julio 2015 - 18:18 |
Hi friends,
here's an example for dynamically accessing a WD 5.5 file ("KUNDEN") from WinDev 20 ...
*** works as a 32-bit executable under a 64-bit or 32-bit Windows! ****
// Global declarations of the window EXTERN MyKUNDEN
// End of initialization of the window HDeclare("KUNDEN","C:\BackPlus\MiniBack01.wdd","","MyKUNDEN")
HChangeDir(MyKUNDEN,"C:\BackPlus\")
// now the file is open and ready for reading it // this is just a demo to read the whole file and add it to a memory table
HReadFirst(MyKUNDEN,KUNUM) WHILE NOT HOut(MyKUNDEN)
TableAddLine(Table1,MyKUNDEN.KUNUM,MyKUNDEN.KUADR1+CR+MyKUNDEN.KUADR2+CR+MyKUNDEN.KUADR3+CR+MyKunden.KUADR4+CR+NoSpace(MyKUNDEN.KUPLZ)+" "+NoSpace(MyKunden.KUORT))
HReadNext(MyKUNDEN,KUNUM) END
HClose(MyKunden)
// Best regards, GuenterPMensaje modificado, 06,julio 2015 - 07:52 |
| |
| |
| | | |
|
| | | | |
| | |
|