Commerce Server General - add if statement to global.asa

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2005 > add if statement to global.asa





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author add if statement to global.asa
bobby

2005-03-27, 5:53 pm

Hi:
Is there anyway to add an if statement to global.asa. My query looks like
this:


Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
dept.dept_id = ?")

what I want to do is to say

if session_id = 1 and discount = 2 then

Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price * .5 as list_price, pf.sale_price, pf.sale_start, pf.sale_end,
pv.sku, dept.dept_id FROM diamonds_product pf, diamonds_variant pv,
diamonds_dept dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id
= pv.pf_id and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id
and dept.dept_id = ?")

else

Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
dept.dept_id = ?")

end if

I tried this but I get type mismatch error message.
Thanks for the help

Nihit Kaul [MSFT]

2005-03-28, 6:13 pm

Hi,

This seems to be a general ASP question and not specific to Commerce
Server. Please post in the appropriate newsgroup for ASP and someone should
be able to help you.

Thanks,

Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Thread-Topic: add if statement to global.asa
thread-index: AcUzC1dJVJ3ozdYWT4mWr80wDIFPhA==
X-WBNR-Posting-Host: 24.199.16.53
From: "=?Utf-8?B?Ym9iYnk=?=" <bobby@discussions.microsoft.com>
Subject: add if statement to global.asa
Date: Sun, 27 Mar 2005 12:27:05 -0800
Lines: 37
Message-ID: <681DCD53-C842-47A0-971E-511A596186B7@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
Path: TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.commerceserver.general:15832
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
X-Tomcat-NG: microsoft.public.commerceserver.general

Hi:
Is there anyway to add an if statement to global.asa. My query looks like
this:


Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
dept.dept_id = ?")

what I want to do is to say

if session_id = 1 and discount = 2 then

Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price * .5 as list_price, pf.sale_price, pf.sale_start,
pf.sale_end,
pv.sku, dept.dept_id FROM diamonds_product pf, diamonds_variant pv,
diamonds_dept dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and
pf.pf_id
= pv.pf_id and pf.pf_id = deptprod.pf_id and dept.dept_id =
deptprod.dept_id
and dept.dept_id = ?")

else

Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
dept.dept_id = ?")

end if

I tried this but I get type mismatch error message.
Thanks for the help


bobby

2005-03-28, 6:13 pm

Hi:
This is a siteserver commerce global.asa thats why I thought this would be
the right place.
Thanks

"Nihit Kaul [MSFT]" wrote:

> Hi,
>
> This seems to be a general ASP question and not specific to Commerce
> Server. Please post in the appropriate newsgroup for ASP and someone should
> be able to help you.
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> Thread-Topic: add if statement to global.asa
> thread-index: AcUzC1dJVJ3ozdYWT4mWr80wDIFPhA==
> X-WBNR-Posting-Host: 24.199.16.53
> From: "=?Utf-8?B?Ym9iYnk=?=" <bobby@discussions.microsoft.com>
> Subject: add if statement to global.asa
> Date: Sun, 27 Mar 2005 12:27:05 -0800
> Lines: 37
> Message-ID: <681DCD53-C842-47A0-971E-511A596186B7@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.general
> Path: TK2MSFTNGXA03.phx.gbl
> Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.commerceserver.general:15832
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Hi:
> Is there anyway to add an if statement to global.asa. My query looks like
> this:
>
>
> Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
> pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
> dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
> dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
> and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
> dept.dept_id = ?")
>
> what I want to do is to say
>
> if session_id = 1 and discount = 2 then
>
> Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
> pf.list_price * .5 as list_price, pf.sale_price, pf.sale_start,
> pf.sale_end,
> pv.sku, dept.dept_id FROM diamonds_product pf, diamonds_variant pv,
> diamonds_dept dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and
> pf.pf_id
> = pv.pf_id and pf.pf_id = deptprod.pf_id and dept.dept_id =
> deptprod.dept_id
> and dept.dept_id = ?")
>
> else
>
> Set MSCSQueryMap.product_info = AddQuery("SELECT pf.pf_id, pf.name,
> pf.list_price, pf.sale_price, pf.sale_start, pf.sale_end, pv.sku,
> dept.dept_id FROM diamonds_product pf, diamonds_variant pv, diamonds_dept
> dept, diamonds_dept_prod deptprod WHERE pv.sku = ? and pf.pf_id = pv.pf_id
> and pf.pf_id = deptprod.pf_id and dept.dept_id = deptprod.dept_id and
> dept.dept_id = ?")
>
> end if
>
> I tried this but I get type mismatch error message.
> Thanks for the help
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com