Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 November 14th, 2007, 12:11 AM
Registered User
 
Join Date: Nov 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default data type mismatches

I am at a loss with these two errors.

I am writing a form with over 40 fields that are written to a an access 2000 db in asp classic.

I am having problems with two types of data types: boolean and dates

In Access the fields are:
name: flexible, data type: yes/no
name:startdate1, data type:date (short date)

The form:

<input name="activityFlex" type="checkbox" id="activityFlex" value="True">
<input name="startTime1" type="text" id="startTime1">

ASP:

Flexible=trim(request.form("activityFlex"))
StartTime1=trim(request.form("startTime1"))

Writing to the db using the recordset:

rsAddActivity.addnew
rsAddActivity("Flexible")=Flexible
rsAddActivity("StartTime1")=StartTime1
rsAddActivity.Update



I get errors at the :
rsAddActivity("Flexible")=Flexible
rsAddActivity("StartTime1")=StartTime1

 - both lines give me errors that is as follows:

Error Type:
Provider (0x80020005)
Type mismatch.


Can anybody help me? I have tried delimiting (#date#) and CInt(date)and have tried true, yes and 1 for the boolean.

Thanks,
Luis










Similar Threads
Thread Thread Starter Forum Replies Last Post
data type kfir XML 6 May 7th, 2006 07:15 AM
Which data type should I use? logmaster C# 0 January 2nd, 2006 10:06 AM
Data Type error but it is the correct type Mitch SQL Server 2000 2 March 19th, 2004 11:31 AM
Data Type Conversion owain SQL Language 5 October 31st, 2003 12:31 PM
data type limitations trangd MySQL 0 October 16th, 2003 11:34 AM





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