[thelist] SQL Server smalldatetime field problems

Norman Beresford n.beresford at anansi.co.uk
Tue Jul 10 08:48:10 CDT 2001


Hi Steve,

Sorry for that mistake, I cut and pasted the table defination at one point
and the SQL statement at another. I've now changed the LCID of the page to
the UK one (although I've also tried it without this and I'm still getting
the same error), and the datatypes and datetimeformat are both short.
However I now get a different error message :(

Norman

The table

motiveID int 4 10 0 0  1 1 1 0
motiveTitle varchar 50 0 0 0  0   0
motiveForename varchar 50 0 0 0  0   0
motiveSurname varchar 50 0 0 0  0   0
motiveOrganisation varchar 50 0 0 0 ('Private Individual') 0   0
motiveAddress varchar 250 0 0 0  0   0
motivePostCode varchar 10 0 0 0  0   0
motiveTelephone varchar 50 0 0 0  0   0
motiveEmail varchar 50 0 0 0  0   0
motiveContactMethod char 4 0 0 0  0   0
motiveDate smalldatetime 4 0 0 0  0   0
motiveStart smalldatetime 4 0 0 0  0   0
motiveFinish smalldatetime 4 0 0 0  0   0
motiveVenue varchar 50 0 0 0  0   0
motiveGuests int 4 10 0 0  0   0
motivePackageID smallint 2 5 0 0  0   0
motiveDateBooked smalldatetime 4 0 0 0  0   0



The 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
ROad<BR>Richmond<BR>Surrey', 'TW10 6DB', '020 8241 9683',
'n.beresford at anansi.co.uk', 'Email', '10/09/02', '21:00', '23:30', 'Back
garden', 68, 11, '10/07/01');


The error

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.





More information about the thelist mailing list