Please could someone advise me as to why I am getting a error across a network on the following code? If I execute the code on a standalone machine there is no problem and it runs perfectly. When I try run it from another machine I get the followng error : (obviously the windows screen pops up "we have encountered an error and need to close") with this message : "Error signature modname:rpcrt4.dll" Please could someone assist?
Thanks Werner -
Private Sub Command2_Click()
-
DeleteFile App.Path & "\data\Report\1.xls"
-
'first
-
-
Command2.Visible = False
-
If Not Len(Text9.Text) < 1 Then
-
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + App.Path + "\data\adodb1.mdb"
-
Set DataGrid1.DataSource = Adodc1
-
SorSor = False
-
-
Adodc1.Recordset.Update
-
Text1.Enabled = 0: Text2.Enabled = 0: Text3.Enabled = 0
-
Text4.Enabled = 0: Text5.Enabled = 0: Text6.Enabled = 0
-
Text7.Enabled = 0
-
Toolbar1.Buttons.Item(1).Caption = "New"
-
Toolbar1.Buttons.Item(4).Enabled = True
-
-
End If
-
-
-
Dim cn As New ADODB.Connection
-
Dim oSchema As ADODB.Recordset
-
Dim rs As New ADODB.Recordset
-
Dim intFldCnt As Integer
-
Dim I As Integer
-
Dim j As Integer
-
Dim sngColWid As Single
-
-
-
Screen.MousePointer = vbHourglass
-
strDBName = App.Path & "\" & "\data\adodb1.mdb"
-
-
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBName & ";Persist Security Info=False"
-
cn.Open (strDBName)
-
Set oSchema = cn.OpenSchema(adSchemaTables)
-
-
Set Excel = New Excel.Application
-
Set eWorkBook = Excel.Workbooks.Add
-
-
-
Do Until oSchema.EOF
-
If InStr(oSchema!table_name, "MSys") = 0 Then
-
Set eWorkSheet = eWorkBook.Worksheets.Add
-
If InStr(oSchema!table_name, "/") <> 0 Then
-
eWorkSheet.Name = Replace(oSchema!table_name, "/", "-")
-
End If
-
-
rs.Open "select * from [" & oSchema!table_name & "]", cn
-
intFldCnt = rs.Fields.Count - 1
-
-
For I = 1 To intFldCnt
-
eWorkSheet.Cells(1, I) = rs.Fields(I).Name
-
If TextWidth(rs.Fields(I).Name) > sngColWid Then
-
sngColWid = TextWidth(rs.Fields(I).Name)
-
End If
-
Next I
-
eWorkSheet.Range("A1", "h1").Font.Bold = True
-
eWorkSheet.Range("h1", "h1").Font.Underline = True
-
eWorkSheet.Range("a1:e1500").HorizontalAlignment = "3"
-
eWorkSheet.Range("g1:g1500").HorizontalAlignment = "3"
-
eWorkSheet.Range("f1:f1500").HorizontalAlignment = "2"
-
eWorkSheet.Cells(1, 1) = "Entry"
-
eWorkSheet.Cells(1, 2) = "Project"
-
eWorkSheet.Cells(1, 3) = "VAT"
-
eWorkSheet.Cells(1, 4) = "Cost Code"
-
eWorkSheet.Cells(1, 5) = "Date / Ref"
-
eWorkSheet.Cells(1, 6) = "Description"
-
eWorkSheet.Cells(1, 7) = "Amount"
-
eWorkSheet.Cells(1, 8) = Label5.Caption
-
eWorkSheet.Columns(1).ColumnWidth = "7"
-
eWorkSheet.Columns(2).ColumnWidth = "10"
-
eWorkSheet.Columns(3).ColumnWidth = "10"
-
eWorkSheet.Columns(4).ColumnWidth = "10"
-
eWorkSheet.Columns(5).ColumnWidth = "15"
-
eWorkSheet.Columns(6).ColumnWidth = "50"
-
eWorkSheet.Columns(7).ColumnWidth = "15"
-
eWorkSheet.Columns(8).ColumnWidth = "12"
-
-
j = 2
-
Do Until rs.EOF
-
For I = 1 To intFldCnt
-
eWorkSheet.Cells(j, I) = rs.Fields(I).Value
-
Next I
-
j = j + 1
-
rs.MoveNext
-
Loop
-
rs.Close
-
Debug.Print oSchema!table_name
-
End If
-
oSchema.MoveNext
-
Loop
-
-
-
eWorkBook.SaveAs App.Path & "\data\Report\1.xls"
-
Screen.MousePointer = vbNormal
-
Exit Sub
-
-
End Sub
4 1708
Have you installed th eprogram or simply running the exe ?
Do you have data directory in the application path in all the systems ?
Have you installed th eprogram or simply running the exe ?
Do you have data directory in the application path in all the systems ?
Simply running the exe. Yes, the whole exe uses App.Path & "\" & " to identify paths. The rest of the application reads/writes back to the path wiithout problem, just this execution has a problem.
Simply running the exe. Yes, the whole exe uses App.Path & "\" & " to identify paths. The rest of the application reads/writes back to the path wiithout problem, just this execution has a problem.
The data directory is on 1 specific machine with the exe running on other machines. The other data is read/write back no problem.
The data directory is on 1 specific machine with the exe running on other machines. The other data is read/write back no problem.
If the directory is in only one system how can you specify app.path
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Alex Ang |
last post by:
I have written the following VBScript program. It is stored into a
file "map_drive.vbs". It successfully mapped to a network drive
\\server1\data.
Dim WshNetwork
Set WshNetwork =...
|
by: stanley j Mroczek |
last post by:
Every thing is on one machine, Programs and sql. Sql is up
and running(can test with query analyzer). No changes
where made! This was working fine. How do you track this
error? What network...
|
by: SteveS |
last post by:
Hello all. This problem is stumping me.... I run a page called
"default.aspx". For some reason when I execute this page, I get the error
below. It seems to run through the entire code behind...
|
by: stan |
last post by:
I have .net 2003 and SQL 2000 setup on one system. All I
have is one computer (no network). I am able to get to
the internet that works. I can run SQL Query Analyzer and
it works. The program was...
|
by: Oliver |
last post by:
Hello,
I may have posted in the wrong place, if so, feel free to move my post (just
notify me where you put it via email or something)
I’m having a problem with my program that I cant...
|
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...
|
by: Yong |
last post by:
I'm not getting any reply to my previous thread so I'm stating a new one.
I get a General Network Error due to my SqlCommand object not having a big
enough CommandTimeout to complete very long...
|
by: johnkamal |
last post by:
Hi,
Some times while opening a page, I am getting the following error message, Please help me to rectify the problem.
Server Error in '/' Application.
General network error. Check your...
|
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...
|
by: Ryan Liu |
last post by:
Hi,
I have a 100 clients/ one server application, use ugly one thread pre client
approach. And both side user sync I/O.
I frequently see the error on server side(client side code is same, but...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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...
|
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: 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,...
| |