473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

ASP Page retrieve Data from Advantage Database

Hello,
I've trying since a few Days to find a Solution for the following Problem:
(complete Query below)

My Query works if I put FROM Fpolicy WHERE Customer =12345
instead of
FROM Fpolicy WHERE Customer =?
I tried it with
FROM Fpolicy WHERE (Customer =::Customer::)
No Success
FROM Fpolicy
Brings all Datasets in Fpolicy

Did anybody see some errors in the SQL Query?
Any suggestions?

I ask it in this Forum because I want to post the Number for "Customer=?" via a asp Page someting like:

http://test/test.asp?Customer=12345

Expand|Select|Wrap|Line Numbers
  1.  
  2. FPOLICY.CUSTOMER,
  3. FPOLICY.AGREEMENT,
  4. FPOLICY.CHARACTERISTIC,
  5. FPOLICY.MASTERPOLICY,
  6. FPOLICY.POLICY,FPOLICY.EFFECTIVEDATE,FPOLICY.EXPDATE,
  7. FPOLICY.POLICYCODE,
  8. FPOLICY.GROSSPREMIUM,
  9. FPOLICY.BRANCH,
  10. FPOLICY.INSCO AS COMPANY,
  11. FPOLICY.CATEGORY,FPOLICY.RENEWIT,
  12. FPOLICY.CANCELDATE,FPOLICY.TRANSACTIONCODE,
  13.  
  14. ( SELECT FAGETR.AMOUNT- Round(ISNULL(Sum(FAGESTL.AMOUNT),0),2)
  15.   FROM  FAGETR LEFT JOIN FAGESTL ON FAGETR.CODE = FAGESTL.TransactionClosed, FAGETRT
  16.   WHERE FAGETR.TRANSACTIONTYPE=FAGETRT.CODE
  17.   AND FAGETRT.IsSettled=True
  18.   AND FAGETRT.SETTLEMODULE = 'GRE'
  19.   AND FAGETR.OWNER=1
  20.   AND FAGETR.OWNERCODE=FPOLICY.TRANSACTIONCODE
  21.   GROUP BY FAGETR.AMOUNT
  22.  
  23. UNION
  24.  
  25.   SELECT  FCUSTR.AMOUNT- Round(ISNULL(Sum(FCUSSTL.AMOUNT),0),2)
  26.   FROM  FCUSTR LEFT JOIN FCUSSTL ON FCUSTR.CODE = FCUSSTL.TransactionClosed, FCUSTRT
  27.   WHERE FCUSTR.TRANSACTIONTYPE=FCUSTRT.CODE
  28.   AND FCUSTRT.IsSettled=True
  29.   AND FCUSTR.OWNERCODE=FPOLICY.TRANSACTIONCODE
  30.   AND FCUSTR.OWNER=1
  31.   GROUP BY FCUSTR.AMOUNT) AS BALANCE
  32.  
  33. FROM Fpolicy WHERE Customer =?
  34.  
  35.  
Oct 21 '06 #1
0 1538

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Don | last post by:
I want the server-side php script to return a browser page that is essentially a copy of the original client page that contained the <form> which referenced the php script in the first place....
3
by: t-ball | last post by:
I am new to the world of ASP, and at the same time VBscript (also a firt time poster). I am currently creating a multiple page form where the information on the first page needs to be validated....
4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
4
by: Belinda | last post by:
Hello All I need to read a SQL Server table into a Web Page and within the Web Page to permit my users to make changes to the records, delete or add new records and then save the entire contents...
1
by: Evan Nelson | last post by:
We are running a website on 3 W2K servers running IIS 5.0 as the webservers and using a server running under Windows Server 2003 for the database servers. All of our ASP pages are written using...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
6
by: Rod Snyder | last post by:
I'm trying to set up an asp.net (vb.net) that will allow a user to insert/update a bio/profile. I wanted to create a SQL Server 2000 table that includes their contact info and bio info. However,...
0
by: Oz | last post by:
Hi Using VS.NET 2003, Windows XP SP1, We have a page which has been developed using ASP.NET. On it, is a button which when clicked is supposed to add some data to a table. When the button is...
1
by: Jon Paal | last post by:
I have a textbox in a form that saves information to a database. A linkbutton activates a function from the user's click to save the data. A leading string of text is added to the content before...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.