PC Review


Reply
Thread Tools Rate Thread

Application won't run in the US

 
 
John Dann
Guest
Posts: n/a
 
      8th Aug 2005
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
 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      8th Aug 2005
John,

I assume the problem is still your datetime
>
> 3. The database is queried for the last record (actually there's a
> datetime key field and it's queried for max(datetime));
>


Do you use in this step parameters.
See this sample on our site how to use them in OleDB with datetime

http://www.windowsformsdatagridhelp....3-eb8b44af0137

I hope this helps,

Cor


 
Reply With Quote
 
W.G. Ryan MVP
Guest
Posts: n/a
 
      8th Aug 2005
John:

First, about the OPening and Closing - the adapter will do this for you only
if the connection is closed when you fire the query. If it's open, then it
will stay open.

Second, if you can pull the data in in step 2 and send updates back, then I
doubt it's a format thing. It would be helpful to know the exact error
message you're getting. However if you can fill it and update it, I think
it's something else. Just to be sure, fire an ExecuteNonQuery and/or
ExectueScalar just to make sure you can fire the command with the Date field
in the restriction. You can also specify the currentculture
http://msdn.microsoft.com/library/de...reproperty.asp

and set it http://www.syncfusion.com/FAQ/aspnet/WEB_c12c.aspx

Let me konw if this doesn't fix it or if I misunderstood you.

Thanks,

Bill
"John Dann" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY keepout@yahoo.com.invalid Windows Vista General Discussion 15 16th Sep 2007 01:50 AM
Managed C++: The application failed to initialize properly (0xc000007b).Click on OK to terminate the application. Tommy Vercetti Microsoft VC .NET 4 23rd Mar 2005 08:19 PM
Fail in operating my hardware in web application , makes other windows application startup failure. Ryan.ZhYin Microsoft C# .NET 0 25th Jan 2005 08:34 AM
Please recommend book about design patterns for server application\distrubuted application Julia Microsoft C# .NET 2 11th Dec 2004 01:37 AM
Making more memory available to application?Im making a memory intense application, the application is supposed to open a prettylarge image (about 9200*10200 in 300Dpi) yosh@liquidzone.net Microsoft Dot NET Framework Forms 0 6th Dec 2004 07:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:15 PM.