Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM SQL Server INSERT (easy question)

date posted 10th July 2001 12:36

Norman,

Try using a datetime data type for the table column instead.

Cheers,

Pete

_________________________________________

P e t e r E b d o n
Professional Software Engineering Ltd

Microsoft Certified Professional

Email : [EMAIL REMOVED]
Tel/Fax : +44(0)1235-227279
Mobile : +44(0)7973-178945
Web : www.pseltd.com

-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of Norman Beresford
Sent: 10 July 2001 11:38
To: [EMAIL REMOVED]
Subject: Re: FN-FORUM SQL Server INSERT (easy question)

Hi Carl

Thanks for that, the real problem I'm having is with the time though
I've converted the the dates as you suggested, but it's now giving me an
error with the time. I've attached the SQL, the ASP and the error message
at the end of this.

Norman

SQL

INSERT INTO motivaction ( motiveTitle, motiveForename, motiveSurname,
motiveOrganisation, motiveAddress, motivePostcode, motiveTelephone,
motiveEmail, motiveContactMethod, motiveDate, motiveStart, motiveFinish,
motiveVenue, motiveGuests, motivePackageID, motiveDateBooked)
VALUES ('Miss', 'Belinda', 'Beresford', 'Private Individual', '105 Houblon
RoadRichmondSurrey', 'TW10 6DB', '020 8241 2222,
[EMAIL REMOVED] 'Email', 'Tuesday, September 10, 2002', '21:00',
'23:30', 'Back garden', 68, 11, 'Tuesday, July 10, 2001');

ASP

thisSQL = _
"INSERT INTO motivaction ( motiveTitle, motiveForename, motiveSurname,
motiveOrganisation, motiveAddress, motivePostcode, motiveTelephone,
motiveEmail, motiveContactMethod, motiveDate, motiveStart, motiveFinish,
motiveVenue, motiveGuests, motivePackageID, motiveDateBooked)" & _
" VALUES ('" & bookingTitle & "', '" & bookingForename & "', '" &
bookingSurname & "', '" & bookingOrg & "', '" & bookingAddress & "', '" &
bookingPostCode & "', '" & bookingTelephone & "', '" & bookingEmail & "', '"
& bookingContactMethod & "', '" & formatdatetime(bookingDate,vbLongDate) &
"', '" & formatdatetime(bookingTimeStart,VBShortTime) & "', '" &
formatdatetime(bookingTimeFinish,VBShortTime) & "', '" & bookingVenue & "',
" & bookingNumbers & ", " & packageID & ", '" &
formatdatetime(bookingDateBooked,vbLongDate) & "');"

Error message

Server: Msg 295, Level 16, State 3, Line 1
Syntax error converting character string to smalldatetime data type.



============================================================

* Free listing for freelancers
* Free to advertise jobs
* Free jobs distribution service
* Free database of 1000 freelancers

Freelancers and Freelance Jobs
http://www.freelancers.net

To post to the Forum:
[EMAIL REMOVED]

To unsubscribe please email:
[EMAIL REMOVED]

If you have difficulties unsubscribing please email:
[EMAIL REMOVED]

To subscribe to the digest for this list or for further information please
visit:
http://www.freelancers.net/forum.html



Messages by Day
July 31st 2001
July 30th 2001
July 29th 2001
July 28th 2001
July 27th 2001
July 26th 2001
July 25th 2001
July 24th 2001
July 23rd 2001
July 22nd 2001
July 21st 2001
July 20th 2001
July 19th 2001
July 18th 2001
July 17th 2001
July 16th 2001
July 15th 2001
July 14th 2001
July 13th 2001
July 12th 2001
July 11th 2001
July 10th 2001
July 9th 2001
July 8th 2001
July 7th 2001
July 6th 2001
July 5th 2001
July 4th 2001
July 3rd 2001
July 2nd 2001
July 1st 2001


Messages by Month
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000