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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old December 8th, 2004, 08:17 PM
dragonvn dragonvn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 79 dragonvn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 31 m 23 sec
Reputation Power: 4
Error while inserting item

Hi,

I am newbie and I am trying to fix this error. Please help me out.

Quote:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

The error occurred in C:\www\cms\source\dns_register.cfm: line 4

2 : INSERT INTO member (First_Name, Last_Name, Username, Password, Gender, Country, Phone)
3 : VALUES ('#Form.firstname#', '#Form.lastname#','#Form.username#',
4 : '#Form.password#', '#Form.gender#', '#Form.country#', '#Form.phone#')
5 : </cfquery>
6 :


Quote:

<!-- Resgister Form-->
<cfform name="form1" method="post" action="../source/dns_register.cfm">

First Name:<cfinput name="firstname" type="text" size="30" maxlength="30" required="yes" message="Please Enter First Name.">

Last Name: <cfinput name="lastname" type="text" size="30" maxlength="30" required="yes" message="Please Enter Last Name.">

User name :<cfinput name="username" type="text" size="30" maxlength="30" required="yes" message="Please Enter User Name.">

Password:<cfinput name="password" type="password" size="30" maxlength="30" required="yes" message="Please Enter Password.">

Email:<cfinput name="email" type="text" size="30" maxlength="30" required="yes" message="Please Enter Email.">

Phone:<cfinput name="phone" type="text" size="30" maxlength="30" required="yes" message="Please Enter Confirmed Email.">

Gender:
M: <cfinput type="radio" name="gender" value="Man" checked="yes">
F:<cfinput type="radio" name="gender" value="Female">

Country:
<select name="country">
<option value=United State>United State</option>
<option value=United Kingdom>United Kingdom</option>
<option>
</select>

<input name="add_record" type="submit" id="add_record" value="Register">
<input name="reset" type="reset" id="reset" value="Reset">
</cfform>

Reply With Quote
  #2  
Old December 8th, 2004, 08:25 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 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 8 m 55 sec
Reputation Power: 53
One of the fields isn't a string. Try removing one column name at a time from the SQL statement until you find which column is causing the problem. It might be the phone number.

And in the future please don't just paste a giant script like that and say "help me". Remove the extraneous code until you have the problem narrowed down becuase myself and others trying to help on the board don't have time to read through hundreds of lines of code. Thanks.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old December 8th, 2004, 08:39 PM
dragonvn dragonvn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 79 dragonvn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 31 m 23 sec
Reputation Power: 4
Sorry for posting up a giant script. I edited it to can be good looking.

I also tried your way to remove each columns but I still got error:

Quote:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The table 'member' is already opened exclusively by another user, or it is already open through the user interface and cannot be manipulated programmatically.

The error occurred in C:\www\cms\source\register.cfm: line 3

1 : <cfquery name="add_person" datasource="cf_person" username="#####" password="">
2 : INSERT INTO member (First_Name, Last_Name)
3 : VALUES ('#Form.firstname#', '#Form.lastname#')
4 : </cfquery>
5 :

Reply With Quote
  #4  
Old December 8th, 2004, 08:44 PM
dragonvn dragonvn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 79 dragonvn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 31 m 23 sec
Reputation Power: 4
Oh never mind. I know what is going on and I fixed it. Please close this topic. Thank in advances!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Error while inserting item


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 | 
  
 

IBM developerWorks




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