On the input :   error message if there is no such id in the database to edit?  and out put comments messed up the whole

The first page (CoGetEditForm.cfm lets you input the co id
then it get to the next page for you to edit (CoEditForm.cfm). then
it lets take action and UPDATEs (CoEditAction.cfm) finally, it goes
to the colist.cfm to query results and outputs it to html format.
<td>#comm#</td>
Question is that:
1. where and what do I do to have an error message if there
is no such id in the database to edit?
2. the out put comments messed up the whole query results
when I added it to the html out put results. What can I do to clean
this up and where do I put the code?
<!-------------------------edit
page----------------------------->
<html>
<head>
<title>Main Title</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Edit a Co based on co_ID</h1>
<table>
<cfform action="CO_EditForm.cfm" method="POST">
<tr>
<td>Co_ID</td>
<td>
<cfinput type="Text"
name="Co_ID"
message="Please enter the Co_ID"
validate="integer"
required="Yes"
size="22"
maxlength="20">
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" value="GetCo">
</td>
</tr>
</cfform>
</table>
</body>
</html>
<!------------------------------------------CO_EditForm.cfm
page------------------------------------->
<cfquery name="GetCo"
datasource="#Request.MainDSN#">
SELECT
COName,
ADD,
City,
st,
zip,
comm
FROM
CO
WHERE
Co_ID = #Val(Co_ID)#
</cfquery>
<html>
<head>
<title>Main Title</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Edit a CO</h1>
<table>
<cfform action="COEditAction.cfm" method="POST">
<cfoutput>
<input type="hidden" name="COID" value="#Val(COID)#">
</cfoutput>
<tr>
<td>CO Name</td>
<td>
<cfinput type="Text"
name="COName"
value="#GetCO.COName#"
message="Please enter a name for this CO."
required="Yes"
size="40"
maxlength="40">
</td>
</tr>
<tr>
<td>ADD</td>
<td>
<cfinput type="Text"
name="ADD"
value="#GetCO.ADD#"
message="Please enter this new CO's ADD."
required="Yes"
size="32"
maxlength="30">
</td>
</tr>
<tr>
<td>City</td>
<td>
<cfinput type="Text"
name="City"
value="#GetCO.City#"
message="Please enter a city."
required="Yes"
size="22"
maxlength="20">
</td>
</tr>
<tr>
<td>st</td>
<td>
<cfinput type="Text"
name="st"
value="#GetCO.st#"
message="Please enter a st."
required="Yes"
size="3"
maxlength="2">
</td>
</tr>
<tr>
<td>ZIP Code</td>
<td>
<cfinput type="Text"
name="zip"
value="#GetCO.zip#"
message="Please enter a valid ZIP Code."
validate="zip"
required="Yes"
size="11"
maxlength="10">
</td>
</tr>
<tr>
<td>comm</td>
<td>
<textarea cols="40" rows="5"
name="comm"><cfoutput>#GetCO.comm#</cfoutput></textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" value="Update Database">
</td>
</tr>
</cfform>
</table>
</body>
</html>
<cfquery name="UpdateCO"
datasource="#Request.MainDSN#">
UPDATE CO
SET
COName = '#Trim(Form.COName)#',
ADD = '#Trim(Form.ADD)#',
City = '#Trim(Form.City)#',
st = '#Trim(Form.st)#',
zip = '#Trim(Form.zip)#',
comm =
<cfif Len(Trim(Form.comm)) GT 0>
'#Trim(Form.comm)#'
<cfelse>
NULL
</cfif>
WHERE
COID = #Val(Form.COID)#
</cfquery>
<cflocation url="COList.cfm">
<cfquery name="GetCo"
datasource="#Request.MainDSN#">
SELECT
coID,
coName,
ADD,
City,
st,
zip,
comm
FROM
co
ORDER BY
coName ASC
</cfquery>
<html>
<head>
<title>title getco</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>y List</h1>
<table>
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>ADD</b></td>
<td><b>City</b></td>
<td><b>st</b></td>
<td><b>ZIP Code</b></td>
<td><b>comm</b></td>
<td> </td>
</tr>
<cfoutput query="GetCompanies">
<tr bgcolor="<cfif currentrow mod
2>GHOSTWHITE<cfelse>WHITE</cfif>">
<td>#coID#</td>
<td>#coName#</td>
<td>#ADD#</td>
<td>#City#</td>
<td>#st#</td>
<td>#zip#</td>
<td>#comm#</td>
<td>
<a
href="EmployeeList.cfm?coID=#coID#">Employees</a>
<a href="coAddForm.cfm">Add</a>
<a href="coEditForm.cfm?coID=#coID#">Edit</a>
<a
href="coDeleteForm.cfm?coID=#coID#">Delete</a>
</td>
</tr>
</cfoutput>
</table>
</body>
</html>

After your SQL SELECT on CO_EditForm.cfm, you need a
<CFIF> that checks to see if any records were retrieved. See
below.

Similar Messages

  • Everytime I come to purchase neverwinter nights 2 it won't let me, and brings the following error message up; 'There was an error in the App Store. Please try again later (100). It is later, days later, and still nothing is working. Help!?!

    Everytime I come to purchase neverwinter nights 2 it won't let me, and brings the following error message up; 'There was an error in the App Store. Please try again later (100). It is later, days later, and still nothing is working. Help!?!
    Thanks

    Try here >  Mac App Store: "An unknown error occurred (100)" when purchasing

  • I tried to open an Audacity file. I got the following error message: "Warning there is very little free disc space left on this volume. Please select another temporary directory in your preferences. How do I select another temporary directory?

    I tried to open an Audacity file. I got the following error message: "Warning there is very little free disc space left on this volume. Please select another temporary directory in your preferences. How do I select another temporary directory?

    Audacity > Preferences > Directories.  You will probably need to use an external drive as it sounds like you Mac's drive is getting too full???

  • I get the following error message when I try to receive e-mail in this hotmail account: "Configuration could not be verified – is the user name or password wron

    I have tried to add a hotmail account to Thunderbird because my Internet provider will stop e-mail support in the near future. I was able to add a hotmail account to Thunderbird, but I get the following error message when I try to receive e-mail in this hotmail account: "Configuration could not be verified – is the user name or password wrong?" (The hotmail website receives the e-mail.) User name and password is certainly correct. I have a 8.1 OS. Thank you.

    got an anti virus that thinks it should scan email. Turn that function off.
    Have a firewall, check that Thunderbird has full internet access, not some Auto rubbish that somehow fails.

  • I recieved a notice that there was an update for Elements 13 but when I try to install it it stop's half way through then I get the error message that "updates could not be applied" I have tried several times and it continues to give me the error. What is

    I get a message that an update is available and when I install it the update stops half way through and I get the error code: U44M1I210 for Camera Raw and Elements 13.1 updates. I get the message "UPDATES COULD NOT BE APPLIED" Can someone help with this? Thank you. David

    drmeyers381
    Thanks for the follow up.
    Is your Premiere Elements 13 on Mac computer?
    I have not seen much in the way of alternatives coming from Adobe on the Premiere Elements 13.1 failed updates.
    But there seems to be several discussions on U44M11210 in the CC products...one
    Update failure. (U44M1I210) | Adobe Community
    You could try the uninstall, free ccleaner, reinstall with antivirus and firewall(s)  and then try for the Help Menu/Update for 13.1..
    If Mac, https://www.piriform.com/mac/ccleaner
    If Windows, CCleaner - PC Optimization and Cleaning - Free Download
    The CC people seem to have the advantage of an online download of their update as well as the one via the Help Menu/Update.
    Premiere Elements does not have that perk - update only via Help Menu/Update.
    Please review and consider and please let us know of your progress as your schedule permits.
    Thank you.
    ATR

  • TS1412 Itunes will not install, I get this error message.  There is a problem with this Windows Installer package.  A progran run as part of the setup did not finish as expected.  Contact your support personnel or package vendor.

    I Tunes will not install.  I get this error message:  There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor.  Does anyone have an answer?

    TRy the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • ITunes 10.5 Upgrade fails to Install. The Error Message is: "There is a Problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor."

    When Upgrading on my laptop from iTunes 10.2.11 to 10.5.0 the message I get is: "There is a problem with this Windows Installer Package.  Aprogram run as part of the setup did not finish as expected. Contact your support personnel or pacakge vendor.

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

  • When opening certain URLs (not all), the nuisance error message appears incorrectly saying I don't have latest Java RunTime installed and activated.

    The "Add-ons Manager" shows Java Platform SE 6 6.0.240.7 is enabled. But when I open certain websites the error message "We have detected that no Java Runtime is installed on your system or you are using an old version..." appears. But I can't see that it has any effect. It just delays the opening while the detection program runs. Something seems contradictory!

    Have you tried installing the latest version of Java, there have been 2 updates since your version. You can get the latest version from http://java.com/

  • When I try to sign in to my account on iTunes, I get the above error message, along with "Please review your account information". When I then click on "Review"

    When I try to sign in to my account on iTunes, I get the above error message, along with"Please review your account information".
    When I then click on "Review", it comesup with the page "Create an Apple Account for the iTunes Store"and presents me with the Terms Of Service.
    When I click "Agree",  It is disabled.
    Can anyone tell me why this has happened and how to resolve it?
    Please, please, please help.

    Count me in as having the same problem. I have been leaving messages in the iTunes for Mac forum where others in there also are having problems. I have been unable to access my account since 11/7/2007. E-mails with Apple have not worked and now I haven't heard back from them since Saturday. I have tried both on a Mac and Windows machine and keep receiving the same error message that:
    This Apple ID has not yet been used with iTunes.
    I last purchased music with this account on 10/30/2007. I even tried resetting my password, changing my account info, trying on a computer with iTunes 7.4, etc. I have money in that account and 150 songs and 5-6 tv shows that I cannot access. I also just purchased a new computer and cannot sync my iPod with this computer since these songs will not transfer.
    Apple really needs a phone number for technical support. Having to deal with e-mails back and forth (and waiting a day for each e-mail) is not a good business practice. Hopefully they will have a phone number in the future.
    Either way, count me in on getting annoyed that a week later, this issue has not been fixed.

  • I am getting the following error message "wireless network appears to have been compromised"

    I am getting the following error message "wireless network appears to have been compromised"
    Any information would be helpful.

    bclark173 wrote:
    I am getting the following error message "wireless network appears to have been compromised"
    Can you provide a screenshot of this message? Make a screenshot by following the directions here:
    http://support.apple.com/kb/HT5775
    Be sure no sensitive personal information is displayed. To add that image to a post here, click the camera icon in the post editor toolbar.

  • I am running Windows 7  and trying to update to iTunes version 10.5 (from version 10.3.1.55) and I keep getting the following error message, 'Error occurred while installing the updates. If the problem persists, choose Tools Download Only and try instal

    I am running Windows 7 home edition and trying to update to iTunes version 10.5 (from version 10.3.1.55) and I keep getting the following error message, ‘Error occurred while installing the updates. If the problem persists, choose Tools > Download Only and try installing manually’ which I do only to have the same error message pop up.

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • Win 8.1 2010 Outlook Error message: "Either there is no default mail client or the current mail client cannot fulfill..."

    When trying to open Outlook in Win 8.1 I get the error message: 
    "Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Office Outlook and set it as the default mail client."
    It eventually opens but none of my Mail accounts load. When I click on one of the accounts I get 
    "Cannot expand the folder. Internet mail is not registered properly. Re-install and try again."
    Outlook is set with all its defaults. I've tried going through the Repair routine for Microsoft Office but it doesn't help.

    Hi,
    To delete a profile, you may try the steps below:
    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps
    carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.
    1. Press Windows key + R to open the Run command.
    2. Type regedit in the Open field and click OK.
    3. Locate the key then right click on it and choose Rename:
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem
    4. Type OLD at the end of the name.
    5. Try opening Outlook and it may prompt that you need to create a new profile.
    I hope this can help.
    Regards,
    Melon Chen
    TechNet Community Support

  • I keep getting the following error message when I try to update my itunes, "There is a problem with this windows installer package. Aprogram run as part of the set up did not finish as expected.  Contact your support personnel or package vendor."

    I keep getting the following error message when I try to update my itunes, "There is a problem with this windows installer package. Aprogram run as part of the set up did not finish as expected.  Contact your support personnel or package vendor."

    Yes, I had found a similar solution also.  I'm running XP Pro, SP3.  I went Control Panels/ Add-Remove programmes/apple software update/ change/ repair.  Then run the 10.5 exe.
    While the programme updated from version 8 of iTunes, my new iTunes is now a mess.  Not all of my music was in the same folder previously but it all showed up on iTunes.  Now many albums have been left out, some have only a few tracks and some have two copies of some tracks as well as having other tracks missing.  I haven't begun to work on that.

  • When I try to open up a PDF document, i get the following error message: "There was an error opening this document. The network path was not found" AArrgh please help as I need to open up my documents. Thanks.

    When I open up a PDF Document all i get is an error message saying: "There was an error opening this document. The network path was not found" I dont know how to fix this, so looking for some advice please, as I really need o open up my documents.
    Thank for any help.

    The documents I’m trying to read are already saved on my computer, under various different headings, I know that we have a server, so I only assume these documents are saved on here, as I said before I’m not good with all this techno stuff. I do my work each week ( on a payroll system) and save the documents for each company, they automatically go to the correct place. I never request for them to be saved in a certain place ( well not that I’m aware of) . I then on occasions need to open up this information, it is then that I can’t read or open the documents. We do have a tech help, but they are off sick until the 5th Jan, hence me trying to work out if I can fix this problem through this help site. Its ADOBE Reader that I’m trying to use.

Maybe you are looking for

  • Trouble with Snow Leopard

    I tried to update my macbook to Snow leopard and it keeps installing and then restarting and then immediatly installing again. Is there anything I can do or am I screwed?

  • Maximum number in a group

    Hello, I am thinking about getting the business package with manager for group calls.  I have only seen mention of 7+ people in a group.  What is the maximum number of people allowed in a group?  I need to arrange a group call of 20 people. Thanks!

  • Recording sound with Siemens API

    Hello, there is only com.siemens.mp.media package instead of javax.microedition.media on my Siemens C55. It containes most of classes from MMAPI but class RecordControl is missing:( Is there some other approach how to record sound in java on this tel

  • Interactive Script Editor-Launch transaction

    Hi All, i would like to know how exactly you go about adding a luanch transaction to the script that you are creating? Thanks Elmar Adams

  • HT203175 i can not open itunes or take it of my pc or fix it. what can i do

    You can not post a blank message. Please type your message and try again