Results 1 to 2 of 2

Thread: Error On someone elses' pc

  1. #1

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Error On someone elses' pc

    Wrote a client server app. VB front end SQL back end.
    Works fine on my PC.

    On other users PC...I have a combo box to select a customer.

    So once a customer is selected it is supposed to fill a site combo box which relates a site to a customer. So the click event of the customer is:

    VB Code:
    1. Private Sub cboCustomers_Click()
    2. On Error GoTo Err_Handler
    3. 'function fills all the site names for the customer
    4. Call FillSiteCBO
    5.  
    6. Done:
    7. Exit Sub
    8.  
    9. Err_Handler:
    10. MsgBox Err.Description, vbCritical, "Error #: " & Err.Number
    11. Resume Done
    12.  
    13. End Sub

    And FillSiteCBO looks like this:

    VB Code:
    1. Private Sub FillSiteCBO()
    2. On Error GoTo Err_Handler
    3.  
    4. Dim objRSFill As ADODB.Recordset
    5.  
    6. Call EstablishConnection
    7. Set objCmd = New ADODB.Command
    8. Me.cboSites.Clear
    9. objConn.CursorLocation = adUseClient
    10.  
    11.     With objCmd
    12.         .ActiveConnection = objConn
    13.         .CommandText = "select_sites_by_customer"       'our stored procedure is good_login
    14.         .CommandType = adCmdStoredProc          'its a stored procedure
    15.         .Parameters.Append .CreateParameter("CustomerID", adBigInt, adParamInput, , cboCustomers.ItemData(cboCustomers.ListIndex))
    16.         Set objRSFill = .Execute
    17.         Set objRSFill.ActiveConnection = Nothing
    18.         Call ReleaseConnection
    19.     End With
    20.  
    21.     If objRSFill.BOF Then
    22.         'do nothing
    23.     Else
    24.         Do Until objRSFill.EOF
    25.             cboSites.AddItem objRSFill.Fields("Name").Value
    26.             cboSites.ItemData(cboSites.NewIndex) = objRSFill.Fields("SiteID").Value
    27.             objRSFill.MoveNext
    28.         Loop
    29.     End If
    30.      
    31. Done:
    32. Set objCmd = Nothing
    33. Set objRSFill = Nothing
    34. Exit Sub
    35.  
    36. Err_Handler:
    37. MsgBox Err.Description, vbCritical, "Error #: " & Err.Number
    38. Resume Done
    39.  
    40. End Sub

    BUT every time another user besides myself runs this code they get:

    Error # -2147217872

    Type name is invalid

    I however do not get this error.

    Can anyone explain what the dilly is here?

    Thanks,
    Jon

  2. #2

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Resolved

    Resolved:

    MDAC Problems...

    http://www.microsoft.com/downloads/d...DisplayLang=en

    Farking MS.

    Jon

Posting Permissions

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



Click Here to Expand Forum to Full Width