473,378 Members | 1,411 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,378 software developers and data experts.

how to remove the error couldn,t find file

198 100+
the error on line
set dbmaster = workspaces(0).Opendatabase(sDirFolder)
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 1562
debasisdas
8,127 Expert 4TB
Please check for existance of the file in the path.
Nov 14 '07 #2
veer
198 100+
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 Expert 1GB
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 100+
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).OpenDatabase(txtparentMDBFile)

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

For icount = 0 To UBound(sArrayFolder())
sDirFolder = Dir(txtchildMDBFile.Text & "\" & sArrayFolder(icount) & "\*.mdb", vbDirectory)

Do While sDirFolder <> ""
If sDirFolder <> "." And sDirFolder <> ".." Then
Set dbmaster = Workspaces(0).OpenDatabase(sDirFolder)
sTable = Right(sDirFolder, InStrRev(sDirFolder, "\"))
sTable = Replace(sTable, ".mdb", "")
sTable = "V" & sTable
squery = " insert into " & txtparenttable & " IN '" & txtparentMDBFile & " ' select * from " & sTable
dbparent.Execute (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 Expert 1GB
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 100+
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
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...
67
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. ...
5
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...
6
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 =...
6
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
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...
21
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
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...
11
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...
11
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;...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.