473,804 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

network or disk error

198 New Member
hello expert
i have an error network or disk erro when i accessed the foxpro file
and made another foxpro file


actually i am accessing a .dbf file and make modification through my programe and after modification the new file should be in .dbf but it generates the above error and when i access the same file and convert it into .rtf format it works


please provide some help
Feb 13 '08 #1
8 1683
debasisdas
8,127 Recognized Expert Expert
How are you trying to access the file ?
Feb 13 '08 #2
veer
198 New Member
ya i am accessing a dbf file


How are you trying to access the file ?
Feb 13 '08 #3
debasisdas
8,127 Recognized Expert Expert
Are you accessing that file through VB 6.0 ???
Feb 13 '08 #4
veer
198 New Member
YES I AM ACCESSING THE FILE THROUGH VB 6.0
THE CODE IS USED FOR OPENING AND CREATING THE FILE IS

Expand|Select|Wrap|Line Numbers
  1. Set dbMn = Workspaces(0).OpenDatabase(dbfpath & "\", False, False, "dBase IV")
  2. Set rsMn = dbMn.OpenRecordset("select * from " & dbfname)
  3. txtpth = dbfpath & "\" & Replace(UCase(dbfname), ".DBF", ".MDB")
  4. Open txtpth For Output As #1

Are you accessing that file through VB 6.0 ???
Feb 14 '08 #5
Killer42
8,435 Recognized Expert Expert
Expand|Select|Wrap|Line Numbers
  1. Set dbMn = Workspaces(0).OpenDatabase(dbfpath & "\", False, False, "dBase IV")
  2. Set rsMn = dbMn.OpenRecordset("select * from " & dbfname)
  3. txtpth = dbfpath & "\" & Replace(UCase(dbfname), ".DBF", ".MDB")
  4. Open txtpth For Output As #1
I have a few questions. I'm not familiar with using FoxPro from VB, so excuse me if they don't make sense.
  • Most importantly, which line produces the error?
  • Why are you trying (in line 4) to open an MDB file to write like a text file? That can't be a good idea.
  • Is the OpenDatabase method supposed to receive a folder as the first parameter, or the actual name of the DBF file?
Feb 14 '08 #6
veer
198 New Member
actually i am not going to make mdb file , i want to access dbf file and also create a new dbf file code looks like this
Expand|Select|Wrap|Line Numbers
  1. Set dbMn = Workspaces(0).OpenDatabase(dbfpath & "\", False, False, "dBase IV")
  2. Set rsMn = dbMn.OpenRecordset("select * from " & dbfname)
  3. txtpth = dbfpath & "\" & Replace(UCase(dbfname), ".DBF", "as.dbf")
  4. Open txtpth For Output As #1
  5.  
some time it produces the error at 2nd line "network or disk error"
and if i put some name like "as.dbf" it works but when i will open it in foxpro it shows that not a database file

thanks

I have a few questions. I'm not familiar with using FoxPro from VB, so excuse me if they don't make sense.
  • Most importantly, which line produces the error?
  • Why are you trying (in line 4) to open an MDB file to write like a text file? That can't be a good idea.
  • Is the OpenDatabase method supposed to receive a folder as the first parameter, or the actual name of the DBF file?
Feb 14 '08 #7
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Yes, when you are working with .dbf in DAO, you get this error.
Whatever Objects (Database, RecordSets, TableDefs, Fields) you Open, Make sure after the usage, you explicitly close them.

RST.Close
TD.Close
DB.Close

Otherwise, you keep getting this error.
Read this :
http://support.microsoft.com/kb/114771

Regards
Veena
Feb 14 '08 #8
Killer42
8,435 Recognized Expert Expert
actually i am not going to make mdb file , i want to access dbf file and also create a new dbf file code looks like this
Expand|Select|Wrap|Line Numbers
  1. Set dbMn = Workspaces(0).OpenDatabase(dbfpath & "\", False, False, "dBase IV")
  2. Set rsMn = dbMn.OpenRecordset("select * from " & dbfname)
  3. txtpth = dbfpath & "\" & Replace(UCase(dbfname), ".DBF", "as.dbf")
  4. Open txtpth For Output As #1
some time it produces the error at 2nd line "network or disk error"
and if i put some name like "as.dbf" it works but when i will open it in foxpro it shows that not a database file
I'm really confused about what you're doing here. It sounds as though you are mixing up database files with text files. If you use an Open ... For Output as in line 4 and write stuff to the file, I don't believe you will be able to subsequently access it as a dBase file. This may well be the cause of the "network or disk error" when trying to read the database table.

To write information to a database file/table, you need to use the database interface, the same as when you read it.
Feb 14 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

14
9753
by: David W. Fenton | last post by:
I'm no stranger to this error message, but I have a client who is experiencing it, but, fortunately, without any actual data corruption, and it's driving them made. Their inability to grasp that the cause is fundamentally a networking problem is also making me pull my hair out. Some history: The network is composed of five computers dating back to 1995, each purchased one at a time, and each having a different OS, etc. Until
1
6575
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted. TIA, Brian
1
4616
by: Kal | last post by:
Hello, System.Data.SqlClient.SqlException: General network error. Check your network documentation. What does this error means? My web app, suddenly started to show this error today in my production environment, beta environment, development environment, and also on my machine too. When i debugged the app, i see that the error is happening when the
10
6088
by: Shwetabh | last post by:
Hi I have written an application in VB through which I can convert DBASE IV database to MS SQL Server database. Also, the application provides database manipulation features to the user like addition, deletion etc of records. I am using OPENROWSET for conversion purposes. Also the server is MS SQL Server 2000. Now this application workks fine when I have installed the instance of MS SQL Server on my local machine. It converts the...
18
18755
by: NEWSGROUPS | last post by:
I work for a large organization were my team has developed 2 very substantial databases in Access 2000. These databases have been working fine for the last 6 years with minimal issues or problems. About 1 week ago today we have started experiencing the error "Microsoft Visual Basic Run Time Error 3043 Disk or Network Error" just about every day around the same time each day (activity starts to increase at this time in the databases)....
1
6886
by: Fernando Guerreiro | last post by:
Hi I'm getting the error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Disk or network error. This error started from nowhere, from one moment the web sites were working, and from 2 days ago stopped.
10
6167
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the front end db, everyone accesses the back-end db via a network share. To preface, non Terminal Server users (4 or 5 in office) never have this problem. There are two Terminal Servers running win 2000, both basically identical. This error affects...
5
1972
by: cj2 | last post by:
This code works: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols;
1
2408
by: jamesnkk | last post by:
Hi, I have an application written in VB6 with MS Access 2000 format. both application and MS Access Mdb are stored in the Network Map drive. I am using ADO to access the data. Sometime running the application it will display Disk Network Error, does anyone know what cause the problem ?
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.