Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 June 24th, 2005, 07:56 AM
Registered User
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tring to insert date into SQL server Db

Here is my code:
      <td align="right" valign="top" ><B>Date: </B></TD>
      <TD valign="top"><Input class="text3" input type="text" maxLength="12" id="txteffdt" name="date1" size="9" value="<%= FormatDateTime(now(),2)%>">
      <A href="javascript:ShowCalendar(document.myForm.date img1,document.myForm.date1,null, '<%= FormatDateTime(DateAdd("yyyy", -1, now()),2)%>', '<%= FormatDateTime(DateAdd("yyyy", 1, now()),2)%>')" onclick=event.cancelBubble=true;>
      <IMG align=top border=0 height=21 id=dateimg1 src="cal/calendar.gif" style="POSITION: relative" width=34></A></td>

oCom17.Parameters.Add("@txteffdt", system.Data.SqlDbType.datetime, 12).value = txteffdt.text

I get this error message:
BC30456: 'value' is not a member of 'System.Web.UI.WebControls.TextBox'.

If I add runat="server" the popup calander locks up
can anyone give me any ideas

Old August 15th, 2005, 06:57 PM
Authorized User
Join Date: Aug 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

on which line of your posted code does the error tell you to check?

Inigo: You have a great gift for rhyme.
Fezzik: Yes, yes, some of the time.
Vizzini: Enough of that.
Inigo: Fezzik, are there rocks ahead?
Fezzik: If there are, we'll all be dead.
Vizzini: No more rhymes now, I mean it!
Fezzik: Anybody want a peanut?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert/Update to sql server DB in a scheduler rajanikrishna ASP.NET 2.0 Professional 3 October 26th, 2007 04:27 AM
INSERT DATE INTO SQL SERVER prasanta2expert ASP.NET 1.0 and 1.1 Basics 1 January 4th, 2007 08:27 AM
store insert/update date/time stamp in sql2k db alexdcosta ASP.NET 2.0 Basics 0 June 22nd, 2006 05:44 AM
How to insert date in Sql Server through aspx page jay4ever_2000 ASP.NET 1.0 and 1.1 Professional 4 February 20th, 2006 08:53 AM

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