Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am geting an Invalid procedure call or argument in my VB6 project would any one know why this is happening?
VB
Public Sub ValidDeptSect(sDept As String, sSect As String, DataBase As XDatabase)
  Dim sSelect As String
  Dim rsRecords As Object
  Dim eSave As SaveError
On Error Resume Next
  Call DataBase.SelectSnapshot(rsRecords, sSelect)
  
  If Err.Number = DB_NOTFOUND Then
    sSelect = "select * from DEPT_SECT WHERE " & _
      "DEPT_NO = '" & sDept & "'"
      
    Call DataBase.SelectSnapshot(rsRecords, sSelect)
If Err.Number = DB_NOTFOUND Then
      On Error GoTo 0
      Err.Raise INV_DEPTSECT, "ValidDeptSect", "INV_DEPTSECT: DeptNo: " & sDept & " not found in DEPT_SECT table", App.HelpFile, ERRORSCONTEXTID
    ElseIf Err.Number = 0 Then
On Error GoTo 0
      Err.Raise INV_SECTDEPT, "ValidDeptSect", "INV_SECTDEPT: SectNo: " & sSect & " not found under DeptNo: " & sDept & " in DEPT_SECT table", App.HelpFile, ERRORSCONTEXTID
    End If
ElseIf Err.Number <> DB_NOTFOUND And Err.Number = 0 Then
      Call SaveTheError(eSave)
      On Error GoTo 0
      Err.Raise eSave.lNumber, eSave.sSource, eSave.sDesc, eSave.sHelpFile, ERRORSCONTEXTID
    End If
    
  
  If Err.Number <> 0 Then
    Call SaveTheError(eSave)
    On Error GoTo 0
    Err.Raise eSave.lNumber, eSave.sSource, eSave.sDesc, eSave.sHelpFile, ERRORSCONTEXTID
  End If
  
End Sub
Posted
Updated 12-Jul-12 8:26am
v2
Comments
[no name] 12-Jul-12 11:36am    
You are calling a procedure incorrectly or using an invalid arguement.
Richard MacCutchan 12-Jul-12 11:52am    
This should be posted as a solution, so you can get some points for it.
[no name] 12-Jul-12 11:54am    
I would but I currently have a uni-tard stalking me.

1 solution

You are calling a procedure incorrectly or using an invalid arguement.

More we could not say since you have not provided any of the code that demonstrates your problem.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Jul-12 14:19pm    
Richard suggested you can get some points for it. You just earned some from me, a 5. :-)
--SA
[no name] 12-Jul-12 14:28pm    
Thanks
Richard MacCutchan 13-Jul-12 8:16am    
The unitard seems to have evolved into a bitard; things can only get better. :)
[no name] 13-Jul-12 11:14am    
Thanks. That vote appeared after the code was added to the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900