What I'm doing wrong

Posted on 2006-04-05
Last Modified: 2010-04-23
I Know it's stupid but please take a look


With myCommand2
                        .Parameters.Add("@Examiner", SqlDbType.NVarChar)
                        .Parameters("@Examiner").Value = examiner2

                    End With

and my sp

ALTER        procedure  spMDDeleteExaminer
@Examiner  integer

UPDATE [CorpDataTest].[dbo].[MDClaimsExaminers]
SET  [sActiveInactiveInd]='I'
WHERE lUserId=@Examiner


When I execute it, says that there is an error in my sp

SOS....I cann't see it
Question by:Ilianam
    LVL 44

    Expert Comment

    Hello Ilianam,

    it would certainly help to see the error message
    but you say that SqlDbType is a varchar and the sp is expecting a integer, but not sure if thats the problem

    hope this helps a bit
    LVL 142

    Accepted Solution

    .Parameters.Add("@Examiner", SqlDbType.NVarChar)  << nvarchar
    but the procedure parameter is:
    @Examiner  integer  << integer


    .Parameters.Add("@Examiner", SqlDbType.integer)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now