If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Incompatible version of the RPC stub

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-03, 06:40
g_vijayanand g_vijayanand is offline
Registered User
 
Join Date: Nov 2003
Posts: 10
Arrow Incompatible version of the RPC stub

Hai,


Iam trying to upload data from Excel to Sql Server.
Iam not using DTS.

Code for the error goes like this


Dim xlapp As New Excel.Application
Dim xlbook As New Excel.Workbook
Dim xlsheet As New Excel.Worksheet

Private Sub btn_Upld_Click()
Set XlWBook = xlapp.Workbooks.Open(txtFileName.Text)

Set xlsheet = XlWBook.Worksheets(1)
:
:
:
:
:
...........
end sub

Previously the same code was working in a windows '98 machine as well as XP machine , now in Windows 'NT machine if executed, the file name of the application gets assigned to the workbook , the next line that sets the xlsheet to the workbooks(1) gives the error :

Runtime error -2147023067 (80070725) Incompatible version of the RPC stub


here,
vijayanand.g
Attached Images
File Type: jpg autmn_err.jpg (18.9 KB, 99 views)
Reply With Quote
  #2 (permalink)  
Old 11-25-03, 14:18
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Did you install this application or is it vbscript ?
Reply With Quote
  #3 (permalink)  
Old 11-25-03, 22:15
g_vijayanand g_vijayanand is offline
Registered User
 
Join Date: Nov 2003
Posts: 10
Hai rnealejr,


Remember me ? i posted a message for Connectivity of Sql Server Client and Server , it connected after giving the ip address of the Server in the Client Connectivity (Enterprise Manager).

Now iam facing this error from VISUAL BASIC 6.0 , iam trying to upload data from Visual Basic code to SQL Server, where in the data is in Microsoft Excel.

here,
vijayanand.g
Reply With Quote
  #4 (permalink)  
Old 11-25-03, 22:53
g_vijayanand g_vijayanand is offline
Registered User
 
Join Date: Nov 2003
Posts: 10
Hai rnealejr,


Dim xlapp As New Excel.Application
Dim xlWbook As New Excel.Workbook
Dim xlsheet As New Excel.Worksheet

Private Sub btn_Upld_Click()
Set xlWbook = xlapp.Workbooks.Open(txtFileName.Text)

Set xlsheet = xlWbook.Worksheets(1)

var_cnt_cl = 0
var_cnt_rw = 0 ' Counting the Number of Rows

For i = 1 To 255
If xlsheet.Cells(3, i) = "" Then
:
:
:
:
:
: : : : :
end if
next

-----> while accessing the sheet the Error Incompatible version of the RPC stub occurs .


here,
vijayanand.g
Reply With Quote
  #5 (permalink)  
Old 11-26-03, 15:14
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
The problem is that certain files from your xp machine were used when you created the package (instead of the vs distributable files). The following shows you which files you need to take care of:

link
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On