J
John Dann
I have a vb.net application that uses ado.net to populate an Access
database that the program itself creates. This was developed using a
UK locale and runs fine on several PCs/Windows versions using UK
locale. However a couple of US-based beta testers are finding that the
program is raising major errors that seem to involve the database. A
typical scenario seems to be:
1. An empty Access database is created using ADOX and closed;
2. A dataset is created in memory and used to update the database via
a data-adapter;
3. The database is queried for the last record (actually there's a
datetime key field and it's queried for max(datetime));
The error on US machines seems to be that the database is still open
at step 3 despite using the da, which I though automatically opened
and closed the database as needed.
I can't be sure at this stage that the bug is locale-related but if
not it's certainly a big coincidence. Unfortunately I don't seem to be
able to replicate the bug by temporarily switching a UK-locale PC to
US-locale.
I realise this is a pretty broad question, but can anyone think of any
general reason - anywhere to begin hunting down the bug - why this
might be happening? Of course as soon as I mention datetime, there's
the possibility of culture/format differences. But there's nowhere in
the program where the datetime is parsed from the local format.
There are a couple of places where a new datetime is set from:
datetime = New Date(year, month, day etc)
but I'm assuming that this is a culture-independent construction.
Thanks
JGD
database that the program itself creates. This was developed using a
UK locale and runs fine on several PCs/Windows versions using UK
locale. However a couple of US-based beta testers are finding that the
program is raising major errors that seem to involve the database. A
typical scenario seems to be:
1. An empty Access database is created using ADOX and closed;
2. A dataset is created in memory and used to update the database via
a data-adapter;
3. The database is queried for the last record (actually there's a
datetime key field and it's queried for max(datetime));
The error on US machines seems to be that the database is still open
at step 3 despite using the da, which I though automatically opened
and closed the database as needed.
I can't be sure at this stage that the bug is locale-related but if
not it's certainly a big coincidence. Unfortunately I don't seem to be
able to replicate the bug by temporarily switching a UK-locale PC to
US-locale.
I realise this is a pretty broad question, but can anyone think of any
general reason - anywhere to begin hunting down the bug - why this
might be happening? Of course as soon as I mention datetime, there's
the possibility of culture/format differences. But there's nowhere in
the program where the datetime is parsed from the local format.
There are a couple of places where a new datetime is set from:
datetime = New Date(year, month, day etc)
but I'm assuming that this is a culture-independent construction.
Thanks
JGD