473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Culture and date related problems

Hello,
I have simple Access database, and simple asp.net page with datagrid.
My Regional Settings are set to Serbian (Latin).

When I populate datagrid dates are showed in american format
mm/dd/yyyy. I wanted it in Serbian: dd.mm.yyyy, so I set ---
culture="sr-SP-Latn" uiCulture="sr-SP-Latn"--- in web.config. I worked
nicely.

Later on I added another form for inserting data in database. I used
something like
************************************************** ******************************
Dim aktuelnaOd, aktuelnaDo As Date
Dim naslov As String
Dim intro As String
Dim novost As String

aktuelnaOd = txtAktuelnaOd.Text
aktuelnaDo = txtAktuelnaDo.Text
naslov = txtNaslov.Text
intro = txtIntro.Text
novost = txtNovost.Text

Dim myExecuteQuery As String = "INSERT INTO tblLITNovosti
(NovostDatumOd, NovostDatumDo, NovostNaslov, NovostIntro, Novost)
Values ('" & aktuelnaOd & "', '" & aktuelnaDo & "', '" & naslov & "',
'" & intro & "', '" & novost & "')"
Dim myCommand As New OleDb.OleDbCommand(myExecuteQuery,
conn)

conn.Open()
myCommand.ExecuteNonQuery()
conn.Close()
************************************************** ******************************

And I got "Data type mismatch in criteria expression." AS SOON AS I
REMOVE culture info from web.config this works!!!

What to do?

Dec 2 '05 #1
0 842

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dejan Vesic | last post by:
I found nasty "documentation" bug; ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemglobalizationcultureinfoclasstopic.htm claims that proper culture info name for Serbian (Cyrillic) - Serbia...
2
by: Aliasgar Pocketwala | last post by:
Hi, I have an asp.net application that is using the wrong culture. I cant figure out where does it get its setting from. My web application runs as a specific user since so that I can give it...
4
by: David Mc | last post by:
We recently installed the 1.1 redist of .Net on a new server. Only after installing .Net did I realize that the regional settings of the server had not been localized. The application we have...
1
by: Ya Ya | last post by:
I am developing a DLL (class library) for a web application of mine. In the web.config of the web application I have set: culture="en-GB" uiCulture="en" in order that the date format will be...
0
by: gauthier | last post by:
Hi, I'm developing a web application available in multiple languages. When we switch language (via a drop down list), we switch the culture of the current thread: ...
6
by: Mike9900 | last post by:
Hello, I want to view the calendar in another culture, for example let it show in Arabic. I use this code in the Main, but the calendar is still in the same culture: CultureInfo sa = new...
5
by: Robert W. | last post by:
My app runs perfectly when run in Canada or the U.S. But others are experiencing problems. So I switched my computer to the UK culture and immediately saw a problem. This line was failing: ...
2
by: marcussilfver | last post by:
I want to change the culture on a DateTimePicker The code below works somewhat. I get the date in english format when dateTimePicker1 is not expanded. When I click dateTimePicker1 in my...
0
by: David | last post by:
Hi, We use an english version windows server. The regional setings are set to French (France). Asp.Net renders and interprets the date correctly (dd/mm/yyyy). So does Sql Server (date is saved...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.