Solved

Vb.net Updating records

Posted on 2014-09-11
1
156 Views
Last Modified: 2014-09-15
Hi Experts

I have inherited some one's VB code and trying to learn it

He uses DataConnectors and readers he has created

My Question is I have a new Table I created and 4 TextBoxes and I want the TextBox.text for the 4 of them
to be added to the Table Fields 1 - 4
How using code like

Dim MySQL as string = "Select Field1, field2, field3, field44 from MYTable"
Dim prameters as New DataParameterConnector("@Id", Nothing)
Dim Reader1 as Data.IDataReader = Company.DataConnector.getreader(sql, nothing)

Thanks
0
Comment
Question by:Kevinfeening
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40323318
If you have an IDataReader, then you can access the fields like this:

TextBox1.Text = Reader1("Field1").ToString()

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question