WINCGI access Database Table "Error..."

I am using Delphi 2.0 to create CGI to access my database according to
David Chapman's "Building Internet Application With Delphi 2.0".

Whenever the CGI application (.exe) accesses the Database table, a error
message appears, indicating "Access violatin at address 4BDC5521...."
I am quite sure that the CGI appliation can access the table because the
CGI send the retrieved data back to the borwser sueccessfully. The problem
might occur after accessing the table.
I don't know what's happend there. I need some hints and help.

Hsiang Chen