Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    10

    Arrow Unanswered: 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 Thumbnails Attached Thumbnails autmn_err.jpg  

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Did you install this application or is it vbscript ?

  3. #3
    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

  4. #4
    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

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •