Click here to Skip to main content
15,914,160 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple XML problem Pin
DavidNohejl18-May-05 13:26
DavidNohejl18-May-05 13:26 
GeneralRe: Simple XML problem Pin
Snowjim18-May-05 13:31
Snowjim18-May-05 13:31 
GeneralReusing a local port when sending from a bound socket Pin
ghassett2218-May-05 7:28
ghassett2218-May-05 7:28 
QuestionC# 'static' variables on the web? Pin
LizardWiz18-May-05 7:05
LizardWiz18-May-05 7:05 
AnswerRe: C# 'static' variables on the web? Pin
S. Senthil Kumar18-May-05 7:24
S. Senthil Kumar18-May-05 7:24 
AnswerRe: C# 'static' variables on the web? Pin
S Sansanwal18-May-05 12:09
S Sansanwal18-May-05 12:09 
AnswerRe: C# 'static' variables on the web? Pin
Joshua Nussbaum18-May-05 14:21
Joshua Nussbaum18-May-05 14:21 
GeneralWebService DataSet Help Pin
Rougy18-May-05 5:29
Rougy18-May-05 5:29 
Ladies and Gentlemen, I am STUCK!

This is just a test webservice. All I want to do is get the unitprice from the Products table and multiply it by the "howmany" variable.

I'm stumped at how to get the Unitprice out of the dataset.

Here's the code:

[WebMethod]
public float HowMuchWillItCost(string productName, int howMany)
{
try
{
sqlDA.SelectCommand.CommandText = "SELECT UnitPrice from PRODUCTS WHERE ProductName = '" + productName + "'";
sqlDA.Fill(ds11, "price");
float price;
price = (float)ds11.Tables["Products"].Rows[0]["UnitPrice"];
return price * howMany;
}
catch(Exception e)
{
throw new Exception("Error calculating cost: " + e.Message);
}
}
GeneralRe: WebService DataSet Help Pin
Robert Rohde18-May-05 8:40
Robert Rohde18-May-05 8:40 
GeneralRe: WebService DataSet Help Pin
Rougy19-May-05 4:10
Rougy19-May-05 4:10 
GeneralRe: WebService DataSet Help Pin
Rougy19-May-05 4:15
Rougy19-May-05 4:15 
GeneralRe: WebService DataSet Help Pin
Robert Rohde19-May-05 6:16
Robert Rohde19-May-05 6:16 
GeneralrichTextBox keyPress event problem Pin
pessen18-May-05 5:27
pessen18-May-05 5:27 
GeneralRe: richTextBox keyPress event problem Pin
S. Senthil Kumar18-May-05 5:42
S. Senthil Kumar18-May-05 5:42 
GeneralRe: richTextBox keyPress event problem Pin
pessen18-May-05 5:53
pessen18-May-05 5:53 
GeneralProblem in Opening connection in SQL Server Pin
Murtuza Husain Miyan Patel18-May-05 5:10
professionalMurtuza Husain Miyan Patel18-May-05 5:10 
GeneralRe: Problem in Opening connection in SQL Server Pin
Marc Clifton18-May-05 5:51
mvaMarc Clifton18-May-05 5:51 
GeneralRe: Problem in Opening connection in SQL Server Pin
Tom Larsen18-May-05 10:49
Tom Larsen18-May-05 10:49 
GeneralC# equivelant of Eval() Pin
JMichael246818-May-05 4:55
JMichael246818-May-05 4:55 
GeneralRe: C# equivelant of Eval() Pin
Marc Clifton18-May-05 5:47
mvaMarc Clifton18-May-05 5:47 
GeneralProblem in Uploading Files Pin
Anand for every one18-May-05 4:54
Anand for every one18-May-05 4:54 
Questionwhat does the keyword "static" mean? Pin
Sasuko18-May-05 4:43
Sasuko18-May-05 4:43 
AnswerRe: what does the keyword "static" mean? Pin
Tom Larsen18-May-05 4:53
Tom Larsen18-May-05 4:53 
AnswerRe: what does the keyword "static" mean? Pin
Peter Vertes18-May-05 5:09
Peter Vertes18-May-05 5:09 
GeneralRe: what does the keyword "static" mean? Pin
leppie18-May-05 9:34
leppie18-May-05 9:34 

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.