Avatar of Larry Rungren
Larry RungrenFlag for United States of America

asked on 

Moving data to texboxes from dataset

New to .NET and I have a VB6 app that I am attempting to convert to VB2010

I have attached a block of code that fills a dataset but when I try to move fields to textboxes I am getting Identifier expected error

I appreciate your assit
DatabasesVisual Basic.NET.NET Programming

Avatar of undefined
Last Comment
Larry Rungren
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

you forgot to attach your code!
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Hi Jeff;

You have not attach anything to the post.
Avatar of Larry Rungren
Larry Rungren
Flag of United States of America image

ASKER

Avatar of Larry Rungren
Larry Rungren
Flag of United States of America image

ASKER

That was my fat fingers not clicking the upload file button
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

you are missing the table and the row:

            txtDescription.Text = ds.tables(0).row(0).item("Description").ToString();
            txtgroup.Text = ds.tables(0).row(0).item("Group").ToString();
             txtDate.Text = ds.tables(0).row(0).item("date").ToString();

Open in new window

Avatar of Larry Rungren
Larry Rungren
Flag of United States of America image

ASKER

txtDescription.Text = ds.tables(0).Rows(0).("Description").ToString();
                txtgroup.Text = ds.tables(0).Rows(0).("Group").ToString();
                txtDate.Text = ds.tables(0).Rows(0).("date").ToString();
 
still generates

Error      1      Identifier expected.      C:\Users\jkingston.MCLE\documents\visual studio 2010\Projects\TermSummaryInput2\TermSummaryInput2\Form1.vb      300      60      TermSummaryInput2
Error      2      Identifier expected.      C:\Users\jkingston.MCLE\documents\visual studio 2010\Projects\TermSummaryInput2\TermSummaryInput2\Form1.vb      301      54      TermSummaryInput2
Error      3      Identifier expected.      C:\Users\jkingston.MCLE\documents\visual studio 2010\Projects\TermSummaryInput2\TermSummaryInput2\Form1.vb      302      53      TermSummaryInput2
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

and why do you have ; if you are in VB?
Avatar of Larry Rungren
Larry Rungren
Flag of United States of America image

ASKER

Thanks.

Your assist and astute eye has me on the right track! :)

As I said I'm fairly new to .NET and the code that had the ; was grabbed from code I found browsing the web. I heard that perhaps VB will be phased out in the not to distant future, is that true?

it is amazing to me that simple processes when being upgraded now require 3 times the code to do the same thing. I know advancing technology, but we are going back to complex ways to do simple things like we did 30 years ago.

The only thing left is moving a sql Text field to a textbox and then I'm home free.  Figured out dates and $$$  any help would be appreciated.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

>>I heard that perhaps VB will be phased out in the not to distant future, is that true?

This is just rumours. Every year, I go to the MVP summit in Redmond and sit with the product team. VB and C# are hands-in-hands now. They are almost on par and they will remain. Don't forget that Microsoft just completely rewrote the compiler (Roslyn) and VB is still in there. It would have been the perfect time to kill it but they didn't.

So long live VB!
Avatar of Larry Rungren
Larry Rungren
Flag of United States of America image

ASKER

That makes me feel better!
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo