How to display all - what is the generic value for a numeric field?

I have a products table and a table of product assimilated into my database category.

In the products table, each product has a numerical value in its product category field (int), which relates to the rowID (int) for the category in the product category table.

I created a search form that allows you to select a category in the categories list in the categories table product and my set of records in the page of results is set to filter by category ID but I want users to categories "show all" but when I pass an empty value or a value of '%' in the nothing recordset is returned or if an error occurs.

Here is a basic example of my form:

< name of the form = "searchform" action = "resultspage.asp" method = "post" > "

< select name = "categoryID" id = "categoryID" >

< option value = "" > view all the < / option >

< option value = "1" > lights < / option >

< option value = "2" > paint < / option >

< / select >

< / make >

.. .and a basic example of my recordset on my results page:

< %

Dim rsPROP__MMColParam

rsPROP__MMColParam = '1 '.

If (Request.Form ("categoryID") <>"") then

rsPROP__MMColParam = Request.Form ("categoryID")

End If

% >

< %

Dim rsPROP

Dim rsPROP_cmd

Dim rsPROP_numRows

Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")

rsPROP_cmd. ActiveConnection = MM_cs_STRING

rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE categoryID =?"

rsPROP_cmd. Prepared = true

rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble

Set rsPROP = rsPROP_cmd. Run

rsPROP_numRows = 0

% >

I know it's probably something stupid, but I'd appreciate any help I can get as I keep going round in circles with this one!

Thank you in advance.

Concerning
NJ

Thanks booth.

Strangest thing... I just tried a Google search for a solution to this problem and came across another thread on this forum.  At the moment I am inside of him, I realized one of those involved came from me years!  Bab, already known it or what!

Changed my recordset for...

<>

Dim rsPROP__MMColParam

rsPROP__MMColParam = '0 '.

If (Request.Form ("categoryID") <> "") then

rsPROP__MMColParam = Request.Form ("categoryID")

End If

%>

<>

Dim rsPROP__MMColParam1

rsPROP__MMColParam1 = '1 '.

If (Request.Form ("categoryID") <> "") then

rsPROP__MMColParam1 = Request.Form ("categoryID")

End If

%>

<>

RsPROP Sun

rsPROP_cmd Sun

rsPROP_numRows Sun

Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")

rsPROP_cmd. ActiveConnection = MM_cs_STRING

rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE ISNULL(?,0)" = 0 OR categoryID =? ".

rsPROP_cmd. Prepared = true

rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble

rsPROP_cmd. Parameters.Append rsPROP_cmd. CreateParameter ("param2", 5, 1, -1, rsPROP__MMColParam) ' adDouble

Set rsPROP = rsPROP_cmd. Run

rsPROP_numRows = 0

%>

.. .and it works very well.

Appreciate the help. I followed your advice and did an If Else on the WHERE clause to achieve the same.

Thank you.
NJ

Tags: Dreamweaver

Similar Questions

  • Simulator Device.xml file has a tag with an attribute of memory, what are the optional values for this attribute of the os?

    In the Device.xml file, it starts with the tags of the os. Each os has a memory attribute. What are the optional values for the attribute memory?

    Can we really control the memory for the simulators?

    0x85000F03
    0x8C000F03
    0x87000F03
    0x84001503
    0x86001503
    0x04001507
    0x0F001507
    0x0C001404
    0x0D001404
    0x0E001404
    0x0D000D04
    0x16000D04
    0x05001504
    0x07001504
    

    These values refer to specific hardware configurations are simulated.  They should not be changed.

  • What are the optimal values for mac and arp timeout values

    Hi guys.

    What are the best values for 'mac address-table-time of ageing' and "arp timeout" by following scenarios? :

    -single sg300-10 as hosts Layer 3 - with a maximum of 10 local switch (directly connected)

    - and a 3750 x-stack with 100 local hosts + hsrp with a battery of the same kind

    or for asa 5520 as internet gateway for 500 customers?

    I use now a time of aging mac 300 seconds and a time-out of the arp of 3600 seconds.

    Is - this okay.?

    Thank you.

    These values should be fine. I don't know why the switch is layer 3 since you have of the 3750 and the ASA5520. If you start to see overflow errors, you should consider using the layer 2 switch.

    -Tom
    Please mark replied messages useful

  • What is the minimum value for the data type double?

    ... a more academic question: what is the minimum value of the data type double? I thought 'double', it is the 8-byte IEEE standard and what I remember, it's + - 1.7E + - 308.  The more different number of 0 should be 1.797E - 308.

    This is why I was a little surprised when I looked at the data output of my calculation of CVI, where I found the numbers with exponents of E-319 or E-324 as the smallest value...

    But I'm sure there's an explanation :-)

    Thank you for sharing with me,

    Wolfgang

    The largest number is indeed the order of + 1.7E + 308; There are a smaller number of - 1.7E + 308. Note that this is in fact the most negative number, which is the smallest by some reckoning. For the small beach of the Exhibitor, things get a little more complicated. 1E-308 can be represented with complete accuracy and resolution, but if you're willing to lose a few bits of precision, you can go down even further. For example:

    Double x, y, z:

    x = 1E-300;

    y = 1E7;

    z = x / y;               Give 1.000000000000000E - 307

    y = 1E8;

    z = x / y;               Give 9.999999999999999E - 309

    y = 1E18;

    z = x / y;               Give 9.999987484955998E - 319

    y = 1E23;

    z = x / y;               Give 9.881312916824931E - 324

    So, as you can see, values less than 1E-308 are possible, but they become increasingly more inaccurate and should not be relied upon.

    JR

  • How to go from sysdate as the initial value for reports?

    Hi, I am using Oracle 10 G reports. I would like to know how to pass sysdate as initial value for the property of a date in the parameter element user. Help, please. Thank you

    arms777 wrote:
    I want to say is, if you select range of property for the specific parameter, there is a property for the initial value (type of data, width, mask entry, initial value, Validation trigger, list of values, etc.). Does this mean that I can just put sysdate on the initial value of the parameter property? I really need to use a trigger for this? In forms, I don't have to create a trigger to do this, simply put sysdate on the initial value of the item property. I hope you understand what I mean. Thanks again.

    I can't find another way...

    This from Reports FAQ
    How to set the initial values of the parameters to the form of the parameter at run time? +

    This is what is mainly used for BeforeForm relaxation. Even if you used a select statement to create a search list for the parameter, this statement is completely parsed before the form parameter is opened. Simply assign the parameter to a value in the trigger BeforeForm will choose this option as a default value displayed to the user. For example, suppose you have a parameter called p_input_date that is intended to contain a date of the invoice. The following example will select the date of the most recent invoice being the default and notes that it correctly handle exceptions to ensure that the report does not arbitrarily die if this default setting fails. Also note that, as all the triggers of report, it should return a true or false value.

    function BeforePForm return boolean is
    begin
    select max(bill_period_end_date + 1)
      into :p_input_date
      from billing_period
     where bill_period_end_date <= (select trunc(sysdate)
                                      from dual);
      return (TRUE);
    exception
      when others then
         :p_input_date := null;
         return true;
    end;
    

    If someone useful or appropriate, please mark accordingly.

  • What is the correct value for "simultaneous: GSM enabled.

    What is the value for the option of profile:

    ' Competitor: GSM enabled.

    Is this 'Y' or 'yes '?

    Can someone give me a link to the 11.5.10 docs that show this?

    Hi Chris,

    What is the value for the option of profile:

    ' Competitor: GSM enabled.

    Is this 'Y' or 'yes '?

    It's there for Yes and N for no..

    You can refer, please
    * [How to set the simultaneous Option profile: GSM enabled for N using AutoConfig | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=391240.1] *.

    * [How to solve problems when the Workflow Services descend | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=564394.1] *.

    * [Services start correctly with the active GSM | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=391239.1] *.

    * [Troubleshooting problem Manager Start Up related to the Service Manager competitor | https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=735148.1] *.

    Thank you
    Anchorage :)

  • What are the possible values for APP_COMPONENT_TYPE?

    The possible values of APP_COMPONENT_TYPE documented anywhere?

    Also, I want to ask all the components in my APEX application. My current query of multiple views unions APEX (apex_application_page_items, apex_application_page_buttons, apex_application_page_regions,...)-a point of view by each component type. Is there a better way to list components?

    Thank you

    -Kris

    Select * from APEX_APPLICATION_ALL_AUTH

    View: APEX_APPLICATION_ALL_AUTH
    Description: All the authorisation schemes for all components of the Application
    Column Name Comments
    WORKSPACE Model authorization workspace
    WORKSPACE_DISPLAY_NAME Full name of the workspace
    APPLICATION_ID Number of request of authorization Scheme
    APPLICATION_NAME Name of the schema to request authorization
    PAGE_ID ID of Page authorization regime
    COMPONENT_TYPE APEX authorization schema component type
    NAME OF THE COMPONENT Name of the component system APEX authorization
    AUTHORIZATION_SCHEME Name of schema authorization
    STATUS Situation of authorisation system

    See http://eberapp.com/pls/apex/f?p=447:1301:35096966318357:CLEAR_SORT:RP, 1301:P1301_VIEW:APEX_APPLICATION_ALL_AUTH

  • What are the possible values for a checkbox?

    I am filling a PDF with an asp.net web form. I get the filled text ok boxes, but I can't set the checkboxes. I'm testing to see if a web form checkbox is checked. If this is the case, I tried to put the value of pdf checkbox on 'on '. But this does not seem fair.

    Looks like my asp.net code:

    If CheckBox1.Checked then

    AF. SetField ("pdfbox1", "On")

    End If

    Any suggestions?

    Thank you

    The value is the value in the option "Export value", when the form is created. You can use the Acrobat JavaScript "exportValues" property to get the array of values to the same named boxes. And if you know the "trick" of the box, you can use the method "isBoxChecked" to check if a given 'widget' is checked. More information is contained in the Acrobat JavaScript documentation.

  • What is the best practice for the enumeration for the ADF?

    Dear all,

    What is the best practice for the enumeration for the ADF?

    I need to add the enumeration to my request. ex: sex, marital status.

    How to deliver? Declarative custom components or is there another way?

    Thank you.
    Angelique

    Check out this topic - '5.3 fill view object Rows with static data' in Guide of Dev
    http://download.Oracle.com/docs/CD/E17904_01/Web.1111/b31974/bcquerying.htm#CEGCGFCA

  • Not sure how to display all the applications that I'm supposed to have with the creative cloud - constant spin in the window? [was: creative cloud]

    Trying to download my creative cloud, but get a constant rotation in the window. Not sure how to display all the applications that I'm supposed to have with the creative cloud?

    Please visit: App does not open. Wheel of progress turn continuously

    I hope this helps.

    Concerning

    Megha Rawat

  • I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    Hi sindres79946597,

    Open Acrobat Reader DC, navigate to the Edit-> Preferences-> General-> uncheck "Open Documents in the new tab in the same window.

    Now, reboot your system, when you open multiple PDFs that all will open in a new window so that you can easily compare.

    Kind regards
    Nicos

  • How to display date / time in the browser console?

    How to display date / time in the browser console?

    You can set through the Options (gear icon) page in the Web Console (Firefox/tools > Web Developer).
    This applies to the browser console and the Web console.

  • Problem of Timer and TimerTask for counter display all seconds on the screen.

    Dear friends,

    I have little problem in the use of the timer. I took the timer to display the counter on each period fix repeatedly. but I did not here. Please help me. The code is as shown below.

    import java.util.Timer.

    java.util.TimerTask to import;

    Import net.rim.device.api.ui.Field;

    Import net.rim.device.api.ui.UiApplication;

    Import net.rim.device.api.ui.component.RichTextField;

    Import net.rim.device.api.ui.container.MainScreen;

    SerializableAttribute public class TimerTest extends UiApplication

    {

    Timer;

    public static int COUNT = 0;

    Public Shared Sub main (String [] args) {}

    TimerTest tt = new TimerTest();

    tt.enterEventDispatcher ();

    }

    public TimerTest()

    {

    a new screen

    pushScreen (new TimerMainScreen());

    }

    SerializableAttribute public class TimerMainScreen extends screen

    {

    TimerMainScreen()

    {

    Add (new RichTextField ("Count =" + Integer.toString (COUNT), Field.NON_FOCUSABLE));

    try {}

    Timer = new Timer();

    timer.scheduleAtFixedRate (new TimerMainEvent (), 200, 1000);

    }

    catch (System.Exception e)

    {

    do nothing

    }

    }

    private class TimerMainEvent extends TimerTask

    {

    public void run()

    {

    Try

    {

    COUNT ++;

    If (COUNTY<>

    Add (new RichTextField ("Count =" + Integer.toString (COUNT), Field.NON_FOCUSABLE));

    on the other

    Timer.Cancel ();

    Timer.Cancel ();

    }

    catch (System.Exception e)

    {

    Do nothing

    }

    }

    }

    }

    }

    Please let me know where I'm wrong, I want to display all seconds on the screen. If I set the interval 0 then it run TimerMainScreen first time but after all no update, I see on the screen.

    I thank in advance

    Vimal

    Use the following Code in your race.

     UiApplication.getUiApplication().invokeLater(new Runnable()
     {
      public void run()
      {
       add(new RichTextField("Count = " + Integer.toString(COUNT)   ,Field.NON_FOCUSABLE));
      }
     });
    
  • How will I know what is the speed of the internet to my computer?

    How will I know what is the speed of the internet to my computer. IM using wifi and tries to install steem, so I can play a game and want to know if I have a) modem - 56 k, b) dsl > 256 k, c) > 756 k, d dsl) dsl/cable > 2 m or e) cable/Fiber > 10 m

    go to speedtest.net and run the test here.  It will show you your true speed.

  • How to remove all information from the computer so I can sell it?

    How to remove all information from the computer so I can sell it?

    Hello

    You will want to format the hard disk:

    1. you can use DBAN - http://www.dban.org/

    or

    2. you can follow this tutorial to clean install up to the step where you format the disk, in which you would then STOP (because you just want to get rid of the files on the hard drive, do not install Windows) - http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

    Kind regards

    Patrick

Maybe you are looking for