Link to home
Start Free TrialLog in
Avatar of rcowen00
rcowen00Flag for United States of America

asked on

Visual Basic Data Table

I have a DataSet that is giving me an error.  I am sure it is something silly, but I am missing it.  Thank you.

"Argument not specified for parameter 'PayCompanyFlag' of 'Public Overridable Function InsertAppraiserQuery(AppraiserID As Integer, ApprLastName As String, ApprFirstName As String, ApprCompanyName As String, ApprMailingAddress1 As String, ApprMailingAddress2 As String, ApprMailingCity As String, ApprMailingZip As String, ApprAddress1 As String, ApprAddress2 As String, ApprCity As String, ApprZip As String, AppraiserTaxID As String, ApprEmail As String, ApprEmail2 As String, ApprRanking As String, AppraiserNotes As String, ApprCompanyID As System.Nullable(Of Integer), ApprPhone1 As System.Nullable(Of Integer), ApprPhone2 As System.Nullable(Of Integer), ApprName As String, DateTimeAdded As System.Nullable(Of Date), ApprDesignation As String, PayCompanyFlag As System.Nullable(Of Boolean)) As Integer'.      C:\Users\denise\Documents\Visual Studio 2005\WebSites\proval1\DataUpload.aspx.vb      160      44      C:\...\proval1\

INSERT INTO VendorProfile
                  (VendorID, VendorLastName, VendorFirstName, VendorCompanyName, VendorMailingAddress1, VendorMailingAddress2, VendorMailingCity, VendorMailingZip, 
                  VendorAddress1, VendorAddress2, VendorCity, VendorZip, VendorTaxID, VendorEmail, VendorEmail2, VendorRanking, VendorNotes, VendorCompanyID, VendorPhone1, 
                  VendorPhone2, VendorName, VendorDateTimeAdded, VendorDesignation, VendorPayCompanyFlag)
VALUES (@AppraiserID,@ApprLastName,@ApprFirstName,@ApprCompanyName,@ApprMailingAddress1,@ApprMailingAddress2,@ApprMailingCity,@ApprMailingZip,@ApprAddress1,@ApprAddress2,@ApprCity,@ApprZip,@AppraiserTaxID,@ApprEmail,@ApprEmail2,@ApprRanking,@AppraiserNotes,@ApprCompanyID,@ApprPhone1,@ApprPhone2,@ApprName,@DateTimeAdded,@ApprDesignation,@PayCompanyFlag);   

---- return the VendorProfileKey
SELECT SCOPE_IDENTITY()

Open in new window

Protected Function ImportIntoVendorProfile(ByVal AppraiserID As String, ByVal ApprLastName As String, ByVal ApprFirstName As String, ByVal ApprCompanyName As String, ByVal ApprMailingAddress1 As String, ByVal ApprMailingAddress2 As String, ByVal ApprMailingCity As String, ByVal ApprMailingZip As String, ByVal ApprAddress1 As String, ByVal ApprAddress2 As String, ByVal ApprCity As String, ByVal ApprZip As String, ByVal ApprTaxID As String, ByVal ApprEmail As String, ByVal ApprEmail2 As String, ByVal ApprRanking As String, ByVal AppraiserNotes As String, ByVal ApprCompanyID As String, ByVal ApprPhone1 As String, ByVal ApprPhone2 As String, ByVal ApprName As String, ByVal PayCompanyFlag As Boolean, ByVal DateTimeAdded As String, ByVal ApprDesignation As String) As Integer

        Dim VendorID As Integer = 0

        Try
            Dim SSAdapter As New SSSAppraiserDataSetTableAdapters.VendorProfileTableAdapter
            Dim SSDataTable As SSSAppraiserDataSet.VendorProfileDataTable = Nothing
            SSDataTable = SSAdapter.GetVendorByID2(VendorID)



            If Not SSDataTable Is Nothing Then
                If SSDataTable.Rows.Count > 0 Then
                    If Not SSDataTable(0).VendorID = Nothing Then
                        VendorID = SSDataTable(0).VendorID
                        lblImport.Text = lblImport.Text & _
                  "<font color=blue>Member Found, Not Imported: " & _
                  " ID: " & VendorID & " " & ".</font><br>"
                    End If
                End If
            End If
            If VendorID = 0 Then
                ' retrieve the identity key member_id from the insert
                VendorID = Convert.ToInt32(SSAdapter.InsertAppraiserQuery(AppraiserID, ApprLastName, ApprFirstName, ApprCompanyName, ApprMailingAddress1, ApprMailingAddress2, ApprMailingCity, ApprMailingZip, ApprAddress1, ApprAddress2, ApprCity, ApprZip, ApprEmail, ApprEmail2, ApprRanking, AppraiserNotes, ApprCompanyID, ApprPhone1, ApprPhone2, ApprName, DateTimeAdded, ApprDesignation, PayCompanyFlag))
                lblImport.Text = lblImport.Text & _
                      "<font color=green>Member Imported: " & _
                      " ID: " & VendorID & " " & ApprLastName & " " & _
                      ApprFirstName & ".</font><br />"
            End If

            Return VendorID

        Catch ex As Exception
            lblImport.Text &= "<font color=red>" & ex.ToString & "</font><br />"
            Return 0

        End Try

    End Function

Open in new window

SOLUTION
Avatar of John Gates, CISSP, CDPSE
John Gates, CISSP, CDPSE
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rcowen00

ASKER

It turned out to be a mixture of the 2 responses.  I wasn't passing a parameter and I had another field type incorrect.  Thank you..