Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7039011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:44:43+00:00 2026-05-28T01:44:43+00:00

So I want to erase the guid @value from the database and retrieve the

  • 0

So I want to erase the guid @value from the database and retrieve the return value from my stored procedure

This is my stored procedure

ALTER PROCEDURE dbo.verifGuids
@value char(36),
@message char(1)Output
AS
Begin

DECLARE @SelectValue char(36)

select @SelectValue = value FROM guids WHERE @value=value; 

If @value=@SelectValue 
BEGIN
DELETE value FROM guids WHERE @value=value ;
SET @message = 0
END
Else 
BEGIN
Set @message = 1
END

Return @message
END

This is my vb.code in asp.net

 Dim guids As String = (Request.QueryString("ID"))
        'stored procedure get Guid
        Dim intRowsAff As Integer
        Dim connectionString As String = WebConfigurationManager.ConnectionStrings("BecsEtMuseauxSQL").ConnectionString
        Dim con As SqlConnection = New SqlConnection(connectionString)
        Dim cmd As New SqlCommand("verifGuids", con)
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.Add("@value", SqlDbType.Char, 36).Value = guids
        Dim returnvalue As New SqlParameter("@message", SqlDbType.Char, 1)
        returnvalue.Direction = ParameterDirection.Output
        cmd.Parameters.Add(returnvalue)

        Try
            cmd.Connection.Open()
            intRowsAff = cmd.ExecuteNonQuery()
            Dim retour As String = (cmd.Parameters("@message").Value.ToString())
            If retour = 0 Then

                InformationLabel.Text = "Votre compte à été vérifier vous pouver vous connecter sur le site"
            Else

                InformationLabel.Text = "Votre compte n'est pas aprouvé veuiller vérifier dans vos mail le message de confirmation de votre compte "
            End If
        Catch ex As Exception
            InformationLabel.Text = ex.Message & ex.Source & intRowsAff '& " record(s) inserted"
        End Try


        cmd.Connection.Close()

    End If

I catch an error

object name ‘value’ not valid..Net SqlClient Data Provider0

I don’t understand what I doing wrong…

This is in Vb.net…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:44:43+00:00Added an answer on May 28, 2026 at 1:44 am

    I think you have an error in your stored procedure code:

    select @SelectValue = value FROM guids WHERE @value=value; 
    

    This is wrong – it should be

    SELECT @SelectValue = value FROM guids WHERE value = @value
    

    The same here:

    DELETE value FROM guids WHERE @value=value ;
    

    You must compare the column (value) to the parameter passed in (@value) and not the other way around! So change this to:

    DELETE FROM guids WHERE value = @value
    

    and you should be fine

    Your stored proc is much too complicated…. you could simplify it to be:

    ALTER PROCEDURE dbo.verifGuids
        @value char(36),
        @message char(1) OUTPUT
    AS
    BEGIN
        -- this will *already* delete only if the "value" column matches your "@value"
        -- parameter - there's really no need to first do a SELECT on that table to 
        -- verify that!
        DELETE FROM dbo.guids WHERE value = @value;
    
        IF @@ROWCOUNT > 0
           SET @message = 0  -- if you deleted anything - the set @message to "0"
        ELSE
           SET @message = 1
    
        RETURN @message
    END
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to erase some iterator from a vector, so this is what I
Suppose if i want to erase a value stored in a NSString variable, i
I want to retrieve data from the database. The number of data is fixed
I want to clear a element from a vector using the erase method. But
I want to erase the value of textarea if <br> is typed in. Currently
I want to erase an element from a container which is being currently used
I want to erase an element from the std::list and then point back to
I want to change pdf files. I will erase header and footer from pdf,
For the following code <script type=text/javascript> $(document).ready(function(){ $(#erase).click(function(){ confirm('Are you sure you want to
Want to do this: (EDIT: bad sample code, ignore and skip below) struct RECORD

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.