Click here to Skip to main content
16,005,206 members
Home / Discussions / Database
   

Database

 
Questionfree online SQL Formatter Pin
Tako.Lee4-Apr-06 23:28
Tako.Lee4-Apr-06 23:28 
QuestionHow to Save the values in DataBase. Pin
Amit Agarrwal4-Apr-06 23:23
Amit Agarrwal4-Apr-06 23:23 
QuestionImporting CSV Files Pin
clint19824-Apr-06 23:22
clint19824-Apr-06 23:22 
AnswerRe: Importing CSV Files Pin
PaulMcKenzie4-Apr-06 23:36
PaulMcKenzie4-Apr-06 23:36 
GeneralRe: Importing CSV Files Pin
PaulMcKenzie4-Apr-06 23:38
PaulMcKenzie4-Apr-06 23:38 
QuestionSending email using Sql Server 2000 CDOSYS Pin
ankushmn4-Apr-06 22:03
ankushmn4-Apr-06 22:03 
QuestionProblem in accessing values from IDataReader Pin
MudkiSekhon4-Apr-06 21:18
MudkiSekhon4-Apr-06 21:18 
AnswerRe: Problem in accessing values from IDataReader Pin
Colin Angus Mackay5-Apr-06 5:07
Colin Angus Mackay5-Apr-06 5:07 
MudkiSekhon wrote:
But when I add two lines of code in it which has nothing to do with the running code, I don't get any exception


This is incorrect. The line code dr.Read() had a lot to do with running the code correctly. You MUST read the first row into the Data Reader before you can access it.

You don't need the rest of the if statement, however.

MudkiSekhon wrote:
Why this problem is happening and why it is not occuring when i add code which has nothing to do with the results.


It is happening because all you have is a Data Reader. You need to tell it what you want it to do with the data. In this case, read the first (and only) row of data. It will make no assumptions on what you want to do with it so it won't advance to any rows of data until you tell it to. This is the correct behaviour. The code you added does have something to do with the results - so the statement that it "has nothing to do with the results" is erroneous.


"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)

My: Website | Blog
Questionsite for oracle 9i architecture Pin
sumit214-Apr-06 19:04
sumit214-Apr-06 19:04 
QuestionSQL 2005 install errors Pin
ThePmanLives4-Apr-06 18:41
ThePmanLives4-Apr-06 18:41 
AnswerRe: SQL 2005 install errors Pin
Jerry Hammond4-Apr-06 19:11
Jerry Hammond4-Apr-06 19:11 
GeneralRe: SQL 2005 install errors Pin
ThePmanLives4-Apr-06 20:34
ThePmanLives4-Apr-06 20:34 
GeneralRe: SQL 2005 install errors Pin
Jerry Hammond4-Apr-06 21:07
Jerry Hammond4-Apr-06 21:07 
GeneralRe: SQL 2005 install errors Pin
ThePmanLives5-Apr-06 15:27
ThePmanLives5-Apr-06 15:27 
GeneralRe: SQL 2005 install errors Pin
ThePmanLives5-Apr-06 16:39
ThePmanLives5-Apr-06 16:39 
QuestionCount of a table whose name if a reference Pin
kevin1274-Apr-06 10:08
kevin1274-Apr-06 10:08 
AnswerRe: Count of a table whose name if a reference Pin
PaulMcKenzie4-Apr-06 10:48
PaulMcKenzie4-Apr-06 10:48 
GeneralRe: Count of a table whose name if a reference Pin
kevin1274-Apr-06 11:08
kevin1274-Apr-06 11:08 
AnswerRe: Count of a table whose name if a reference Pin
Eric Dahlvang4-Apr-06 10:55
Eric Dahlvang4-Apr-06 10:55 
GeneralRe: Count of a table whose name if a reference Pin
kevin1274-Apr-06 11:12
kevin1274-Apr-06 11:12 
AnswerRe: Count of a table whose name if a reference Pin
Eric Dahlvang5-Apr-06 11:27
Eric Dahlvang5-Apr-06 11:27 
QuestionSeeded field Pin
Tom Wright4-Apr-06 6:27
Tom Wright4-Apr-06 6:27 
QuestionSAN box and cluster of SQL 200 or 2005 Pin
Albert Pascual4-Apr-06 4:27
sitebuilderAlbert Pascual4-Apr-06 4:27 
AnswerRe: SAN box and cluster of SQL 200 or 2005 Pin
Mike Dimmick4-Apr-06 11:22
Mike Dimmick4-Apr-06 11:22 
QuestionHow do you query a dataset? Pin
Rashar4-Apr-06 3:42
Rashar4-Apr-06 3:42 

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.