Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello all,

 

I have problems when trying to update a date type field in a MS Access database with VB and ASP.NET OleDb.OleDbCommand. I am using the following update statement:

 

Update [sMD plans] SET [Produced quantity]='123' WHERE (Product='345') and (shift='1') and (date=#02/01/2001#)

 

Normally the date standart in my locale is dd.mm.yyyy, but if I send the date in this format to the database it returns an error. It accepts it only in format mm/dd/year. The database is on the same computer I am writing the code, and its default locale settings are for date format dd.mm.yyyy. Also I get the date in this format when I use DateTime.Now.ToShortDateString().

Because of this, when I want to update a date field, I have to make a special string operations to update my field.

The culture property of my web page is set to BG-BG.

 

Thanks,

Aleksander

Posted

Hi,

Unless you use parameters for your updates you have to provide the dates the (US) standard way "mm/dd/yy".

That's as localized as it gets.

 

HTH

/Kejpa

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...