Click to See Complete Forum and Search --> : vb-sql server date field problem:URGENT


soorajk
October 24th, 2001, 04:03 AM
in my vb application i am using DTPicker in forms.
when i am trying to insert datefield as dd/mm/yy format in my table
(sql server) through my vb application error is occured . the error is

error -2147217913 conversion of a char data type to a datetime data
type resulted in an out of datetime value

when i try to insert datefield on dd/mm/yyyy through query analyser there is
no problem

help me and send some soucecode to solve this problem in my vb application
its very urgent

Cakkie
October 24th, 2001, 08:15 AM
You must almways send your dates to SQL Server in the format that SQL Server knows, that is, the format defined in the local settings of your server machine. If it still fails, try passing the date in a form that it can't possibly make a mistake, like 'december 25 2001' or something.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook