dubt on insert

User avatar
sal21
GoldLounger
Posts: 3289
Joined: 26 Apr 2010, 17:36

dubt on insert

Post by sal21 »

in my sql i use

...,#" & MIA_DATA & "#,...

but

'" & MIA_DATA & "'

it's the same?

note:
MIA_DATA is dimensioned as Date

User avatar
HansV
Administrator
Posts: 68783
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: dubt on insert

Post by HansV »

If the table resides in an Access database, you should use

Code: Select all

...,#" & Format(MIA_DATA, "yyyy-mm-dd") & "#,...
But if the table resides in a SQL Server database, you should use

Code: Select all

...,'" & Format(MIA_DATA, "yyyy-mm-dd") & "',...
Regards,
Hans