Must delcare the scalar variable

T

Tom Nowak

I am running an Update routine that calls a function. It appears that the
function never executes because I receive:

Must Declare The Scalar Variable @Country.

Code:

Dim newCustomer As New Customer
newCustomer.CustomerID = customer.CustomerID
Me.PutCustomerData(newCustomer)
Try
If Not CustomerDB.UpdateVendor(customer, newCustomer) Then
MessageBox.Show("Another user has updated or deleted
that customer.", _
"Database Error")
Me.DialogResult = Windows.Forms.DialogResult.Retry
Else
customer = newCustomer
Me.DialogResult = Windows.Forms.DialogResult.OK
End If
Catch ex As Exception
MessageBox.Show(ex.Message, ex.GetType.ToString)
End Try

The only time @Country is used is in a Insert function. In the Update
fuction, I use @NewCountry and @OldCountry, so I am not sure why this is
happening.

Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top