stored procedure not recognized

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default stored procedure not recognized

    I posted yesterday and got no response. I have more info so I will post
    again. I am using a stored proc which loops through three tables until it
    finds a product ID. When the ID is found it puts the values into a
    temporary table. Then the item's sizes are listed. I can not get
    dreamweaver to take the procedure and create a dataset. It gives me an
    unknown error has occured. It has something to do with the syntax of the
    proc becaues another simplier proc works in DW.

    Can someone look at my code and give me an idea? It works just fine in the
    query analizer.

    Thanks
    Laura K

    I am using asp.net vb

    PROCEDURE spGetProductSizes3
    @prodId int
    AS

    create table #temp (pSize varchar(50))

    insert into #temp (pSize)
    select (w.strWaistSize + ' X ' + l.strInseam) as pSize
    from tblJctProductsWaistSizes as s
    JOIN tblWaistSizes as w
    on s.intWaistSizeID = w.intWaistSizeID
    JOIN tblinseamsizes as l on l.intInseamSizeId=s.intInseamSizeId
    where s.intProductId=@prodId

    -- Pants do not have a waist size so look into sizes table
    IF @@ROWCOUNT = 0
    BEGIN
    insert into #temp (pSize)
    select s.strSize as pSize
    from tblSizes as s
    JOIN dbo.tblJctProductsSizes as ps on ps.intSizeId = s.intSizeId
    where ps.intProductId = @prodId
    END

    --Finally go into the shoes
    if @@ROWCOUNT = 0
    BEGIN
    insert into #temp (pSize)
    select (convert(varchar(10),ss.intShoeSize) + ' X ' + sw.strWidth) as
    pSize
    from dbo.tblShoeSizes as ss
    JOIN dbo.tblJctProductsShoeSize s
    on s.intShoeSizeID = ss.intShoeSizeID
    join dbo.tblShoeWidths as sw
    on sw.intShoeWidthID = s.intShoeWidthID
    where s.intProductID = @prodId
    END


    SELECT pSize
    FROM #temp


    Laura K Guest

  2. Similar Questions and Discussions

    1. Stored Procedure
      EXEC master..xp_cmdshell 'cscript c:\path\file.vbs' EXEC master..xp_cmdshell 'c:\path\file.exe' "Kannan" <gk_i@yahoo.com> wrote in message...
    2. stored procedure help
      Hi all! I am in need of writing a few stored procedures. The first one is to create a stored procedure to recover a database from backup and the...
    3. Using a stored procedure
      I am trying to pass a ProdID to a stored procedure, but I get an error: Error Executing Database Query. Procedure &apos;PriceBreak&apos; expects...
    4. help with a stored procedure
      I am new to postgres stored procedures and would like a little help. My function basically takes 2 arguments and inserts data into a table from a...
    5. need help on a stored procedure
      I have 2 tables. table1 and table2 I do a select on table1 and join table 2 on id. I want to check newprice in table1. if it is null, I want to...
  3. #2

    Default Re: stored procedure not recognized

    Ok worked this one out myself.

    Dreamweaver's dialog box doesn't see it but I did it by hand using the exact
    same notations that dreamweaver would have used so all is well. Still it
    would be nice if DW could have been a little more user friendly.


    "Laura K" <klkazanAT@ATcharter.net> wrote in message
    news:d62s6s$nto$1@forums.macromedia.com...
    >I posted yesterday and got no response. I have more info so I will post
    >again. I am using a stored proc which loops through three tables until it
    >finds a product ID. When the ID is found it puts the values into a
    >temporary table. Then the item's sizes are listed. I can not get
    >dreamweaver to take the procedure and create a dataset. It gives me an
    >unknown error has occured. It has something to do with the syntax of the
    >proc becaues another simplier proc works in DW.
    >
    > Can someone look at my code and give me an idea? It works just fine in
    > the query analizer.
    >
    > Thanks
    > Laura K
    >
    > I am using asp.net vb
    >
    > PROCEDURE spGetProductSizes3
    > @prodId int
    > AS
    >
    > create table #temp (pSize varchar(50))
    >
    > insert into #temp (pSize)
    > select (w.strWaistSize + ' X ' + l.strInseam) as pSize
    > from tblJctProductsWaistSizes as s
    > JOIN tblWaistSizes as w
    > on s.intWaistSizeID = w.intWaistSizeID
    > JOIN tblinseamsizes as l on l.intInseamSizeId=s.intInseamSizeId
    > where s.intProductId=@prodId
    >
    > -- Pants do not have a waist size so look into sizes table
    > IF @@ROWCOUNT = 0
    > BEGIN
    > insert into #temp (pSize)
    > select s.strSize as pSize
    > from tblSizes as s
    > JOIN dbo.tblJctProductsSizes as ps on ps.intSizeId = s.intSizeId
    > where ps.intProductId = @prodId
    > END
    >
    > --Finally go into the shoes
    > if @@ROWCOUNT = 0
    > BEGIN
    > insert into #temp (pSize)
    > select (convert(varchar(10),ss.intShoeSize) + ' X ' + sw.strWidth) as
    > pSize
    > from dbo.tblShoeSizes as ss
    > JOIN dbo.tblJctProductsShoeSize s
    > on s.intShoeSizeID = ss.intShoeSizeID
    > join dbo.tblShoeWidths as sw
    > on sw.intShoeWidthID = s.intShoeWidthID
    > where s.intProductID = @prodId
    > END
    >
    >
    > SELECT pSize
    > FROM #temp
    >

    Laura K Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139