473,406 Members | 2,377 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,406 software developers and data experts.

VB6 Network Error

104 100+
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
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command2_Click()
  2. DeleteFile App.Path & "\data\Report\1.xls"
  3. 'first
  4.  
  5. Command2.Visible = False
  6. If Not Len(Text9.Text) < 1 Then
  7.                     Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + App.Path + "\data\adodb1.mdb"
  8.                     Set DataGrid1.DataSource = Adodc1
  9.                     SorSor = False
  10.  
  11.                     Adodc1.Recordset.Update
  12.                     Text1.Enabled = 0: Text2.Enabled = 0: Text3.Enabled = 0
  13.                     Text4.Enabled = 0: Text5.Enabled = 0: Text6.Enabled = 0
  14.                     Text7.Enabled = 0
  15.                     Toolbar1.Buttons.Item(1).Caption = "New"
  16.                     Toolbar1.Buttons.Item(4).Enabled = True
  17.  
  18.                 End If
  19.  
  20.  
  21.     Dim cn As New ADODB.Connection
  22.     Dim oSchema As ADODB.Recordset
  23.     Dim rs As New ADODB.Recordset
  24.     Dim intFldCnt As Integer
  25.     Dim I As Integer
  26.     Dim j As Integer
  27.     Dim sngColWid As Single
  28.  
  29.  
  30.     Screen.MousePointer = vbHourglass
  31.     strDBName = App.Path & "\" & "\data\adodb1.mdb"
  32.  
  33.     cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBName & ";Persist Security Info=False"
  34.     cn.Open (strDBName)
  35.     Set oSchema = cn.OpenSchema(adSchemaTables)
  36.  
  37.     Set Excel = New Excel.Application
  38.     Set eWorkBook = Excel.Workbooks.Add
  39.  
  40.  
  41.     Do Until oSchema.EOF
  42.         If InStr(oSchema!table_name, "MSys") = 0 Then
  43.             Set eWorkSheet = eWorkBook.Worksheets.Add
  44.             If InStr(oSchema!table_name, "/") <> 0 Then
  45.                 eWorkSheet.Name = Replace(oSchema!table_name, "/", "-")
  46.             End If
  47.  
  48.             rs.Open "select * from [" & oSchema!table_name & "]", cn
  49.             intFldCnt = rs.Fields.Count - 1
  50.  
  51.             For I = 1 To intFldCnt
  52.                 eWorkSheet.Cells(1, I) = rs.Fields(I).Name
  53.                 If TextWidth(rs.Fields(I).Name) > sngColWid Then
  54.                     sngColWid = TextWidth(rs.Fields(I).Name)
  55.                 End If
  56.             Next I
  57.             eWorkSheet.Range("A1", "h1").Font.Bold = True
  58.             eWorkSheet.Range("h1", "h1").Font.Underline = True
  59.             eWorkSheet.Range("a1:e1500").HorizontalAlignment = "3"
  60.             eWorkSheet.Range("g1:g1500").HorizontalAlignment = "3"
  61.             eWorkSheet.Range("f1:f1500").HorizontalAlignment = "2"
  62.             eWorkSheet.Cells(1, 1) = "Entry"
  63.             eWorkSheet.Cells(1, 2) = "Project"
  64.             eWorkSheet.Cells(1, 3) = "VAT"
  65.             eWorkSheet.Cells(1, 4) = "Cost Code"
  66.             eWorkSheet.Cells(1, 5) = "Date / Ref"
  67.             eWorkSheet.Cells(1, 6) = "Description"
  68.             eWorkSheet.Cells(1, 7) = "Amount"
  69.             eWorkSheet.Cells(1, 8) = Label5.Caption
  70.             eWorkSheet.Columns(1).ColumnWidth = "7"
  71.             eWorkSheet.Columns(2).ColumnWidth = "10"
  72.             eWorkSheet.Columns(3).ColumnWidth = "10"
  73.             eWorkSheet.Columns(4).ColumnWidth = "10"
  74.             eWorkSheet.Columns(5).ColumnWidth = "15"
  75.             eWorkSheet.Columns(6).ColumnWidth = "50"
  76.             eWorkSheet.Columns(7).ColumnWidth = "15"
  77.             eWorkSheet.Columns(8).ColumnWidth = "12"
  78.  
  79.             j = 2
  80.             Do Until rs.EOF
  81.                 For I = 1 To intFldCnt
  82.                     eWorkSheet.Cells(j, I) = rs.Fields(I).Value
  83.                 Next I
  84.                 j = j + 1
  85.                 rs.MoveNext
  86.             Loop
  87.             rs.Close
  88.             Debug.Print oSchema!table_name
  89.         End If
  90.         oSchema.MoveNext
  91.     Loop
  92.  
  93.  
  94.     eWorkBook.SaveAs App.Path & "\data\Report\1.xls"
  95.     Screen.MousePointer = vbNormal
  96.     Exit Sub
  97.  
  98. End Sub
Feb 6 '08 #1
4 1708
debasisdas
8,127 Expert 4TB
Have you installed th eprogram or simply running the exe ?

Do you have data directory in the application path in all the systems ?
Feb 6 '08 #2
Wernerh
104 100+
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.
Feb 6 '08 #3
Wernerh
104 100+
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.
Feb 6 '08 #4
debasisdas
8,127 Expert 4TB
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
Feb 6 '08 #5

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

Similar topics

8
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 =...
2
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...
2
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...
7
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...
0
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...
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...
0
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...
0
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...
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...
1
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...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...

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.