When an image field is unexpectedly read-only

18 February 2010

From time to time the following thing happens to people:

  1. They add an image field to an existing database.
  2. They try to add an image to the database.
  3. Cardbox reports that the image field is read-only.

Understandably, this is rather puzzling. It only happens with databases that were created with older versions of Cardbox. The quick cure is to rebuild the database with Tools > Management > Rebuild > Database. This Knowledge Base page gives a detailed explanation.

What is a read-only profile?

14 January 2010

In a multi-user Cardbox installation it is quite common to have a mixture of read-only users (who cannot make changes to the database or format file) and read/write users (who can). You can enforce this distinction by means of user profiles, as described in The Cardbox Book (page 253 onwards).

This has licensing implications for large installations, because read-only licences are much cheaper than read/write ones. All standard Cardbox licences are read/write, but you can buy read-only licences in blocks of 5 and add them to your server, or even buy an unlimited read-only licence that does not limit the number of read-only users.

Whenever someone opens a database on the Cardbox Server, the program checks to see what kind of licence is needed and allocates that licence to the user. If the database is being opened with a read-only profile, the Cardbox Server will allocate  a read-only licence; otherwise it will allocate a read/write one.

This leads to the question: what is a read-only profile?

Read the rest of this entry »

Closing and reopening Cardbox from inside Cardbox

27 May 2009

Last time I showed you how to create a simple VBScript macro that closed Cardbox and reopened it again, so as to restart any interrupted Internet connections.

The macro had to be executed from Windows – for instance, from the Quick Launch area of the taskbar. What about creating a Cardbox macro that can do the same thing from inside Cardbox?

Read the rest of this entry »

How to close and reopen Cardbox

26 May 2009

One of our customers has a laptop that he uses to access Cardbox databases across the Internet. When he travels from one office to another, he loses his Internet connection, and so he has to close Cardbox and re-open it again to get reconnected to his databases. He was wondering if there was a one-click way of doing this.

Here’s a VBScript macro that closes and reopens any chosen Cardbox workspace.

Const WORKSPACE="C:\My Documents\Address Book.cbw"
On Error Resume Next
Set x=GetObject(WORKSPACE)
x.Visible=False
Set x=Nothing
WScript.CreateObject("WScript.Shell").Run """" & WORKSPACE & """"

To put this macro on your system, copy it to the Clipboard, then use Notepad to create a file called “Reopen.vbs” and paste the text of the macro into it. Obviously you’d change the first line to reflect the name of your own workspace.

To make the macro easy to access, you can add it to your Quick Launch bar so that it’s always available.

How the macro works

The macro connects to the copy of Cardbox that is running the workspace, it tells it to hide itself, and it deletes its connection to that copy of Cardbox. Cardbox now has no reason to stay alive, so it closes. The macro then opens the workspace afresh.

Could we do better?

  • This is a Windows macro, not a Cardbox one.¬† and it has to be run from Windows – the Quick Launch bar, or the desktop, or wherever.
  • This macro has the name of the workspace built in to it, so if you have several Cardbox workspaces then you’d need several macros.

Tomorrow, a solution that removes both these drawbacks.

Partially duplicating a record

1 May 2009

In a scan-and-shred type of database, I often find myself wanting to duplicate everything except the image or object field. For instance, I may be filing bank statements, where all the details are the same as last time except for the date and the scanned image itself. Here’s a macro that does this.

Set rec=ActiveRecord
AddRecord
Set recNew=ActiveRecord
For Each fld In rec.Fields
 If fld.Definition.Type=cbxFieldTypeText Then
  recNew.Fields(fld.Definition.Name)=fld
  End If
 Next

I save this macro in the “This Database” section, under the name “Partial Duplicate”. Then, to make things easier for myself, I edit the native format of the database, do Tools > Keyboard, and associate Ctrl+D with playing the “Partial Duplicate” macro. Since Ctrl+D is normally Cardbox’s own shortcut for File > Duplicate Record, this means that I don’t have to change my typing habits.

One refinement: one of my fields, called NUMBER, has an auto-numbering validator in it. If I duplicate that field, the new record will have the same serial number as the old – which I don’t want. So I add the following line at the end of the macro:

recNew.Fields("NUMBER")=""

Now the field will be blanked out, and Cardbox will number it automatically when I save the record.

Cardbox and Apple Macintosh

11 December 2007

Cardbox is a Windows program. The Mac is not a Windows computer. These two facts have been a source of frustration to many people for a long time.

We have now done extensive work to make sure that Cardbox is compatible with CrossOver Mac, a product that lets Windows programs run on the Mac without the need to install Windows itself.

The Knowledge Base page now has a “Macintosh” section giving advice on installing and using Cardbox with CrossOver Mac.

If you haven’t already got CrossOver Mac, you can download a trial version.

If you already have a Cardbox licence and want to try all this, you’ll need the very latest build of Cardbox, Build 4259, which you can download here.

If you haven’t already got Cardbox – or you want to get a friend with a Mac to try it out – read about our special offer.

If you have any comments or questions, please visit the Feedback on the Mac page on the Cardbox Everywhere blog.

New Amazon service agreement

3 July 2007

Amazon have at last revised the service agreement for the use of the Amazon S3 storage service. The new service agreement is a great improvement its predecessor, which we criticised in detail in the S3 in Business article. Using the “backup to S3” features of Cardbox now seems legally as well as technically practicable.

Amazon’s EC2 on-demand computing facility still has unacceptable restrictions placed on its use, but that is a separate service from Amazon S3 and is not relevant to Cardbox users.

Lightweight e-commerce with Cardbox

30 May 2007

A small business, or a business whose main activity is not e-commerce, can run into trouble when selling things on the Web. Either it sells everything through a third party (Amazon for books, Handango for downloads, or even eBay) with high transaction costs, unfavourable contract terms, and hidden risks, or it pays a lot of money for a fully e-commerce-enabled web site when all it really needed was the ability to process a dozen or so transactions a day.

The Universalis case study shows how it is possible to start a small e-commerce business at virtually no cost (just the application fee for the credit card processor) and with virtually no programming (just a single Cardbox macro to process the orders as they come in by email).

This lightweight semi-automated approach is secure, fraud-proof, and requires very little time to manage.

64-bit Windows and fractal images

15 May 2007

Cardbox is fully compatible with 64-bit editions of Windows, but there is one small exception.

If you have old databases that were created by versions 1 or 2 of Cardbox for Windows, and those databases contain images, and those images were stored with “fractal compression”, then those images will not be visible in 64-bit Windows. This is because the “helper” program for fractal images, made by the defunct company Iterated Systems, is a 16-bit program and Microsoft have removed support for 16-bit programs from 64-bit Windows.

This probably does not apply to you:

  • Most people have created their databases with Cardbox 3.0, which doesn’t provide fractal compression for images.
  • Most people who used Cardbox for Windows 1.0 and 2.0 did not use the Fractal option when storing images in their databases.
  • Hardly anyone is buying 64-bit editions of Windows.

If you have old databases that contain images and you are contemplating a move to 64-bit Windows, this article provides a macro that will scan your database and convert “Fractal” images to a more modern form.

Symbol fonts in Cardbox

14 May 2007

When you choose a font in Cardbox, it offers you a choice of all the normal fonts on your computer. By “normal fonts” we mean the ones in which letters look like letters. For instance, w might look like this:

Letter w in normal fonts

A symbol font is one where the symbols you see don’t look anything like the letters you type. Here is the letter w as displayed in various different symbol fonts:

Letter w in symbol fonts

Read the rest of this entry »