Click here to Skip to main content
15,917,329 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: popup window Pin
N a v a n e e t h10-Sep-07 1:51
N a v a n e e t h10-Sep-07 1:51 
QuestionHow to insert HTML string (with tags) in word and display as html Pin
here2learn10-Sep-07 0:33
here2learn10-Sep-07 0:33 
Questionhow do i store news articles? Pin
marvc19-Sep-07 23:46
marvc19-Sep-07 23:46 
Questionprevious page is error but still work.. Pin
hardyyanto9-Sep-07 23:39
hardyyanto9-Sep-07 23:39 
AnswerRe: previous page is error but still work.. Pin
John-ph10-Sep-07 0:37
John-ph10-Sep-07 0:37 
GeneralRe: previous page is error but still work.. Pin
hardyyanto10-Sep-07 5:03
hardyyanto10-Sep-07 5:03 
Questionexcel not working uniformly across machines with same os Pin
S Palip9-Sep-07 23:11
S Palip9-Sep-07 23:11 
Questionmake procedure to check balance > or < totalcost Pin
hardyyanto9-Sep-07 23:03
hardyyanto9-Sep-07 23:03 
helo all...,

i have create procedure can decrease totalcost from order table(database:games.dbo) with balance in bill table(database:bank.dbo). my 2 database in same server is name "boy"

i have 2 database like: bank.dbo and games.dbo

in games.dbo, have a table name is order(user_id,no_order,date,totalcost)

in bank.dbo, have a table name like is bill(no_bill,balance)

this is a list of bill table

no_bill balance

111222 200$

222444 10$

this is a list of order table

user_id no_order date totalcost

a 1 1/1/07 50$

when customer insert no_bill(111222) in page and click a button, then bill table became

no_bill balance

111222 150$

222444 10$

when customer insert no_bill(222444) in page and click a button, then message "sorry, your balance is not enough"


mystore procedure like:

ALTER PROCEDURE [dbo].[pay]
(
@no_bill AS INT,
@no_order AS int,
@totalcost AS money
)
AS
BEGIN
BEGIN TRANSACTION

DECLARE @balanc AS money


SET @balanc= (SELECT [balance] FROM Bank.dbo.bill WHERE [no_bill] = @no_bill)

UPDATE [bank.dbo.bill]
SET
[balance] = @balanc - @totalcost
WHERE
[no_bill] = @no_bill


COMMIT TRANSACTION
END

it can decrease money in bank, but i want it ceck money if balance > totalcost, so balance-totalcost,

if balance<totalcost,so error="" message"sorry,="" your="" balance="" is="" not="" enough"
when="" i="" execute="" store="" procedure="" pay,="" insert="" no_bill,no_order,totalcost.
i="" want="" if="" totalcost="" that=""> balance, it display message"sorry, your balance is not enough"
is it can make in procedure?

thx...
AnswerRe: make procedure to check balance > or < totalcost Pin
John-ph10-Sep-07 1:27
John-ph10-Sep-07 1:27 
GeneralRe: make procedure to check balance > or < totalcost Pin
hardyyanto10-Sep-07 5:27
hardyyanto10-Sep-07 5:27 
QuestionUnmatched records from DataTables Pin
jayarajmrj9-Sep-07 22:55
jayarajmrj9-Sep-07 22:55 
AnswerRe: Unmatched records from DataTables Pin
PrakashBhaskar10-Sep-07 0:54
PrakashBhaskar10-Sep-07 0:54 
AnswerRe: Unmatched records from DataTables Pin
John-ph10-Sep-07 1:03
John-ph10-Sep-07 1:03 
Question[Message Deleted] Pin
Sreekumar P P9-Sep-07 22:41
Sreekumar P P9-Sep-07 22:41 
AnswerRe: MOSS 2007 Workflow Pin
John-ph9-Sep-07 22:55
John-ph9-Sep-07 22:55 
AnswerRe: MOSS 2007 Workflow Pin
Pete O'Hanlon9-Sep-07 23:00
mvePete O'Hanlon9-Sep-07 23:00 
Questionget image properties with javascript [modified] Pin
morteza579-Sep-07 22:25
morteza579-Sep-07 22:25 
AnswerRe: get image properties with javascript Pin
morteza579-Sep-07 23:29
morteza579-Sep-07 23:29 
QuestionIFRAME through ASP.NET with C# Pin
.NET- India 9-Sep-07 21:59
.NET- India 9-Sep-07 21:59 
AnswerRe: IFRAME through ASP.NET with C# Pin
John-ph9-Sep-07 22:48
John-ph9-Sep-07 22:48 
QuestionHOw to display the button id Pin
Mri1a9-Sep-07 21:55
Mri1a9-Sep-07 21:55 
AnswerRe: HOw to display the button id Pin
John-ph9-Sep-07 22:10
John-ph9-Sep-07 22:10 
GeneralRe: HOw to display the button id Pin
Mri1a10-Sep-07 1:11
Mri1a10-Sep-07 1:11 
Questioncan we define the table and div property in the skin in asp.net Pin
Piyush Vardhan Singh9-Sep-07 20:49
Piyush Vardhan Singh9-Sep-07 20:49 
AnswerRe: can we define the table and div property in the skin in asp.net Pin
John-ph9-Sep-07 21:55
John-ph9-Sep-07 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.