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:
Private Sub cboCustomers_Click() On Error GoTo Err_Handler 'function fills all the site names for the customer Call FillSiteCBO Done: Exit Sub Err_Handler: MsgBox Err.Description, vbCritical, "Error #: " & Err.Number Resume Done End Sub
And FillSiteCBO looks like this:
VB Code:
Private Sub FillSiteCBO() On Error GoTo Err_Handler Dim objRSFill As ADODB.Recordset Call EstablishConnection Set objCmd = New ADODB.Command Me.cboSites.Clear objConn.CursorLocation = adUseClient With objCmd .ActiveConnection = objConn .CommandText = "select_sites_by_customer" 'our stored procedure is good_login .CommandType = adCmdStoredProc 'its a stored procedure .Parameters.Append .CreateParameter("CustomerID", adBigInt, adParamInput, , cboCustomers.ItemData(cboCustomers.ListIndex)) Set objRSFill = .Execute Set objRSFill.ActiveConnection = Nothing Call ReleaseConnection End With If objRSFill.BOF Then 'do nothing Else Do Until objRSFill.EOF cboSites.AddItem objRSFill.Fields("Name").Value cboSites.ItemData(cboSites.NewIndex) = objRSFill.Fields("SiteID").Value objRSFill.MoveNext Loop End If Done: Set objCmd = Nothing Set objRSFill = Nothing Exit Sub Err_Handler: MsgBox Err.Description, vbCritical, "Error #: " & Err.Number Resume Done 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




Reply With Quote