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

Visual Basic

 
AnswerRe: Move a file according to a name inside the file itself. Pin
Eddy Vluggen2-Oct-14 4:44
professionalEddy Vluggen2-Oct-14 4:44 
QuestionProblem with entity objects after refreshing model from database Pin
dilkonika30-Sep-14 11:34
dilkonika30-Sep-14 11:34 
AnswerRe: Problem with entity objects after refreshing model from database Pin
Eddy Vluggen2-Oct-14 4:49
professionalEddy Vluggen2-Oct-14 4:49 
QuestionAdd formatting to an excel cell in a loop Pin
Member 1111259730-Sep-14 6:11
Member 1111259730-Sep-14 6:11 
Questioncreate an xml request Pin
jim haras29-Sep-14 1:56
jim haras29-Sep-14 1:56 
AnswerRe: create an xml request Pin
jim haras30-Sep-14 2:47
jim haras30-Sep-14 2:47 
GeneralRe: create an xml request Pin
Eddy Vluggen30-Sep-14 3:04
professionalEddy Vluggen30-Sep-14 3:04 
AnswerRe: create an xml request Pin
Richard Deeming30-Sep-14 3:28
mveRichard Deeming30-Sep-14 3:28 
jim haras wrote:
Dim person1 As New PERSON
For Each dr In dt.Rows
    person1.FIRSTNAME = dr("FIRSTNAME").ToString()
    ...

You're reading the values from each row and storing them in properties of the same object. If you want to convert each row to a Person object, you're going to have to create a new instance of the Person class for each source row, and store them in a list.

jim haras wrote:
PERSON = New PERSON() {person1}

That doesn't look like a valid statement to me.

jim haras wrote:
Exit For

You're exiting the loop after the first record. If you want to convert multiple records to Person objects, you'll need to loop through every record.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: create an xml request Pin
jim haras30-Sep-14 3:49
jim haras30-Sep-14 3:49 
GeneralRe: create an xml request Pin
Richard Deeming30-Sep-14 7:42
mveRichard Deeming30-Sep-14 7:42 
QuestionCalculating total value of different items Pin
Kushal Kumar27-Sep-14 18:11
Kushal Kumar27-Sep-14 18:11 
AnswerRe: Calculating total value of different items Pin
Eddy Vluggen28-Sep-14 2:00
professionalEddy Vluggen28-Sep-14 2:00 
AnswerRe: Calculating total value of different items Pin
Dave Kreskowiak28-Sep-14 3:42
mveDave Kreskowiak28-Sep-14 3:42 
GeneralRe: Calculating total value of different items Pin
Richard MacCutchan28-Sep-14 3:50
mveRichard MacCutchan28-Sep-14 3:50 
GeneralRe: Calculating total value of different items Pin
Dave Kreskowiak28-Sep-14 3:59
mveDave Kreskowiak28-Sep-14 3:59 
GeneralRe: Calculating total value of different items Pin
Tim Carmichael28-Sep-14 6:07
Tim Carmichael28-Sep-14 6:07 
GeneralRe: Calculating total value of different items Pin
Dave Kreskowiak28-Sep-14 12:43
mveDave Kreskowiak28-Sep-14 12:43 
GeneralRe: Calculating total value of different items Pin
Mycroft Holmes28-Sep-14 14:05
professionalMycroft Holmes28-Sep-14 14:05 
Questiontif img print preview Pin
drago1127-Sep-14 12:07
drago1127-Sep-14 12:07 
AnswerRe: tif img print preview Pin
Dave Kreskowiak27-Sep-14 14:41
mveDave Kreskowiak27-Sep-14 14:41 
GeneralRe: tif img print preview Pin
drago1127-Sep-14 19:41
drago1127-Sep-14 19:41 
GeneralRe: tif img print preview Pin
Eddy Vluggen28-Sep-14 2:47
professionalEddy Vluggen28-Sep-14 2:47 
GeneralRe: tif img print preview Pin
Dave Kreskowiak28-Sep-14 3:36
mveDave Kreskowiak28-Sep-14 3:36 
GeneralRe: tif img print preview Pin
drago1128-Sep-14 10:14
drago1128-Sep-14 10:14 
GeneralRe: tif img print preview Pin
Eddy Vluggen29-Sep-14 5:35
professionalEddy Vluggen29-Sep-14 5: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.