JimmyCrackedCorn
Posts: 583
|
| Posted: 05/03/2007, 2:27 AM |
|
I have an Access database with 32 tables. Tonight I have been going through each table with CCS and creating search/grid/record update pages. Everything has been working just fine.
But all of a sudden CCS will not generate working code for one of the tables. Below is the error message I get. I have tried rebooting but it does not help.
I am not adding any custom code or anything. Pure CCS.
Any ideas?
===============================
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Click the Refresh button, or try again later.
Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/RecSoftware16/Classes.asp, line 2662
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)
Page:
GET /RecSoftware16/tblPrograms_list2.asp
Time:
Thursday, May 03, 2007, 3:58:19 AM
More information:
Microsoft Support
===============================
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Wkempees
|
| Posted: 05/03/2007, 4:30 AM |
|
http://forums.codecharge.com/posts.php?post_id=77924&s_keyword=0x800A0CC1 http://forums.codecharge.com/posts.php?post_id=72933&s_keyword=0x800A0CC1
I faguely remember it to be an indication that either table layout has
changed since last generation or wrongly typed field names.
The above two links were found using the Search in the Top menu of the
forum, searching for 0x0800A0CC1
Nice those cryptic DB messages.
Walter
|
|
|
 |
JimmyCrackedCorn
Posts: 583
|
| Posted: 05/03/2007, 4:49 AM |
|
Hi Walter,
Thanks for your thoughts. I really appreciate your regular contributions around here and I hope to be able to return the favor some day soon.
As it turns out the problem may have been related to tables having the same field names. For example, all of my tables have an ID field named, well what else, "ID"! And some of my tables have other common field names.
This has never been a problem with hand-coding as I always preface field references with their table names. But apparently CCS does not like this.
I went into each and every table and gave each field an underscore and a letter suffix. So now my product table's ID field is "ID_A" and my order table's ID field is "ID_B", etc.
So far this seems to be working. (Of course I have lost the whole night's worth of generated pages based on the old field names. Ah, the excitement of new tools!!!)
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Wkempees
|
| Posted: 05/03/2007, 4:57 AM |
|
Well, you solved it, and it proved me righ as well.
The way you solved it although clever, is not the most elegant one.
Consider being in an environment where you are not allowed to alter the
database, you will then be stuck.
You should have aliased the tables in the DataSource of the Forms you built.
CCS will then use the aliases (a, b, c, etc) to build the SQL for you it
would have generated something like:
Select a.id, b.id, c.id from table1 as a, table2 as b
and so on
I wonder how you built the forms, because normaly these are solved by
the builders telling you to alias or implicitly aliasing the tables by
using their full names.
Walter
|
|
|
 |
Wkempees
|
| Posted: 05/03/2007, 5:06 AM |
|
Afterthought:
As Johan Cruijff regularly states: every advantage has it's disadvantage.
Turning that one around:
- by having to do all that work again, you now know how fast you can
(re)create an application from scratch.
- You know know how to 'refresh' database connections
- you got a lot closer to the workings of CCS.
- a lot of hands-on experience can be added to your CV
I still wonder however how things came to be like you described.
You are using MsAccess (you state) and that would give you the advantage
of having linked tables in generated forms.
BTW
as a rule I do not use uppercase fieldnames, primary key fields (almost
all) are "id" foreign key field are xxx_id in which xxx refers to the
tablenames first, middle, last letter giving a three letter combi that
when pronounced should tell you what table you are addressing, like
person psn, program pgm and so on.
Have fun, happy to have been of help
Walter
|
|
|
 |
JimmyCrackedCorn
Posts: 583
|
| Posted: 05/03/2007, 5:47 AM |
|
Quote Wkempees:
Well, you solved it, and it proved me righ as well.
The way you solved it although clever, is not the most elegant one.
I find the elegance applied to any given problem tends to be inversely related to the deadline! At times like these I tend to think of a project as 1) broke, 2) fixed or 3) fixed AND elegant. When I get to #2 I usually have more of #1 to work on somewhere else in the project.
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Wkempees
|
| Posted: 05/03/2007, 6:35 AM |
|
|
|
|
 |
|