ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 6th, 2003, 12:50 PM
rahljosh rahljosh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 rahljosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Data not writting to db

I have kind of an odd problem. When I submit a form, the data randomly doesn't write to the database. It sticks around long enough for me to validate that indeed information was imputed and is correct, but on the submition to the db, it is lost. It does it with random fields at random times. It doesn't seem to make a difference if I have default values or not.

An example of it is I have a Yes/No question with a comment box. If you answer No with no comment, it directs you to fill in the comment, that part works, but the answer to the Yes/No isn't always written to the db. Other times it is. I also have run into this problem with an address field. Sometimes it writes the address, other times it doesn't.

Any of you have any ideas on what would be causing this?

Thanks-

Here is the code for the input:
<td>Yes <input type=radio name="english_improve" value="Yes"></td><td>No<input type=radio name="english_improve" value="No" checked>


If the error checking is ok:
<CFtransaction action="begin" isolation="serializable">
<CFINSERT DATASOURCE="reports" TABLENAME="test_progress_reports">

Had the same problem before the error checking was there, so the problem isn't in that.

The address problem input looks like this: <INPUT type="text" name="school_Add" value="#sch_Add#" size=30></INPUT> same type of insert tag. The address is pulled from a different db, if its available, if not, the user enters it. Either way it doesn't always take.

Last edited by rahljosh : October 6th, 2003 at 02:39 PM.

Reply With Quote
  #2  
Old October 6th, 2003, 02:31 PM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
Post the code you're using - it will help other users determine if the error is w/ your CFML or somewhere else.

Thanks.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever.
Analyze twice; hack once.
The world's first existential ITIL question: If a change is released into production without a ticket to track it,
was it actually released?


About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect -
Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire


Reply With Quote
  #3  
Old October 6th, 2003, 03:43 PM
rahljosh rahljosh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 rahljosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Here is the code for the input:
<td>Yes <input type=radio name="english_improve" value="Yes"></td><td>No<input type=radio name="english_improve" value="No" checked>


If the error checking is ok:
<CFtransaction action="begin" isolation="serializable">
<CFINSERT DATASOURCE="reports" TABLENAME="test_progress_reports">

Had the same problem before the error checking was there, so the problem isn't in that.

The address problem input looks like this: <INPUT type="text" name="school_Add" value="#sch_Add#" size=30></INPUT> same type of insert tag. The address is pulled from a different db, if its available, if not, the user enters it. Either way it doesn't always take.

Reply With Quote
  #4  
Old October 6th, 2003, 10:40 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,626 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 6 m 34 sec
Reputation Power: 53
What database are you using? Are you sure it supports the "serializable" transaction mode?

Also, the use of CFINSERT is fraught with peril. It takes a little more work, but trust me and write out a SQL insert statement instead, things will work much more smoothly if you do.

Reply With Quote
  #5  
Old October 8th, 2003, 01:37 PM
rahljosh rahljosh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 rahljosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
switched the insert statement to and actual insert SQL statement and made a huge difference. Thanks for the pointer on that one.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Data not writting to db


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway