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
>>
>>
>
>
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
> >>
> >>
> >
> >
>