Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Articles stored where?

I've been told that the actual article text is in the tblArticles, sArticle field but when I open my DB I just don't see that field in the table anywhere. I don't even see it in any table in the DB.

I can see everything else that has to do with the site but I cannot find any article text anywhere. I know that it's there somewhere though.

John

John Cesta
Wednesday, December 04, 2002

sArticle is a Memo (an OLE-object) field which means that the content is stored outside the table due to the very large size it can have.

Jorgen Brenting
Wednesday, December 04, 2002

oh, I didn't know that. I've worked with Access DBs for a while, not very intensely, limited to data retrieval and updating with ColdFusion, ASP and iHTML but never knew really what an OLE-object was.

No wonder I couldn't find it.

Thanks,

John Cesta

John Cesta
Wednesday, December 04, 2002

I don't believe the response that was given is accurate.

The text of articles *is* stored in the .CTY database.  You know this because you can download other .CTY databases and find the articles inside them.

The text of the articles is however not stored as simple text, but as an OLE Object.  What that basically means is that there is an object on the system that is holding formatted text and this object has been serialized (or simply, stored) as a field in the Access database.

My guess is that to retrieve the text of the article, you would have to create an instance of the object, restore the object's content with the OLE Object data in the database, and then access the text using whatever methods the object provides.  Or something like that.  I'm not up on the exact COM/OLE terminology or techniques.  Maybe it's easy (and if so, maybe someone could post some source code.)

What I would like to see is the replacement of all OLE Objects in the database with simple text.  I can't imagine what additional information is being stored in the OLE Object that couldn't be stored as additional columns in the database.  Doing that would make it much simpler to programmatically modify the database from outside of CityDesk.  That would allow third-party developers to more easily add on to CityDesk.  That benefits both Fog Creek's customers and the third-party developers.

I'd like to see Fog Creek come out with documentation that gives the underlying semantics to the database, and possibly treating CityDesk as a scriptable application (just as FrontPage and the rest of Microsoft Office is).  By exposing the CityDesk application as an object model, it becomes more than just a content management system, but more a platform.  Look at the how packages like FrontPage and Dreamweaver have had third-party developers provide an endless array of add-ons that provide functionality that Microsoft and Macromedia never either thought about or cared about.

John Passaniti
Monday, December 09, 2002

Of course the content of the field is stored in the DB, but it's stored outside the table itself for the reason I mentioned. I think that keeping all information inside the table would result in too many restrictions on the amount and nature of content and in a very large waste of space occupied by more or less empty fields. And there is an easy way to view the content: CD.

Jorgen Brenting
Tuesday, December 10, 2002

I would like to be able to export all the info in a CD file. I have a program called Queryer that can do this but it doesn't export the article text.

It seems like that would be a great way of keeping the CD data safe from any data corruption. Then, you could just import it back into a new CD DB. Make sense?

John

John Cesta
Tuesday, December 10, 2002

The easiest way to make a backup of  any CD-site is to open Explorer and simply copy the *.cty file to another folder. The copy can then be renamed to something that makes sense. If you ever need it, you can rename it back and open it with CD. No fancy export programs needed.

Jorgen Brenting
Wednesday, December 11, 2002




Actually, I is thinking of a way to export the city scripts for safe keeping.

You can download my backup tool from this URL:

http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=4852&ixReplies=1

I always backup all the city files before opening CD. You can also use this program for other data from other software. Just change the extensions and the program name directives in the ini file.

John Cesta
Wednesday, December 11, 2002

Hmm ... I'm afraid, you lost me there ?:o)

Jorgen Brenting
Wednesday, December 11, 2002

Maybe I did. I was on my out and posted rather quickly. Wish I could edit these posts.

What I meant to type was that I would like to be able ot export all the CD stuff in the DB so that I would get all the CD scripting pages as well as the templates and structure of the site I created in the even that the DB crashes. Then I was saying that I do perform backups and I wrote a little backup script automatically backsup the cty files upon loading citydesk.

There, I said it. :|

John

John Cesta
Wednesday, December 11, 2002

*  Recent Topics

*  Fog Creek Home