473,395 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

network or disk error

198 100+
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 1662
debasisdas
8,127 Expert 4TB
How are you trying to access the file ?
Feb 13 '08 #2
veer
198 100+
ya i am accessing a dbf file


How are you trying to access the file ?
Feb 13 '08 #3
debasisdas
8,127 Expert 4TB
Are you accessing that file through VB 6.0 ???
Feb 13 '08 #4
veer
198 100+
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 Expert 8TB
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 100+
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 Expert 1GB
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 Expert 8TB
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
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...
1
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....
1
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...
10
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...
18
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....
1
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,...
10
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...
5
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...
1
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.