Hi,
One of our user did an insert statement in development server. The insert worked fine. However, when the same insert statement is executed in production server, he encountered the error below:
Error:.Net SqlClient Data Provider
Error Message: The conversion of char data type to a datetime data type resulted in an out-of-range
datetime value.
The statement has been terminated.
The insert statement is below:
Insert into tbl_SeatWave_customers
(Title, FirstName, Lastname, EmailAddress, HomeTelephone, Address1, Address2, Address3,
Town, County, Postcode, BuyerOrSeller, OrderID, ListingID, BestCallDateTimeFrom,
bestcalldatetimeto, FAQAsked, Comments, CallOutcome, Spare1, Spare2)
Values('Mr', 'Darren', 'Piper', '[email protected]', '07825758328', '7 RUSSELL ROAD',
'', '', '', 'CLWYD', 'LL18 3BS', 'Other', '', '', '19/06/2009', '12:00', '',
'Callers tickets have not yet arrived.', 'Resolved','Yes', '')
The table tbl_SeatWave_customers has the following structure:
COLUMN_NAME DATA_TYPE COLUMN_DEFAULT
NUID bigint NULL
CallDateTime datetime (getdate())
Title nvarchar NULL
FirstName nvarchar NULL
LastName nvarchar NULL
EmailAddress nvarchar NULL
HomeTelephone nvarchar NULL
MobileTelephone nvarchar NULL
WorkTelephone nvarchar NULL
Address1 nvarchar NULL
Address2 nvarchar NULL
Address3 nvarchar NULL
Address4 nvarchar NULL
Town nvarchar NULL
County nvarchar NULL
Postcode nvarchar NULL
BuyerOrSeller nvarchar NULL
OrderID nvarchar NULL
ListingID nvarchar NULL
BestCallDateTimeFrom datetime NULL
BestCallDateTimeTo datetime NULL
FAQAsked nvarchar NULL
Comments nvarchar NULL
Spare1 nvarchar NULL
Spare2 nvarchar NULL
Spare3 nvarchar NULL
Spare4 nvarchar NULL
Spare5 nvarchar NULL
CallOutcome nvarchar NULL
My question what is the cause of this error and what is the resolution to fix it?