By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Can't Find The Method Which Exists

P: n/a
Hello, I am running into something strange. I am getting the following error
when the program attempts to execute a particular procedure:

An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'FindSearchValueRecord' on type
'ProfileRecordProcessing' not found.

This seems to suggest that the function "FindSearchValueRecord" does not
exist, but it does exist. The procedure at then end of this message. I have
another procedure with the same name which has a different signature. I found
that if I go into the program and change one of the procedure names, then
everything works just fine. I am allowed to have methods with the same name
but different signatures, I have a number of those throughout my program, so
why is it picking on this procedure.

Any Ideas? Is this a compiler problem? I have attached the second procedure
with the same name...
Public Function FindSearchValueRecord(ByVal searchString As String) As
SearchValueRecord()
Dim holdCurFilter As String = dvSearchValues.RowFilter
Try
dvSearchValues.RowFilter = searchString
Dim row As DataRowView
If dvSearchValues.Count = 0 Then
Return Nothing
End If
Dim records(dvSearchValues.Count - 1) As SearchValueRecord
Dim indx As Integer = 0
For Each row In dvProfileFileType
Dim value As String = row.Item("Value")
Dim valueoperator As String = row.Item("ValueOperator")
Dim startloctype As String = row.Item("ValueStartLocType")
Dim position As Integer = row.Item("ValuePosition")
Dim delimiter As String = row.Item("ValueDelimiter")
Dim size As Integer = row.Item("FileSize")
Dim sizeoperator As String = row.Item("FileSizeOperator")
Dim createdate As Date = row.Item("FileCreateDate")
Dim dateoperator As String = row.Item("FileCreateDateOperator")
records(indx) = New SearchValueRecord(row.Item("UserId"),
row.Item("ProfileNameID"), _
row.Item("ValueID"), row.Item("Value"), row.Item("ValueOperator"),
row.Item("ValueStartLocType"), _
row.Item("ValuePosition"), row.Item("ValueDelimiter"), row.Item("FileSize"), _
row.Item("FileSizeOperator"), row.Item("FileCreateDate"),
row.Item("FileCreateDateOperator"))
Next
If holdCurFilter.Length > 0 Then
dvSearchValues.RowFilter = holdCurFilter
End If
Catch e As Exception
dvSearchValues.RowFilter = holdCurFilter
Throw New DeleteRowException("Invalid Row Filter provided" & vbCrLf & _
"Procedure: ProfileRecordProcessing.FindSearchValueRecord" & vbCrLf & _
"Filter provided = " & searchString & vbCrLf & _
"Detailed message: " & e.Message & vbCrLf & "Stack trace: " & e.StackTrace)
End Try

Here is the second procedure with the same name...

Public Function FindSearchValueRecord(ByVal keys() As Object) As
SearchValueRecord
Try
Dim item As Integer = dvSearchValues.Find(keys)
If Not IsNothing(item) And item <> -1 Then
Dim record As DataRowView = dvSearchValues(item)
Return New SearchValueRecord(record.Item("UserId"),
record.Item("ProfileNameID"), _
record.Item("ValueID"), record.Item("Value"), record.Item("ValueOperator"), _
record.Item("ValueStartLocType"), record.Item("ValuePosition"), _
record.Item("ValueDelimiter"), record.Item("FileSize"), _
record.Item("FileSizeOperator"), record.Item("FileCreateDate"), _
record.Item("FileCreateDateOperator"))
End If
Catch e As Exception
Throw New DeleteRowException("Invalid Keys provided" & vbCrLf & _
"Procedure: ProfileRecordProcessing.FindSearchRecord" & vbCrLf & _
"Keys provided = " & keys(0) & " and " & keys(1) & vbCrLf & _
"Detailed message: " & e.Message & vbCrLf & "Stack trace: " & e.StackTrace)
End Try

End Function


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Please repost to the framework.adonet

OHM
"Jim Heavey" <Ji*******@hotmail.com> wrote in message
news:3f**********@corp.newsgroups.com...
Hello, I am running into something strange. I am getting the following error when the program attempts to execute a particular procedure:

An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'FindSearchValueRecord' on type
'ProfileRecordProcessing' not found.

This seems to suggest that the function "FindSearchValueRecord" does not
exist, but it does exist. The procedure at then end of this message. I have another procedure with the same name which has a different signature. I found that if I go into the program and change one of the procedure names, then
everything works just fine. I am allowed to have methods with the same name but different signatures, I have a number of those throughout my program, so why is it picking on this procedure.

Any Ideas? Is this a compiler problem? I have attached the second procedure with the same name...
Public Function FindSearchValueRecord(ByVal searchString As String) As
SearchValueRecord()
Dim holdCurFilter As String = dvSearchValues.RowFilter
Try
dvSearchValues.RowFilter = searchString
Dim row As DataRowView
If dvSearchValues.Count = 0 Then
Return Nothing
End If
Dim records(dvSearchValues.Count - 1) As SearchValueRecord
Dim indx As Integer = 0
For Each row In dvProfileFileType
Dim value As String = row.Item("Value")
Dim valueoperator As String = row.Item("ValueOperator")
Dim startloctype As String = row.Item("ValueStartLocType")
Dim position As Integer = row.Item("ValuePosition")
Dim delimiter As String = row.Item("ValueDelimiter")
Dim size As Integer = row.Item("FileSize")
Dim sizeoperator As String = row.Item("FileSizeOperator")
Dim createdate As Date = row.Item("FileCreateDate")
Dim dateoperator As String = row.Item("FileCreateDateOperator")
records(indx) = New SearchValueRecord(row.Item("UserId"),
row.Item("ProfileNameID"), _
row.Item("ValueID"), row.Item("Value"), row.Item("ValueOperator"),
row.Item("ValueStartLocType"), _
row.Item("ValuePosition"), row.Item("ValueDelimiter"), row.Item("FileSize"), _ row.Item("FileSizeOperator"), row.Item("FileCreateDate"),
row.Item("FileCreateDateOperator"))
Next
If holdCurFilter.Length > 0 Then
dvSearchValues.RowFilter = holdCurFilter
End If
Catch e As Exception
dvSearchValues.RowFilter = holdCurFilter
Throw New DeleteRowException("Invalid Row Filter provided" & vbCrLf & _
"Procedure: ProfileRecordProcessing.FindSearchValueRecord" & vbCrLf & _
"Filter provided = " & searchString & vbCrLf & _
"Detailed message: " & e.Message & vbCrLf & "Stack trace: " & e.StackTrace) End Try

Here is the second procedure with the same name...

Public Function FindSearchValueRecord(ByVal keys() As Object) As
SearchValueRecord
Try
Dim item As Integer = dvSearchValues.Find(keys)
If Not IsNothing(item) And item <> -1 Then
Dim record As DataRowView = dvSearchValues(item)
Return New SearchValueRecord(record.Item("UserId"),
record.Item("ProfileNameID"), _
record.Item("ValueID"), record.Item("Value"), record.Item("ValueOperator"), _ record.Item("ValueStartLocType"), record.Item("ValuePosition"), _
record.Item("ValueDelimiter"), record.Item("FileSize"), _
record.Item("FileSizeOperator"), record.Item("FileCreateDate"), _
record.Item("FileCreateDateOperator"))
End If
Catch e As Exception
Throw New DeleteRowException("Invalid Keys provided" & vbCrLf & _
"Procedure: ProfileRecordProcessing.FindSearchRecord" & vbCrLf & _
"Keys provided = " & keys(0) & " and " & keys(1) & vbCrLf & _
"Detailed message: " & e.Message & vbCrLf & "Stack trace: " & e.StackTrace) End Try

End Function


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.