Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2007, 07:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default check box data insert error

I am trying to insert 44 checkbox value to the table.
it give following error message.

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E57)
String or binary data would be truncated.
/DCILDepts/Administration/safety2007/newconfirm.asp, line 172


I use checkbox
<input type=checkbox name=checkbox1 id=checkbox1 value="Backup Safety">
...
...

data insert files newconfirm.asp

video1=Request.form("checkbox1")
video1=Request.form("checkbox2")
.....
connection string //

isql1="insert into tablename(video1,video2,......) values("
isql2="'" & video1 & "',"
isql3="'" & video2 & "',"
......

sql=isql1+isql2+........

cn.Execute sql // line 72

I was also try to use single quotation mark in input

<input type=checkbox name=checkbox1 id=checkbox1 value='Backup Safety'>

error is same.
table datatype is varchar

Mateen












 
Old May 24th, 2007, 07:57 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What is the Data length of the column you are inserting into? This error means that you are trying to insert more data into a column then it is able to hold.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 24th, 2007, 08:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks your,
data length was small

Mateen


 
Old May 28th, 2007, 05:29 AM
Registered User
 
Join Date: May 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tanu80 Send a message via Yahoo to tanu80
Default

Hi I am looking for more help

Hi This is tanaya looking for some guide in developing .net application





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data binding a check box badgolfer VB.NET 2002/2003 Basics 9 July 20th, 2007 02:15 PM
capture check box data into mysql osemollie PHP How-To 0 January 30th, 2006 12:18 PM
Syntax error - C# data insert chuksted C# 1 April 21st, 2005 10:10 AM
Check before insert data into sql Alcapone C# 2 October 26th, 2004 07:57 AM
Check box Error surendran BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 July 25th, 2004 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.