Saturday, October 09, 2004


No comments:
To get MySQL to log all it’s actions, turn on “log-bin” (see the MySQL documentation). To turn this on in EasyPHP, open the MySQL config file, add the line e.g. “set-variable=log-bin=C:\mysqllog\”, and restart MySQL. When you want to examine a file, MySQL will not let it go if in use, so you can restart MySQL so it switches to a new file, and then look at the old file.

Saturday, September 25, 2004

How to hide an HTML item

No comments:
style="display:none”. This worked perfect for a checkbox that I wanted to hide, but keep functioning.

Thursday, September 09, 2004

Regedit Permissions

No comments:

On Sunday night, I found out that my “registry hive” was corrupted, and attempts to fix this via the Microsoft Register Repair Utility, via Windows 2000 setup disk, etc. all failed. My reading afterwards turned up problems with the version of the RAID drivers that I was using for my S-ATA HD, which is the likely cause of the problem.

Carlos had something similar with his home computer recently, and finally did an install of Win2K over his old install. This worked OK for him, and the only problem was that he had to reinstall some applications.

However, I expected more data corruption due to the drivers, and didn’t want to continue with my existing data. My long term solution was to buy a Dell Inspiron 9100 w/ Dell financing. However, that will take some time to get here, so I decided to use my old HD (and IDE HD that was working in another machine before I got my new machine a month or two ago). This should keep me with a minimum of “fussing” time until the Dell gets here.

Then, the big problems started. I needed all kinds of new drivers for the HD (makes sense - it was used in a completly different machine). However, it was impossible to install anything - I kept getting a generic error message no matter what drivers I tried to install. Carlos to the rescue. It turns out that the problem was that my user account (in this case, administrator) did not have permission to change some registry values. No idea how I got into this situation, but the solution was to give “full control” to the registry path HKEY_LOCAL_MACHINE/SYSTEM/CURRENTCONTROLSET/ENUM/PCI. In XP, this can apparently be done w/ RegEdit. However, in Win2K, this must be done with RegEdt32. SALVATION - drivers could then be installed, and I could get back to work.

Thursday, September 02, 2004

Taking ModDate of portal records into consideration

No comments:
In FileMaker, how do you get the “real” modification date of a record, if it has related records. E.g. if you have a sale, which has a mod date field, and line items for that sale, the mod date for the sale itself does not get changed when the portal records get changed. Solution: Add a “mod date” field to the line items, and add a calc field (type date) to the main record which is something like: Max(Max(Product Line Items::Date Modified), Date Modified)

Monday, August 30, 2004

CSV Documentation

No comments:
For creating data feeds from products in an ecommerce store, CSV is the de facto standard that all the services use. However, the exact rules for CSV are only well documented in one spot that I found: here.

Wednesday, August 18, 2004

FileMaker via ActiveX in C#

No comments:

I had trouble finding documentation about Automating FileMaker from C# (using FM Developer 6), so I’ve written up some of my notes…

First, you have to “add reference”, going to the COM tab and selecting the FM type library. Hit the “Select” button, and then hit OK.

Add a “using FMPRO50Lib;” clause to the beginning of the file where you will be using FM Automation.

Here is the basic code to call a script in the active DB.

ApplicationClass fmApp = new ApplicationClass();
IFMIDocuments fmDocs = (IFMIDocuments) fmApp.Documents;
IFMIDocument fmDoc = (IFMIDocument)fmDocs.Active;
string strScriptName = "ReturnToApprovalRec";
fmDoc.DoFMScript (ref strScriptName);

To find a particular document, you will want to loop the open documents. NOTE: The name shown in the message box is the FULL PATH - you will have to dig the DB name out of there.

IEnumerator myEnum = fmDocs.GetEnumerator ();
while (myEnum.MoveNext ()) {
IFMIDocument myDoc = (IFMIDocument) myEnum.Current;
MessageBox.Show (myDoc.FullName);

To open a new DB, you would want to use IFMIDocuments.Open

There are not many things that you can automate (see the object browser), but at least the above outlines the things that CAN be done.


Notes for 64 bit machines

There are a number of things that you have to be aware of when using FileMaker on a 64 bit machine

  • Filemaker help cannot be accessed until you install WinHlp32.exe. See
  • The FileMaker ODBC driver setup must be done in a somewhat strange way. I found the solution here: Short version: there are two versions of odbcad32.exe in the windows directory. Look for the version inside the syswow64 directory, and use that to set up 32 bit ODBC drivers.
  • AmImEx must be compiled in 32 bit mode for it to be able to access the FM ODBC driver
  • In Windows 7, I had the experience that the COM component for FileMaker was not installed even after FileMaker installed successfully. To fix this, search from "cmd.exe" in the start menu, right click on it and execute as administrator, cd (change directory) to the directory where FileMaker is installed, and execute
    "NameOfFilemaker.exe" /REGSERVER

Tuesday, August 17, 2004

HTML Link-Button

No comments:
To create an HTML button which is actually a link rather than a form submit, put the following OUTSIDE of a form area. <input type="submit" value="Checkout Now" class="button" onClick="document.location=’http://whatever’"></input>

MySQL Freeing Space

When you delete records in MySQL, the table is not compressed - the space is left free for future inserts. In order to see how much “claimed by not used” space you have, use “Show Table Status” (e.g. “show table status from jssdatabase), and check the “Data_free” column. To “compress” the DB, use “Optimize Table” (e.g. “optimize table jss_carts").

Monday, August 09, 2004

XP Woes

No comments:
I wasted beaucoup time over the last month with my XP Professional explorer “hanging” for minutes at a time. This happened in two main situations: when hitting the start menu key, and when right clicking on a folder. A google post finally tipped me off to the problem - the PGP service. Deinstalling PGP fixed the problem immediatly. Note sure if it was a free version I was using, but I saw on deinstall that the version number was 8.0.3.
NOTE: Upgrading to 8.1 fixed the problem. There are rumors (even though the source code for the 8.x version is published) that there are back doors in PGP for the government, but this appears to be only rumors. Phil Zimmerman (creator of PGP) says that all versions prior to 7.03 were free of back doors, but he does not know about later versions (he left the company).

What is my ip?

No comments:
Not sure what IP you’re connecting to the internet with? Try WhatIsMyIp.

Monday, August 02, 2004

.NET decimal issues

No comments:

so parsing would go like:
double dbl = double.Parse("1234.56″,

And when you need to get your string from the double, you can do the
same thing in “reverse”:
string s =

Saturday, June 12, 2004

JShop Server - Referring URL Notes

No comments:

Just did some research on Referring URLs, and thought I’d share what I found.

First, all the info below assumes that JSS is able to pick up the referring URL. This is not always the case, based on what browser is used, what other things the user has on their computer (e.g. Norton Internet Security can filter this out), and (I believe) how the server is set up. OK, the rest of the info assumes that JSS can pick up the referring URL.

To find what external links the customers are coming from…
- Go to Admin area / Log Section / General Options
- Set “Enable Visitor Logging” to “on”
- “Ignore Referrers From Reports” must include your site’s URL (see docs)
For visitors that arrive after this change, you can see what link they came from by going to admin / log section, check “Referring URL” in the “Select Reports” section, and then click on the “show reports” button. NOTE: “Direct/Unknown” are visitors that either type your URL directly, or cases where JSS is not able to pick up what the referring URL is.

To find out what orders come from a Referring URL, open admin / orders. Open up the details for an order (by clicking the order number in the column headed “Order"). At the bottom, you’ll find the “Referring Site” where the order came from.

NOTE: this info is only collected when creating a new shopping cart. To force a new shopping cart on your machine, clean out your existing cookies before clicking on the external link. I IE, you do this by going to the tools menu, Internet Options, general tab, and hitting the button “Delete cookies…”.

Wednesday, June 09, 2004

FileMaker - Opening Many DBs

No comments:

My FM client has password protection on his DBs, and I’ve spent a LOT of time typing this password over and over (and over and over) again for each DB that I need to access. Yesterday, I finally got sick enough of it to do something about it. The following steps assume that you have the same password for all DBs, but it may be possible with different passwords, too.
- Create a new password protected DB, with the password being the same that you need in the other DBs.
- In this new DB, create a script which opens the DBs that you need
- Open “Edit / Preferences / Document” and check the “Try Default Passord” checkbox, but do NOT enter the password.
- In this dialog, you also want to check the “Perform Script” checkbox, and indicate the script that you created to open the DBs.

Voilá - you only have to enter the password once to open all the DBs.

Friday, June 04, 2004

FileMaker - Report by Month

No comments:

I had the problem that I was trying to do a report by month, but the field that I was keying on had month, day, and year, so I was getting a breakdown by day. To breakdown by month, I introduced an unstored calculated field with a date result, using the formula

Date( Month(CalcDate), 1, Year(CalcDate))

…and keyed off that, instead.