Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 20th, 2005, 06:43 AM
Authorized User
 
Join Date: Apr 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pls help me

Hi, I want to add 7 days to the Due_Date, but i know
    New_Due_Date = Due_Date + 7 Days
is wrong, but i don't know how to do that, then pass the value to table in database.


Code:
 New_Due_Date = Due_Date + 7 Days 
            sql = "INSERT INTO Renewal Values (@User_id, @Title, @Title_id, @New_Due_Date)"
            SqlDataAdapter3.InsertCommand.Parameters.Add(New _
                SqlParameter("@User_id", SqlDbType.Char, 10))
            SqlDataAdapter3.InsertCommand.Parameters.Add(New _
                SqlParameter("@Title", SqlDbType.VarChar, 100))
            SqlDataAdapter3.InsertCommand.Parameters.Add(New _
                SqlParameter("@Title_id", SqlDbType.Char, 10))
            SqlDataAdapter3.InsertCommand.Parameters.Add(New _
                SqlParameter("@New_Due_Date", SqlDbType.DateTime, 8))
            con.Open()
            SqlDataAdapter1.SelectCommand.ExecuteNonQuery()
            con.Close()
What should i write for that purpose?

Thanks!

Irene

 
Old May 20th, 2005, 08:46 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Have you spent any time looking over a book, tutorial or documentation for the .NET framework? You have been asking a lot of trivial questions that could be answered within a few minutes with a google search. Many of these question can be answered with the extensive contents of MSDN library online (http://msdn.microsoft.com/libary).

The DateTime datatype has many methods for doing date math such as:

   DateTime.AddDays()

http://msdn.microsoft.com/library/en...dDaysTopic.asp

In your case:

   New_Due_Date = Due_Date.AddDays(7)

-Peter
 
Old May 23rd, 2005, 07:33 PM
Authorized User
 
Join Date: Apr 2005
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Peter,

I usually look for the solutions in books n through forums, websites. If i want to utilise the msdn site, how should i go for? because in msdn site, there are many technical articles.

 
Old May 24th, 2005, 11:08 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not sure what your point is. Programming is a technical undertaking. Microsoft has provided us with complete documentation of the framework with lots of articles about the classes and methods in it. There are also many articles, tutorials, how-tos and other writings about the different things you can do in .NET. Very often when people ask questions here, I just do a search on google for a link to the answer. I if you are still getting familiar with the framework, I'd suggest just browsing over the framework namespace. I've found a lot of interesting just by looking at the list of classes available and then reading the docs about it.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
pls help me.. nilusharief003 ASP.NET 2.0 Professional 5 December 4th, 2008 08:05 AM
I need help!!!!!!!!!!!!!!!!!!!!!!!!!!!! pls!!!!!!! ironchef Java Basics 2 September 26th, 2006 02:35 PM
Pls help me!! hoailing22 ASP.NET 1.0 and 1.1 Basics 4 June 10th, 2005 11:24 PM
Pls!!! I need your Help!!! Ariel ASP.NET 1.0 and 1.1 Basics 3 May 9th, 2005 06:34 PM





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