[AccessD] Technical test for developers

Gustav Brock gustav at cactus.dk
Wed May 14 10:53:45 CDT 2003


Hi Charlotte

Oops, Charlotte - totally confused after a hard night's sleep?

/gustav


> That's assuming that the date is being inserted is in US format already,
> as SQL requires.  If you format it, it may no longer be in US format.

> Charlotte Foust

> -----Original Message-----
> From: Shamil Salakhetdinov [mailto:shamil at smsconsulting.spb.ru] 
> Sent: Wednesday, May 14, 2003 2:30 AM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Technical test for developers

>> You might change your code in Access programming #2 to: db.Execute 
>> "INSERT INTO tblUpdateLog (ulDate, ulRecordCount ) VALUES ( #" & Date 
>> & "#, " & FlagCount & ") " which would show a lack of experience - and

>> then see if they change it to
>> use:
>> ---------------------------
>> Dim strSQL As String
>> strSQL = "INSERT INTO tblUpdateLog (ulDate, ulRecordCount ) VALUES ( 
>> #" & Date & "#, " & FlagCount & ") " db.Execute strSQL

> BTW, both are incorrect - instead of Date you should have used:

> Format(Date, "MM\/DD\/YYYY")

> or
> Format(Date, "YYYY\/MM\/DD")

> even this

> Format(Date, "DD\/MM\/YYYY")
> should work corectly if day number is greater than 12...

> Or was it a kind of trap-test?

> Shamil



More information about the AccessD mailing list