My application works fine on my development machine: Windows 98 using PWS4 with a Visual Foxpro 5 backend database.
The forms and associated processing pages updated/inserted/deleted with no issues.
When i moved my CF files and database to a hosted service and tried to submit a form page I receive a Server to busy message. I never received a message like this using my development machine. The host suggests I try using error handling to prevent this message. I really have no idea how to implement this, or why I need to?
Any advice? Below is where i do my database inserts
<CFQUERY DATASOURCE="mhdinternal" Name="checkuserid">
Select * from driver
WHERE duserid = '#Form.duserid#'
</cfquery>
<CFSET duserid2=Trim(checkuserid.duserid)>
<CFIF "#duserid2#" IS NOT "">
<html>
<head>
<titleDriver ID already exisits.</title>
</head>
<body>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<style>
<!--
-->
</style>
<HR><BR>
<P><FONT size=5><STRONG>Someone else is already using
that Driver ID!</STRONG></FONT></P>
<P> </P>
<P><FONT>Use the <EM>back</EM> button on your web browser to return to the previous page
and enter a different Driver ID.</FONT></P>
<P>
<HR><BR></P>
<CFABORT>
</cfif>
<CFPARAM NAME="FORM.creditcard" default="No">
<CFPARAM NAME="FORM.dcentral" default="No">
<CFPARAM NAME="FORM.dsuburbs" default="No">
<CFPARAM NAME="FORM.dgreater" default="No">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver"
FORMFIELDS = "badgeno,licenseno,licenseissue, ni1, ni2, ni3, ni4, ni5, cuserid, duserid, dpassword,
licensepoints, surname, forname1, forname2, dob, raddress1, raddress2, raddress3, drivertype,
rcity, rpostcode1, rpostcode2, rtelno1, rtelno2, remail, hde, dateavailable, dcentral, dgreater,
dsuburbs, deliverto, crim, mhdcomm, mhdcess, creditcard, authorization1, authorization2">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="Driver_vehicle"
FORMFIELDS = "licenseno, mot, type, vrefrig, vreg, vsurname, other,
vforname1, vforname2, vaddress1, vaddress2, vaddress3, vcity, vpostcode1, vpostcode2, vmanufact, vcolour, vmodel">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver_insurance"
FORMFIELDS = "licenseno, ipolicy, ivalid, icompname, iaddress1, iaddress2, iaddress3, icity,
ipostcode1, ipostcode2, itelno1, itelno2, inoclaims, ipremium">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver_employment"
FORMFIELDS = "licenseno, ee, misconduct, ename, eaddress1, eaddress2, eaddress3, ecity, epostcode1, epostcode2,
etelno1, etelno2, ebegindate, eenddate, pname1, p1begindate, p1enddate, p1telno1, p1telno2,
pname2, p2begindate, p2enddate, p2telno1, p2telno2, pname3, p3begindate, p3enddate, p3telno1, p3telno2">
<CFIF ISDEFINED("Form.licensephoto1"
>
<CFIF Trim(Form.licensephoto1) IS NOT "">
<CFFILE ACTION="Upload"
FILEFIELD="licensephoto1"
DESTINATION="c:\web\upload\licensephoto"
ACCEPT="image/jpg, image/pjpeg,image/gif,image/bmp, image/tiff"
NAMECONFLICT="MAKEUNIQUE">
<CFSET licensephoto="#Trim(FILE.ServerFilename)#.#File.ServerFileExt#">
<CFSET licensephotodtc="#DateFormat(FILE.Timecreated,'DD MMM YYYY')# #TimeFormat(File.Timecreated,'HH:MM:SS')#" >
</cfif>
</cfif>
<cfquery name="DriverInsertPhoto" datasource="mhdinternal">
INSERT INTO driver (licensephoto, licensephotodtc)
VALUES ('#Variables.licensephoto#','#Variables.licensephotodtc#')
</cfquery>
The forms and associated processing pages updated/inserted/deleted with no issues.
When i moved my CF files and database to a hosted service and tried to submit a form page I receive a Server to busy message. I never received a message like this using my development machine. The host suggests I try using error handling to prevent this message. I really have no idea how to implement this, or why I need to?
Any advice? Below is where i do my database inserts
<CFQUERY DATASOURCE="mhdinternal" Name="checkuserid">
Select * from driver
WHERE duserid = '#Form.duserid#'
</cfquery>
<CFSET duserid2=Trim(checkuserid.duserid)>
<CFIF "#duserid2#" IS NOT "">
<html>
<head>
<titleDriver ID already exisits.</title>
</head>
<body>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<style>
<!--
-->
</style>
<HR><BR>
<P><FONT size=5><STRONG>Someone else is already using
that Driver ID!</STRONG></FONT></P>
<P> </P>
<P><FONT>Use the <EM>back</EM> button on your web browser to return to the previous page
and enter a different Driver ID.</FONT></P>
<P>
<HR><BR></P>
<CFABORT>
</cfif>
<CFPARAM NAME="FORM.creditcard" default="No">
<CFPARAM NAME="FORM.dcentral" default="No">
<CFPARAM NAME="FORM.dsuburbs" default="No">
<CFPARAM NAME="FORM.dgreater" default="No">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver"
FORMFIELDS = "badgeno,licenseno,licenseissue, ni1, ni2, ni3, ni4, ni5, cuserid, duserid, dpassword,
licensepoints, surname, forname1, forname2, dob, raddress1, raddress2, raddress3, drivertype,
rcity, rpostcode1, rpostcode2, rtelno1, rtelno2, remail, hde, dateavailable, dcentral, dgreater,
dsuburbs, deliverto, crim, mhdcomm, mhdcess, creditcard, authorization1, authorization2">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="Driver_vehicle"
FORMFIELDS = "licenseno, mot, type, vrefrig, vreg, vsurname, other,
vforname1, vforname2, vaddress1, vaddress2, vaddress3, vcity, vpostcode1, vpostcode2, vmanufact, vcolour, vmodel">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver_insurance"
FORMFIELDS = "licenseno, ipolicy, ivalid, icompname, iaddress1, iaddress2, iaddress3, icity,
ipostcode1, ipostcode2, itelno1, itelno2, inoclaims, ipremium">
<CFINSERT DATASOURCE = "mhdinternal" TABLENAME="driver_employment"
FORMFIELDS = "licenseno, ee, misconduct, ename, eaddress1, eaddress2, eaddress3, ecity, epostcode1, epostcode2,
etelno1, etelno2, ebegindate, eenddate, pname1, p1begindate, p1enddate, p1telno1, p1telno2,
pname2, p2begindate, p2enddate, p2telno1, p2telno2, pname3, p3begindate, p3enddate, p3telno1, p3telno2">
<CFIF ISDEFINED("Form.licensephoto1"
<CFIF Trim(Form.licensephoto1) IS NOT "">
<CFFILE ACTION="Upload"
FILEFIELD="licensephoto1"
DESTINATION="c:\web\upload\licensephoto"
ACCEPT="image/jpg, image/pjpeg,image/gif,image/bmp, image/tiff"
NAMECONFLICT="MAKEUNIQUE">
<CFSET licensephoto="#Trim(FILE.ServerFilename)#.#File.ServerFileExt#">
<CFSET licensephotodtc="#DateFormat(FILE.Timecreated,'DD MMM YYYY')# #TimeFormat(File.Timecreated,'HH:MM:SS')#" >
</cfif>
</cfif>
<cfquery name="DriverInsertPhoto" datasource="mhdinternal">
INSERT INTO driver (licensephoto, licensephotodtc)
VALUES ('#Variables.licensephoto#','#Variables.licensephotodtc#')
</cfquery>