Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clarion 5 Error: Invalid Record Declaration (47) 1

Status
Not open for further replies.

wchestnut

Programmer
Aug 9, 2010
79
US
Hello! I'm new to Clarion 5. I have an older system that I need to make modifications to. I'm trying to add a field to a small TPS table by opening the Dictionary, adding the Field, then Browsing the table so it gets converted and I can see the new Field. However, when I go to run the APP and Browse the table, I receive that error. I can double-click on the TPS file and see the new field.

What's interesting is, while trying to figure out this problem, I renamed the TPS file to an XXX file, ran the APP and it re-created the TPS file -- but with the original structure (not including the new field). I have no clue as to where it's getting the original structure information if the only DCT file was updated with the new Field.

I recompiled the main EXE and the DLL's sub-APP. I looked for other DCT files. I performed text searches for this table in all of the files in the development folder. Nothing.

Any and all help would be appreciated very much!
 
Hi!

Since yours seems to be a multi-DLL application, the Data APP (which exports all the tables and globals) must be re-compiled FIRST. Check and see if the APP is actually using the Dictionary that you modified. Double check the generated <AppName>.CLW for the TPS structure and ensure that the new column is there.

Regards
 
Interesting... I was aware of this DATA.APP file but initially didn't see anything in it so I didn't know it's function yet (there are a total of 17 APP files). I just assumed to add a field to a table, you modified the Dictionary and the compile process refers to the DCT file for the table layouts. Again, still learning. :)

The DATA.APP file is using the same Dictionary file as the other APPs. I see the table layouts when I click Module and I found the code for the table I added the field to in the Dictionary, but the new field name is not there. Should I manually add it?

I did try to Make the DATA.DLL file and received an error: Make error: Source file dat!059.clw not found.
 
Oh... not sure if it matters, but the DATA.CLW Module in the DATA.APP file is titled "Dictionary Enhancement Template Program".
 
Holy cow... I'm not sure exactly what I did but I think I fixed it!

I opened the Dictionary and added a Key to that same table to include the new field (Active BYTE), then, with the DATA.APP file "open" (in the title of Clarion), I did Run again -- but this time with no errors. I was then able to go run the main EXE and browse the table!

So, going forward, if I need to make more changes to the existing tables, do I modify the Dictionary then compile the DATA.APP before modifying any of the other APPS?

This is much different from the old dBase/FoxPro days!
 
Hi!

Looks like you found your solution.

Since Global Data (which includes the Table structures) can have only a single location (memory address), the normal process for a multi-DLL solution is ::
- Have a DATA application which EXPORTS all the Table structures, global data & classes (if ABC template)
- Have all other DLLs and EXE link in the LIB of the Data APP and classify all the Table structures, global data as EXTERNAL (meaning defined elsewhere).

Since you are using Clarion 5 and I am using Clarion 7.2, I am not sure what is there in the Clarion 5 Help but check if there is anything on multi-DLL solutions. You could also lookup the example APP under \Clarion5\Examples\DLLTutor folder.

Regards
 
Hmmm... looks like I have a lot more to learn! Thank you very much, shankarJ, for the head-start!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top