DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Re: Passing a variable one ASP to another, "Sergie"

  1. #1
    valerie Guest

    Re: Passing a variable one ASP to another, "Sergie"


    Hi Sergey,
    When I use either post or get method I get a contract and information back
    but not the one that I was looking for.

    When I say it doesn't work I mean: When using the following sql statement
    cmdTmp.CommandText = 'SELECT ResellerData.`Contract Number`, `Schedule Tracking`.`Customer
    Name`, `Schedule Tracking`.DateReceived, `Schedule Tracking`.TimeReceived,
    `Schedule Tracking`.Country, `Schedule Tracking`.`Currency` FROM ResellerData,
    `Schedule Tracking` WHERE ResellerData.`Contract Number` = `Schedule Tracking`.`Contract
    Number`';

    It returns all relevant data but for a contract number I have not entered.

    When I use sql statement:
    //cmdTmp.CommandText = "SELECT ResellerData.`Contract Number`, `Schedule
    Tracking`.`Customer Name`, `Schedule Tracking`.DateReceived, `Schedule Tracking`.TimeReceived,
    `Schedule Tracking`.Country, `Schedule Tracking`.`Currency` FROM ResellerData,
    `Schedule Tracking` WHERE ResellerData.`Contract Number`= '" & ContractID
    & "'";

    It returns nothing, not even an error message.

    With this I am using the Post method in the first ASP form and I
    declare ContractID as
    var ContractID = Request.Form("ContractID")

    Hope you have enough information. Thank you

    Valerie.




    "Sergey" <sctrl@hotmail.com.spam> wrote:
    >First make sure that ContractID is filled in, do something like
    >Response.Write ContractID : Response.End ' Will show ContractID contents

    and
    >stop processing
    >
    >If ContractID is empty then there's a problem with posting a form, maybe
    >typo in input box ID or using GET instead of POST.
    >If ContractID contains whatever you put in then the problem is with
    >database/SQL statement.
    >You said it doesn't work, what happens? Do you get an error? Empty
    >recordset? ...
    >
    >--
    >Sergey Kats
    >http://codebump.net
    >
    >"valerie" <dolan_valerie@hotmail.com> wrote in message
    >news:3ab23ba0@news.devx.com...
    >>
    >> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
    >> >If the form method is post, then
    >> >ContractID = request.form("ContractID")
    >> >If the form method is get, then
    >> >ContractID = request.querystring("ContractID")

    >>
    >> I have used
    >> ContractID = request.form("ContractID")
    >> But it does'nt work
    >>
    >>

    >
    >



  2. #2
    Sergey Guest

    Re: Passing a variable one ASP to another, "Sergie"

    View your SQL string before executing
    Response.Write cmdTmp.CommandText
    And see if it looks ok and that contract number is the one that you typed
    in.
    Try executing statement against the database directly.

    --
    Sergey Kats
    http://codebump.net

    "valerie" <dolan_valerie@hotmail.com> wrote in message
    news:3ab72767$1@news.devx.com...
    >
    > Hi Sergey,
    > When I use either post or get method I get a contract and information back
    > but not the one that I was looking for.
    >
    > When I say it doesn't work I mean: When using the following sql statement
    > cmdTmp.CommandText = 'SELECT ResellerData.`Contract Number`, `Schedule

    Tracking`.`Customer
    > Name`, `Schedule Tracking`.DateReceived, `Schedule Tracking`.TimeReceived,
    > `Schedule Tracking`.Country, `Schedule Tracking`.`Currency` FROM

    ResellerData,
    > `Schedule Tracking` WHERE ResellerData.`Contract Number` = `Schedule

    Tracking`.`Contract
    > Number`';
    >
    > It returns all relevant data but for a contract number I have not entered.
    >
    > When I use sql statement:
    > file://cmdTmp.CommandText = "SELECT ResellerData.`Contract Number`,

    `Schedule
    > Tracking`.`Customer Name`, `Schedule Tracking`.DateReceived, `Schedule

    Tracking`.TimeReceived,
    > `Schedule Tracking`.Country, `Schedule Tracking`.`Currency` FROM

    ResellerData,
    > `Schedule Tracking` WHERE ResellerData.`Contract Number`= '" & ContractID
    > & "'";
    >
    > It returns nothing, not even an error message.
    >
    > With this I am using the Post method in the first ASP form and I
    > declare ContractID as
    > var ContractID = Request.Form("ContractID")
    >
    > Hope you have enough information. Thank you
    >
    > Valerie.
    >
    >
    >
    >
    > "Sergey" <sctrl@hotmail.com.spam> wrote:
    > >First make sure that ContractID is filled in, do something like
    > >Response.Write ContractID : Response.End ' Will show ContractID contents

    > and
    > >stop processing
    > >
    > >If ContractID is empty then there's a problem with posting a form, maybe
    > >typo in input box ID or using GET instead of POST.
    > >If ContractID contains whatever you put in then the problem is with
    > >database/SQL statement.
    > >You said it doesn't work, what happens? Do you get an error? Empty
    > >recordset? ...
    > >
    > >--
    > >Sergey Kats
    > >http://codebump.net
    > >
    > >"valerie" <dolan_valerie@hotmail.com> wrote in message
    > >news:3ab23ba0@news.devx.com...
    > >>
    > >> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
    > >> >If the form method is post, then
    > >> >ContractID = request.form("ContractID")
    > >> >If the form method is get, then
    > >> >ContractID = request.querystring("ContractID")
    > >>
    > >> I have used
    > >> ContractID = request.form("ContractID")
    > >> But it does'nt work
    > >>
    > >>

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center