Click here to Skip to main content
16,005,339 members
Home / Discussions / C#
   

C#

 
QuestionAccess violation in mscorwks.dll Pin
asbasir25-May-06 11:35
asbasir25-May-06 11:35 
QuestionHow to append bitmap data to an existing bitmap? Pin
zenzero25-May-06 10:23
zenzero25-May-06 10:23 
AnswerRe: How to append bitmap data to an existing bitmap? Pin
Guffa25-May-06 11:27
Guffa25-May-06 11:27 
GeneralRe: How to append bitmap data to an existing bitmap? Pin
zenzero25-May-06 11:45
zenzero25-May-06 11:45 
QuestionSql multiple queries [modified] Pin
JelleM25-May-06 10:20
JelleM25-May-06 10:20 
AnswerRe: Sql multiple queries [modified] Pin
ShailenSukul25-May-06 11:10
ShailenSukul25-May-06 11:10 
GeneralRe: Sql multiple queries [modified] Pin
Colin Angus Mackay25-May-06 11:34
Colin Angus Mackay25-May-06 11:34 
AnswerRe: Sql multiple queries [modified] Pin
Colin Angus Mackay25-May-06 11:33
Colin Angus Mackay25-May-06 11:33 
You can only have one active reader per connection. You must open a new connection to run two readers simultaneously on the same database. You also don't close your second reader which means it won't get closed until the garbage collector cleans it up - and that may not be for a long time.

However, you can do all this with one SQL command:
SELECT orders.[date], cusomter.customer
FROM orders
INNER JOIN customer ON orders.customerid = customer.id
ORDER BY [date] ASC


So your code would look like this:
SqlCommand = myCommand = new SqlCommand("SELECT orders.[date], cusomter.customer"+
    "FROM orders INNER JOIN customer ON orders.customerid = customer.id ORDER BY [date] ASC";
SqlDataReader myReader = myCommand.ExecuteReader();
while(myReader.Read())
{
    listBestellingen.Items.Add(myReader["date"] + " " + myReader["customer"]);
}
myReader.Close();


Does this help?


"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
GeneralRe: Sql multiple queries [modified] Pin
JelleM26-May-06 0:45
JelleM26-May-06 0:45 
AnswerRe: Sql multiple queries [modified] Pin
Arjan Einbu25-May-06 12:42
Arjan Einbu25-May-06 12:42 
QuestionResizing in designer wont take effect when running. Pin
RanvA25-May-06 10:14
RanvA25-May-06 10:14 
AnswerRe: Resizing in designer wont take effect when running. Pin
alexey N25-May-06 18:12
alexey N25-May-06 18:12 
QuestionGet information about an extended control (IExtenderProvider) Pin
giplet25-May-06 9:14
giplet25-May-06 9:14 
AnswerRe: Get information about an extended control (IExtenderProvider) Pin
Ed.Poore25-May-06 9:53
Ed.Poore25-May-06 9:53 
GeneralRe: Get information about an extended control (IExtenderProvider) Pin
giplet25-May-06 10:48
giplet25-May-06 10:48 
GeneralRe: Get information about an extended control (IExtenderProvider) [modified] Pin
giplet25-May-06 10:51
giplet25-May-06 10:51 
GeneralRe: Get information about an extended control (IExtenderProvider) [modified] Pin
Ed.Poore25-May-06 12:42
Ed.Poore25-May-06 12:42 
GeneralRe: Get information about an extended control (IExtenderProvider) [modified] Pin
Christian Wikander25-May-06 22:22
Christian Wikander25-May-06 22:22 
GeneralRe: Get information about an extended control (IExtenderProvider) Pin
Ed.Poore26-May-06 0:15
Ed.Poore26-May-06 0:15 
GeneralRe: Get information about an extended control (IExtenderProvider) Pin
Christian Wikander26-May-06 0:54
Christian Wikander26-May-06 0:54 
QuestionBiztalk Server Category Pin
FirozOzman25-May-06 9:06
FirozOzman25-May-06 9:06 
Questionhelp me Pin
lucky123456025-May-06 9:02
lucky123456025-May-06 9:02 
AnswerRe: help me Pin
Ed.Poore25-May-06 9:50
Ed.Poore25-May-06 9:50 
GeneralRe: help me [modified] Pin
User 171649225-May-06 13:20
professionalUser 171649225-May-06 13:20 
Questionvirtual application root in javascript? what's the "~" in js?? Pin
lsugirljte25-May-06 8:59
lsugirljte25-May-06 8:59 

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.