Click here to Skip to main content
15,889,595 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralVariable evaluation Pin
LC Chan17-Sep-04 5:21
LC Chan17-Sep-04 5:21 
GeneralRe: Variable evaluation Pin
Dave Kreskowiak17-Sep-04 6:05
mveDave Kreskowiak17-Sep-04 6:05 
GeneralStorage Pin
schnoodles17-Sep-04 4:19
schnoodles17-Sep-04 4:19 
GeneralRe: Storage Pin
Anonymous17-Sep-04 9:09
Anonymous17-Sep-04 9:09 
GeneralVB.Net 3 Tier Architecture.. Pin
danishfast17-Sep-04 0:53
danishfast17-Sep-04 0:53 
GeneralGraphics problem Pin
Anonymous16-Sep-04 23:54
Anonymous16-Sep-04 23:54 
GeneralADO.NET and VB Pin
Imtiaz Murtaza16-Sep-04 20:13
Imtiaz Murtaza16-Sep-04 20:13 
GeneralRe: ADO.NET and VB Pin
Colin Angus Mackay17-Sep-04 2:28
Colin Angus Mackay17-Sep-04 2:28 
From the code you have given the result will not be in the Command Object as there are no output parameters.

Second, the rs.ExecuteNonQuery() won't do anything useful because your SQL is a SELECT statement. ExecuteNonQuery is for when you do not expect any results back.

Your results are in the SqlDataReader object. Use the SqlDataReader.Read()[^] method to extract each record. The return value of this method will be true if a record was read, or false if there are no more records.

The data reader holds tha values of the current record, it has a number of Get...[^] methods to assist you in getting the values for each of the fields.

After you have the values you need for a record, loop around again calling the Read method until you have all your data.

Does this help?


"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!


GeneralRe: ADO.NET and VB Pin
Dan Morris17-Sep-04 2:32
Dan Morris17-Sep-04 2:32 
GeneralWin 98 vs Win XP Pin
tuningd16-Sep-04 16:25
tuningd16-Sep-04 16:25 
GeneralRe: Win 98 vs Win XP Pin
Dave Kreskowiak16-Sep-04 17:05
mveDave Kreskowiak16-Sep-04 17:05 
GeneralRe: Win 98 vs Win XP Pin
Imtiaz Murtaza16-Sep-04 20:00
Imtiaz Murtaza16-Sep-04 20:00 
GeneralRe: Win 98 vs Win XP Pin
Mekong River17-Sep-04 6:18
Mekong River17-Sep-04 6:18 
GeneralRe: Win 98 vs Win XP Pin
Steven Campbell17-Sep-04 7:53
Steven Campbell17-Sep-04 7:53 
GeneralRe: Win 98 vs Win XP Pin
tuningd17-Sep-04 15:39
tuningd17-Sep-04 15:39 
GeneralRe: Win 98 vs Win XP Pin
User-129471925-Sep-04 11:31
User-129471925-Sep-04 11:31 
GeneralRe: Win 98 vs Win XP Pin
tuningd27-Sep-04 2:16
tuningd27-Sep-04 2:16 
Generaldatagrid - how to add total fields Pin
sribusam16-Sep-04 15:28
sribusam16-Sep-04 15:28 
GeneralRe: datagrid - how to add total fields Pin
Anonymous16-Sep-04 19:13
Anonymous16-Sep-04 19:13 
GeneralRe: datagrid - how to add total fields Pin
sribusam19-Sep-04 13:38
sribusam19-Sep-04 13:38 
Questionvery simple Enumerators, help please? Pin
Nadroj16-Sep-04 15:23
Nadroj16-Sep-04 15:23 
AnswerRe: very simple Enumerators, help please? Pin
Syed Abdul Khader16-Sep-04 18:41
Syed Abdul Khader16-Sep-04 18:41 
GeneralRe: very simple Enumerators, help please? Pin
Nadroj16-Sep-04 18:45
Nadroj16-Sep-04 18:45 
Generalpaper size collection method Pin
V_A_S_S16-Sep-04 13:10
V_A_S_S16-Sep-04 13:10 
GeneralRe: paper size collection method Pin
Anonymous16-Sep-04 14:08
Anonymous16-Sep-04 14:08 

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.