Avatar of andyw27
andyw27

asked on 

Problems inserting date field to MS SQL 2008 Server

Hello,

I have the following code, but it keeps giving me the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.

myDateString = Date()
 
strSQL = "INSERT INTO tbl_image_material( upload_date, image_link, filename, file_size, type, image_desc, front_image, material_id_FK) VALUES('" & myDateString & "', '" & strPath & "', '" & objUpload(i).FileExt & "' , '" & fileszie & "', '" & type1 & "', '" & image_desc & "', '" & front_image & "', '" & material_id_FK & "')"
		Conn.Execute(strSQL)

Open in new window

ASP

Avatar of undefined
Last Comment
Wayne Barron

8/22/2022 - Mon