Forum Replies Created

Viewing 15 posts - 91 through 105 (of 119 total)

  • RE: very complicated stored proc

    I decided to re-write the code

    and I am doing a simple query now:-

    CREATE PROCEDURE [dbo].[stpEventsSearchResultNew]

    @searchstring varchar(100),

    @dtFrom datetime,

    @dtTo datetime,

    @searchtype int

    AS

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[debug_SP_table]') and OBJECTPROPERTY(id,...

  • RE: very complicated stored proc

    oh

    it created the table and returned two rows now

    DateFrom 1/1/2000

    DateTo 1/1/2099

  • RE: very complicated stored proc

    it returns no results

  • RE: very complicated stored proc

    I know what u are trying to tell me

    but that @searchtype is set to 0 when the user does not click on the...

  • RE: very complicated stored proc

    but in the stored proc I have the following:-

    If @searchtype = 0

    BEGIN

    Select * from pod_Events WHERE e_title LIKE @searchstring or e_description LIKE @searchstring

    END

    else

    BEGIN

    I mean this stored proc was working...

  • RE: very complicated stored proc

    ok this is the SQL statement

    exec stpEventsSearchResult @searchstring = '%%', @dtFrom = 'Jan 1 2000 12:00AM', @dtTo = 'Jan 1 2099 12:00AM', @searchtype = -1, @region = 0,...

  • RE: very complicated stored proc

    no table created

    Sorry did not understand what catch SP call with Profiler, i am a newbie on sql server

  • RE: very complicated stored proc

    Ok i executed that code.

    I assume its supposed to be with my tables right?

    Cause there is nothing there

  • RE: very complicated stored proc

    Sorry but where do I put this code?

    I tried to put it after my stored proc but gave me an error

    '@dtFrom not declared

  • RE: very complicated stored proc

    I am doing this:-

    Dim myToDate As DateTime = Convert.ToDateTime(txtDateTo.Text)

    and passing myToDate.

    I noticed that It was still passing the argument as text so I changed it to Date ie:-

    ByVal dtFrom...

  • RE: very complicated stored proc

    I do not know what is exactly wrong.

    The problem is that since i arranged the dates to datetime, its not working. So I am assuming that its the problem.

    I...

  • RE: get the last 14 days

    thanks mate!

  • RE: Procedure or function has too many arguments

    Thanks I solved it like this:-

     

    conn =

    New SqlConnection

    conn.ConnectionString = ConnectionString

    ' return the players pk_player

    cmd =

    New SqlCommand

    cmd.CommandType = CommandType.StoredProcedure

    cmd.Connection...

  • RE: Complex Stored Procedure

    Thanks Frank,

    I will look into them after I finish my MCSD exams

  • RE: Complex Stored Procedure

    Hi Remi, thanks, it worked like this:-

    SET @strSQL = @strSQL + ' WHERE im_id LIKE ''%'+@inputSearchText+'%''

    OR im_name LIKE ''%'+@inputSearchText+'%''

    OR im_desc LIKE ''%'+@inputSearchText+'%'''

    Thanks for your help

Viewing 15 posts - 91 through 105 (of 119 total)