473,804 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to remove the error couldn,t find file

198 New Member
the error on line
set dbmaster = workspaces(0).O pendatabase(sDi rFolder)
Expand|Select|Wrap|Line Numbers
  1. Dim dbmaster As DAO.Database
  2. Dim dbparent As DAO.Database
  3. Dim sDirFolder As String
  4. Dim sArrayFolder() As String
  5. Dim squery As String
  6. Dim icount As Integer
  7. Dim sTable As String
  8.  
  9. Set dbparent = Workspaces(0).OpenDatabase(txtparentMDBFile)
  10.  
  11. sDirFolder = Dir(txtchildMDBFile.Text & "\", vbDirectory)
  12. Do While sDirFolder <> ""
  13. If sDirFolder <> "." And sDirFolder <> ".." Then
  14. ReDim Preserve sArrayFolder(icount) As String
  15. sArrayFolder(icount) = sDirFolder
  16. icount = icount + 1
  17. lblmerge.Caption = "Directories Found="
  18. lblcount = icount
  19. End If
  20. sDirFolder = Dir()
  21. Loop
  22.  
  23. For icount = 0 To UBound(sArrayFolder())
  24. sDirFolder = Dir(txtchildMDBFile.Text & "\" & sArrayFolder(icount) & "\*.mdb", vbDirectory)
  25.  
  26. Do While sDirFolder <> ""
  27. If sDirFolder <> "." And sDirFolder <> ".." Then
  28. Set dbmaster = Workspaces(0).OpenDatabase(sDirFolder)
  29. sTable = Right(sDirFolder, InStrRev(sDirFolder, "\*.mdb"))
  30. sTable = Replace(sTable, ".mdb", "")
  31. sTable = "E" & sTable
  32. squery = " insert into " & txtparenttable & " IN '" & txtparentMDBFile & " ' select * from " & sTable
  33. dbparent.Execute (squery)
  34. End If
  35. sDirFolder = Dir()
  36. Loop
  37. Next
  38.  
Nov 14 '07 #1
6 1576
debasisdas
8,127 Recognized Expert Expert
Please check for existance of the file in the path.
Nov 14 '07 #2
veer
198 New Member
File is exsit
when it comes in sdirfolder database, it is not opening
will you please tell me wheather the DAO access the remotely access database because the folders data which i am accessing is not on my hard drive



Please check for existance of the file in the path.
Nov 14 '07 #3
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Remote Access...? Are the mdb's in the LAN Network or Remote URL..?
If in LAN, You should have Read/Write Access to the Shared Folder. and
It should look like this :

\\OtherCompName \SharedFoldName

Post the contents of txtchildMDBFile ..?

Regards
Veena
Nov 14 '07 #4
veer
198 New Member
the contents of txtchildmdbfile " Server:\YpData\ NewData\ multiple folder that i am accessing


Dim dbchild As DAO.Database
Dim dbparent As DAO.Database
Dim sDirFolder As String
Dim sArrayFolder() As String
Dim squery As String
Dim icount As Integer
Dim sTable As String
Set dbparent = Workspaces(0).O penDatabase(txt parentMDBFile)

sDirFolder = Dir(txtchildMDB File.Text & "\", vbDirectory)
Do While sDirFolder <> ""
If sDirFolder <> "." And sDirFolder <> ".." Then
ReDim Preserve sArrayFolder(ic ount) As String
sArrayFolder(ic ount) = sDirFolder
icount = icount + 1
lblmerge.Captio n = " Directories Found = "
lblcount = icount
End If
sDirFolder = Dir()
Loop

For icount = 0 To UBound(sArrayFo lder())
sDirFolder = Dir(txtchildMDB File.Text & "\" & sArrayFolder(ic ount) & "\*.mdb", vbDirectory)

Do While sDirFolder <> ""
If sDirFolder <> "." And sDirFolder <> ".." Then
Set dbmaster = Workspaces(0).O penDatabase(sDi rFolder)
sTable = Right(sDirFolde r, InStrRev(sDirFo lder, "\"))
sTable = Replace(sTable, ".mdb", "")
sTable = "V" & sTable
squery = " insert into " & txtparenttable & " IN '" & txtparentMDBFil e & " ' select * from " & sTable
dbparent.Execut e (squery)
End If
sDirFolder = Dir()
Loop
Next

thanks in advance


Hi,

Remote Access...? Are the mdb's in the LAN Network or Remote URL..?
If in LAN, You should have Read/Write Access to the Shared Folder. and
It should look like this :

\\OtherCompName \SharedFoldName

Post the contents of txtchildMDBFile ..?

Regards
Veena
Nov 14 '07 #5
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

No need to post whole of your Code Every time..

Can you run directly this from your system and see the Contents in this folder..?

Server:\YpData\ NewData\

How is the Sharing..? Read/Writ Enabled..?

Regards
Veena
Nov 14 '07 #6
veer
198 New Member
yes i am running directly from my system
but the code which i am accesing is on the 2nd system but i have both read and write permissions


Hi,

No need to post whole of your Code Every time..

Can you run directly this from your system and see the Contents in this folder..?

Server:\YpData\ NewData\

How is the Sharing..? Read/Writ Enabled..?

Regards
Veena
Nov 14 '07 #7

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

Similar topics

6
4025
by: rbazinet | last post by:
I have a VS 2003 C# project, web app with a bunch of DLL's. When I compile my project I often times get this message: Unexpected error creating debug information file 'C:\DevProjects\Allstar Admin\Allstar.Common.DataAccess\obj\Debug\Allstar.Common.DataAccess.PDB' -- 'C:\DevProjects\Allstar Admin\Allstar.Common.DataAccess\obj\Debug\Allstar.Common.DataAccess.pdb: The process cannot access the file because it is being used by another...
67
4288
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. Unfortunately these ad hominem rhetorts are frequently introduced into purely technical discussions on the feasibility of supporting such functionality in C++. That usually serves to divert the discussion from the technical subject to a discussion of the...
5
16461
by: richard | last post by:
I have a licensed MS Office 97 package which I have moved from PC to PC over the years and I have just bought a new machine with XP Pro on it, the latest release. When I install Office, I get the error "an error occurred at changing the workgroup database" and "setup couldn't create a system.mdw file....run the workgroup administrator before you run this appliaction (-1011). When I run the workgroup administrator (something I have never...
6
2020
by: Ben | last post by:
I am trying to migrate my vb6.0 over to vb.net. Here is the error that that I am stuck with: Public myDB As DAO.Database ..... path = System.IO.Path.GetFullPath("..") myDB = WS.OpenDatabase(path & "\access.MDB", False, True) 'after I've created my workspace where WS is my workspace, I opend it up and vb.net recognized it. DeckUsers = dbCycDeck.OpenRecordset("USERS")
6
2125
by: Mark | last post by:
How can I "Unbuild" a COM class? Basically, I used the "Build" command to register to COM Class. But I want to remove/unregister it. Thanks, Mark
6
693
by: fzhang | last post by:
I am relatively new to XML and C#. So, forgive me if this question is too newbie. :-) While assuming this is an easy programming task, I couldn't find a single reference anywhere for how to do it. Here is the situation: I am given an XML file like the one below from other group in my company to load the data into our database.
21
6899
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
61
3298
by: arnuld | last post by:
I have created a program which creates and renames files. I have described everything in comments. All I have is the cod-duplication. function like fopen, sprint and fwrite are being called again and again. I know to remove code-duplication I have to make functions and pass arguments to them but I am not able to think of a way doing it. Can you post some example for me, out of this code:
11
5031
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the database, in in both VB6 and VB.NET applications, I got the error "The Microsoft Jet database engine cannot find the input table or query 'myTable'. Make sure it exists and that its name is spelled correctly." Also, I got the error "The...
11
7434
by: ezechiel | last post by:
hi, I have the following error on a win server: "Invalid Top Directory perl/lib/file/find.pm line 598 Here's the code and I'll explain what I found until now: #!/usr/bin/perl # use strict; use warnings; use File::Find; use MSDOS::Attrib qw(get_attribs set_attribs);
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9593
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
9169
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
7633
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
6862
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
5529
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
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.