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 October 19th, 2004, 04:12 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default Contactanation error

 i am trying to concanate this code. Can you help me in this?
 strUpdate = "update tblCustRate set dtRateFrom =" &ndateFrom&
                "dtRateTo = " &ndateUntil&
                "decHourlyRate=" &nHourlyRate
this code gives me an error. Thanks

 
Old October 19th, 2004, 05:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Is this the same as that of your other post?

Can you post here the error that you see? Also the datatypes of the columns in your database

_________________________
- Vijay G
Strive for Perfection
 
Old October 19th, 2004, 08:09 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The error it shows are syntax error. The data types
are 50 and 19/18/2004

 
Old October 20th, 2004, 03:01 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

Hi,
    Following code will help u.

 strUpdate = "update tblCustRate set dtRateFrom ='" &ndateFrom &
              "' and dtRateTo = '" &ndateUntil & "' and "
                decHourlyRate='" & nHourlyRate & "'"

Thanks
Suresh

 
Old October 20th, 2004, 09:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Shoakat,
Quote:
quote:The data types are 50 and 19/18/2004
I don't see any datatype from your post or no mention about which varibale contains what...

Assuming things on my own, this might help you.
Code:
strUpdate = "update tblCustRate set dtRateFrom ='" & ndateFrom & "', dtRateTo = '"  & _ 
    ndateUntil & "', decHourlyRate=" & nHourlyRate
    Suresh,
AND shouldn't be used with the SET clause, instead COMMAs are used as delimiter between different COLUMNs and its values. AND is used only with WHERE CLAUSE for specifying Multiple expressions.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
VB Error: Syntax Error or Access Violation codehappy VB How-To 7 October 3rd, 2007 05:41 PM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





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