Click here to Skip to main content
15,881,881 members
Home / Discussions / Database
   

Database

 
GeneralRe: Specified cast is not valid? Pin
Christian Graus28-Jun-05 17:07
protectorChristian Graus28-Jun-05 17:07 
GeneralRe: Specified cast is not valid? Pin
WetRivrRat28-Jun-05 17:13
WetRivrRat28-Jun-05 17:13 
GeneralRe: Specified cast is not valid? Pin
WetRivrRat28-Jun-05 17:14
WetRivrRat28-Jun-05 17:14 
GeneralRe: Specified cast is not valid? Pin
Christian Graus28-Jun-05 17:47
protectorChristian Graus28-Jun-05 17:47 
GeneralRe: Specified cast is not valid? Pin
WetRivrRat28-Jun-05 18:11
WetRivrRat28-Jun-05 18:11 
GeneralRe: Specified cast is not valid? Pin
Christian Graus28-Jun-05 18:27
protectorChristian Graus28-Jun-05 18:27 
GeneralRe: Specified cast is not valid? Pin
WetRivrRat28-Jun-05 18:51
WetRivrRat28-Jun-05 18:51 
GeneralRe: Specified cast is not valid? Pin
Christian Graus28-Jun-05 18:59
protectorChristian Graus28-Jun-05 18:59 
Can you select the parameter by name instead of index ? That is dataReader.GetString("Amount") ?

Doesn't look like it. What if you replace this:

"SELECT sum (Amount) From Transaction_table WHERE Location_ID = @machineName and Shift_Number = @ShiftNumber"

with this:

string.Format("SELECT sum(Amount) as TotalAmount from Transaction_table where Location_ID = {0} and Shift_Number = {1}", machine_name, shift_number)

so that you don't have to mess with parameters at all, just pass in the SQL. ( and so your result has a name )

Christian Graus - Microsoft MVP - C++
GeneralRe: Specified cast is not valid? Pin
WetRivrRat29-Jun-05 13:45
WetRivrRat29-Jun-05 13:45 
GeneralImporting a CSV File Into Oracle Pin
wayevans27-Jun-05 10:38
wayevans27-Jun-05 10:38 
GeneralADO connections Pin
HahnTech27-Jun-05 9:07
HahnTech27-Jun-05 9:07 
GeneralPlease give me an advive Pin
Blue_Skye27-Jun-05 8:00
Blue_Skye27-Jun-05 8:00 
GeneralRe: Please give me an advive Pin
StylezHouse27-Jun-05 8:46
StylezHouse27-Jun-05 8:46 
GeneralUnable to Connect to AS400 Pin
wchscott27-Jun-05 5:37
wchscott27-Jun-05 5:37 
QuestionSimplest query to get last 10 records? Pin
Rahul.P.Menon26-Jun-05 21:03
sussRahul.P.Menon26-Jun-05 21:03 
AnswerRe: Simplest query to get last 10 records? Pin
Colin Angus Mackay26-Jun-05 21:37
Colin Angus Mackay26-Jun-05 21:37 
GeneralRe: Simplest query to get last 10 records? Pin
Rahul.P.Menon26-Jun-05 21:47
sussRahul.P.Menon26-Jun-05 21:47 
GeneralReporting Service DataSet Pin
Amal ElHosseiny26-Jun-05 20:35
Amal ElHosseiny26-Jun-05 20:35 
GeneralCheck to see if a Table exists Pin
Wilye26-Jun-05 10:14
Wilye26-Jun-05 10:14 
GeneralRe: Check to see if a Table exists Pin
Colin Angus Mackay26-Jun-05 11:54
Colin Angus Mackay26-Jun-05 11:54 
GeneralRe: Check to see if a Table exists Pin
toxcct27-Jun-05 6:17
toxcct27-Jun-05 6:17 
GeneralRe: Check to see if a Table exists Pin
Bruzak27-Jun-05 19:55
Bruzak27-Jun-05 19:55 
GeneralRe: Check to see if a Table exists Pin
Wilye28-Jun-05 2:55
Wilye28-Jun-05 2:55 
GeneralOLEDB COMMANDS Pin
02088326-Jun-05 9:42
02088326-Jun-05 9:42 
GeneralGet ID Problem Pin
WDI26-Jun-05 7:35
WDI26-Jun-05 7:35 

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.