VS.NET 2002 and 2003 are installed.
..NET Framework 1.0 and 1.1 installed
Program running under VisualBasic.NET 2002 with .NET Framwork 1.0
I am experiencing a problem with ADO.NET where the Connection object
(OleDBConnection) will not Open (conIncident.Open) given the following
situation:
1. Program is loaded and connection is established to Access database on C:
2. Able to manipulate and view the data in the database with no problems
3. Use the OpenFileDialog to select a file in A: from which to merge data
to the database on C: (The file on A: is a text file which is parsed to
merge data into the database on C:)
4. After the merge, remove the Floppy disk from A:
5. Now, whenever I try to perform an operation on the database, I get the
following error message: "Disk or network error. Microsoft JET Database
Engine"
6. If I insert the disk, then I am able to perform database operations on
C: with no problems, except that it keeps checking A: for a disk.
Other things that I found include:
A) If I select a file in A: using the OpenFileDialog, hit OK to select the
file, then do NOT perform the merge operation, I still get the error.
B) If I select a file in A: using the OpenFileDialog then hit Cancel, the
error will not appear.
C) If I do not use the OpenFileDialog and hardcode the path to A: and
perform the merge with this, then I will not get any errors.
Given what I have found so far, there appears to be a problem with the
OpenFileDialog and Access database programming with ADO.NET. Has anybody
experienced this type of bevavior before, and if so, is there a solution?
Thanks,
Jody 3 2894
Hi Jody,
How do you read the data from A:? Do you close the stream?
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com www.rhand.com
"Jody Gelowitz" <jo**@mail.visualstatement.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... VS.NET 2002 and 2003 are installed. .NET Framework 1.0 and 1.1 installed Program running under VisualBasic.NET 2002 with .NET Framwork 1.0
I am experiencing a problem with ADO.NET where the Connection object (OleDBConnection) will not Open (conIncident.Open) given the following situation:
1. Program is loaded and connection is established to Access database on
C: 2. Able to manipulate and view the data in the database with no problems 3. Use the OpenFileDialog to select a file in A: from which to merge data to the database on C: (The file on A: is a text file which is parsed to merge data into the database on C:) 4. After the merge, remove the Floppy disk from A: 5. Now, whenever I try to perform an operation on the database, I get the following error message: "Disk or network error. Microsoft JET Database Engine" 6. If I insert the disk, then I am able to perform database operations on C: with no problems, except that it keeps checking A: for a disk.
Other things that I found include:
A) If I select a file in A: using the OpenFileDialog, hit OK to select
the file, then do NOT perform the merge operation, I still get the error.
B) If I select a file in A: using the OpenFileDialog then hit Cancel, the error will not appear.
C) If I do not use the OpenFileDialog and hardcode the path to A: and perform the merge with this, then I will not get any errors.
Given what I have found so far, there appears to be a problem with the OpenFileDialog and Access database programming with ADO.NET. Has anybody experienced this type of bevavior before, and if so, is there a solution?
Thanks, Jody
"Jody Gelowitz" <jo**@mail.visualstatement.com> wrote in
news:#5**************@TK2MSFTNGP12.phx.gbl: VS.NET 2002 and 2003 are installed. .NET Framework 1.0 and 1.1 installed Program running under VisualBasic.NET 2002 with .NET Framwork 1.0
I am experiencing a problem with ADO.NET where the Connection object (OleDBConnection) will not Open (conIncident.Open) given the following situation:
1. Program is loaded and connection is established to Access database on C: 2. Able to manipulate and view the data in the database with no problems 3. Use the OpenFileDialog to select a file in A: from which to merge data to the database on C: (The file on A: is a text file which is parsed to merge data into the database on C:) 4. After the merge, remove the Floppy disk from A: 5. Now, whenever I try to perform an operation on the database, I get the following error message: "Disk or network error. Microsoft JET Database Engine" 6. If I insert the disk, then I am able to perform database operations on C: with no problems, except that it keeps checking A: for a disk.
Other things that I found include:
A) If I select a file in A: using the OpenFileDialog, hit OK to select the file, then do NOT perform the merge operation, I still get the error.
B) If I select a file in A: using the OpenFileDialog then hit Cancel, the error will not appear.
C) If I do not use the OpenFileDialog and hardcode the path to A: and perform the merge with this, then I will not get any errors.
Given what I have found so far, there appears to be a problem with the OpenFileDialog and Access database programming with ADO.NET. Has anybody experienced this type of bevavior before, and if so, is there a solution?
Jody,
By default, OpenFileDialog changes the current directory when a file
is selected. Set the dialog's RestoreDirectory to true to avoid this
behavior.
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc. http://www.crtimmonsinc.com/
Thanks.
Setting RestoreDirectory = True fixed the problem.
Jody
"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xn**********************************@207.46.2 48.16... "Jody Gelowitz" <jo**@mail.visualstatement.com> wrote in news:#5**************@TK2MSFTNGP12.phx.gbl:
VS.NET 2002 and 2003 are installed. .NET Framework 1.0 and 1.1 installed Program running under VisualBasic.NET 2002 with .NET Framwork 1.0
I am experiencing a problem with ADO.NET where the Connection object (OleDBConnection) will not Open (conIncident.Open) given the following situation:
1. Program is loaded and connection is established to Access database on C: 2. Able to manipulate and view the data in the database with no problems 3. Use the OpenFileDialog to select a file in A: from which to merge data to the database on C: (The file on A: is a text file which is parsed to merge data into the database on C:) 4. After the merge, remove the Floppy disk from A: 5. Now, whenever I try to perform an operation on the database, I get the following error message: "Disk or network error. Microsoft JET Database Engine" 6. If I insert the disk, then I am able to perform database operations on C: with no problems, except that it keeps checking A: for a disk.
Other things that I found include:
A) If I select a file in A: using the OpenFileDialog, hit OK to select the file, then do NOT perform the merge operation, I still get the error.
B) If I select a file in A: using the OpenFileDialog then hit Cancel, the error will not appear.
C) If I do not use the OpenFileDialog and hardcode the path to A: and perform the merge with this, then I will not get any errors.
Given what I have found so far, there appears to be a problem with the OpenFileDialog and Access database programming with ADO.NET. Has anybody experienced this type of bevavior before, and if so, is there a solution?
Jody,
By default, OpenFileDialog changes the current directory when a file is selected. Set the dialog's RestoreDirectory to true to avoid this behavior.
Hope this helps.
Chris. ------------- C.R. Timmons Consulting, Inc. http://www.crtimmonsinc.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bobrad |
last post by:
MAYBE SOMEBODY CAM HELP
I AM USING THE FOLLOWING CODE TO GET A LOCATION OF A FILE IN A WINFORM
DIALOG
OpenFileDialog openFileDialog = new...
|
by: don |
last post by:
has anyone experienced problems with interactions between OpenFileDialog and FileStream? When I select "open" from an OpenFileDialog the subsequent...
|
by: Nagachandra Sekhar Grandhi |
last post by:
I am facing a problem with OpenFileDialog. It is as follows.
I opened OpenFileDialog dialog box and selected a folder in it. After
selecting the...
|
by: e-mid |
last post by:
why does not openFileDialog have closed event?
i want to do something; as soon as the dialog closes. is there a way to do
this?
|
by: barbara_dave |
last post by:
Hi, All,
I want to use the openfiledialog to open different extension files in
different directory( only one type files at one time). I set the...
|
by: marcus.kwok |
last post by:
I am having a weird problem and I have can't figure out why it is
happening. I create an OpenFileDialog and set a filename filter. When
the...
|
by: sam |
last post by:
OpenFileDialog appears to be "holding onto" the parent folder of a
selected file until the application using the dialog quits.
After creating a...
|
by: Martijn Mulder |
last post by:
It strikes me that System.Windows.Forms.OpenFileDialog seems te
'remember' which directory it was in last, even when a new
OpenFileDialog-object is...
|
by: mbewers1 |
last post by:
Hi
I'm having a problem trying to get a customised OpenFileDialog() to fulfil my requirements.
The code for this custom-built dialog has been...
|
by: tammygombez |
last post by:
Hey fellow JavaFX developers,
I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
|
by: tammygombez |
last post by:
Hey everyone!
I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |