Query AS400 with ASP - IBM AS400

This is a discussion on Query AS400 with ASP - IBM AS400 ; Hello I'm trying a connection to AS400 with ASP pages, my problem is when I use a query like this: CommandText = "SELECT btforn, pruser FROM carg.bolef WHERE btforn=16046;" The query retuns to me all the records an not only ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Query AS400 with ASP

  1. Query AS400 with ASP

    Hello
    I'm trying a connection to AS400 with ASP pages, my problem is when I
    use a query like this:
    CommandText = "SELECT btforn, pruser FROM carg.bolef WHERE
    btforn=16046;"

    The query retuns to me all the records an not only the records with
    btforn=16046.

    Can you help me plese???
    Thanks

    F.V.


  2. Re: Query AS400 with ASP

    On May 24, 11:28 am, aldobe...@gmail.com wrote:
    > Hello
    > I'm trying a connection to AS400 with ASP pages, my problem is when I
    > use a query like this:
    > CommandText = "SELECT btforn, pruser FROM carg.bolef WHERE
    > btforn=16046;"
    >
    > The query retuns to me all the records an not only the records with
    > btforn=16046.
    >
    > Can you help me plese???
    > Thanks
    >
    > F.V.


    I notice that you have an ";" inside the quotes rather than outside
    which looks a little strange. Otherwise the most likely cause is that
    somehow you are losing the WHERE clause when the query is being
    submitted to OS/400. Make sure you don't have any control characters
    in your CommandText string. If this is fine then you can use iSeries
    OpsNav to start a database performance monitor and monitor the SQL
    requests it is receiving.

    John Garrould


+ Reply to Thread