ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 4th, 2003, 12:26 PM
bpwally bpwally is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Edmonton, Alberta Canada
Posts: 9 bpwally User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help required please

Hi there, I have a huge question that I need some help on.
But before I ask the question, here is some background information:

This is the main area of the website (but not the first page(s) viewed). It is where society members come to check on their investments as well as buy and sell stocks. Only registered, and logged in, members can view these pages. This process will take several pages.
When the users first enter the Trading Page their Stock Portfolio will be displayed. This Stock Portfolio will have the following information for each stock owned:
• A heading with Lastname, Firstname
• Stock Name
• Quantity Owned
• Value of all stock shares for each stock owned
The initial page will also have a form where the user can buy more stocks, or sell a portion of the existing holdings. This form will have the following:
• Buy/Sell option (use a radio button)
• A select control filled with names of at least 10 companies (loaded from a database table) that the user select from to initiate a trade
• The price of each stock will be clearly displayed in a textbox (read only – HINT: use the onChange event of the SELECT control)
• A text box for quantity of stocks to be purchased or sold (in units of 1000) – this will be validated (JavaScript)
• A button that, when pressed, will initiate the trade by sending this information to the next ASP page.
The second page of the Trading Pages will do the following:
1. Test Buy vs. Sell
2. If Sell and quantity of stocks from previous page exceeds Portfolio quantity, then an error message and redirect link back to the previous page.
3. Display the requested transaction in a form containing the following:
a. Stock (read only)
b. Quantity (read only)
c. Price per share (read only)
d. Transaction Price (read only)
e. Transaction Fee (10% of Transaction Price for buying and 5% of Transaction Price for selling) (read only)
f. Total Cost (read only)
g. Two buttons ‘Confirm’ and ‘Cancel’
 On Confirm user will be redirected to a third ASP page
 On Cancel user will be redirected back to main Trading Page
The third page will do all the database transactions (INSERT or UPDATE) and, upon completion, will redirect the user back to the main Trading Page. Each transaction will be recorded and tracked as per the supplied ERD sample.



Now I already have the javascript for the trading of the stocks, but I do not know how have it update in the SQL database.
What I want to know is, can anyone show me a code of having the stocks updated into the sql where the information is retreived?
I hope that makes sense to you all.

Reply With Quote
  #2  
Old December 4th, 2003, 01:41 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 9
So what is your question exactly? Do you need help with your select statment? DB Connection? Getting your request.form("") working, or all of it? Each one of these questions have been answered before, so take a look at the search page. If its a specific problem let me know, and i can try to help.

Reply With Quote
  #3  
Old December 4th, 2003, 02:00 PM
bpwally bpwally is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Edmonton, Alberta Canada
Posts: 9 bpwally User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My fault for not being really clear.
MY question is when they buy a stock, how do I show what they have bought on the page and have it saved in the sql database?

Reply With Quote
  #4  
Old December 4th, 2003, 02:57 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 9
Im not going to take the time to write all the code for you, just do some searches on these terms: Forms, Insert, Request.Form. Some basic info that you need to write in ASP.

To show items from your form you just write out Request.Form("textfieldname goes here").

If you need to insert into a table:
"INSERT INTO tableName (FIELD NAMES) values ('" & request.form("textfieldname") &'")

some good links for some great info:
http://www.w3schools.com/asp/default.asp (asp info)
http://sqlcourse.com/ (sql help)

Good Luck

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Help required please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT