Hi,
The display of the data columns are being shown in the correct culture (The DataGrid seems to do that automatically). My problem was getting a date taken from a DateTimePicker to be in the correct culture so I could use it in a WHERE clause.
I figured out that I can use a parameterised SQL statement like "WHERE SOMEDATE BETWEEN @SomeDateFrom AND @SomeDateTo" and use IDbDataParameter to populate the parameters (I used to build the WHERE clause so that it was passed to the DB with hardcoded values from variables but this means the DB has to recalculate the execution path every time and it did not work properly with dates of different cultures). It seems it does not matter what the culture of the DateTime that is used to create the IDbDataParameter parameter is when done this way.
Thanks for your reply,
Andrew
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement