473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Move to next record using data binding vb.net

194 100+
hi everybody,

im new to vb.net and have googled around for moving to next record. i connected a MS Access Database using data source in Visual Studio 2008. im using the following code.

Expand|Select|Wrap|Line Numbers
  1.  Inherits System.Windows.Forms.Form
  2.  
  3. #Region " Windows Form Designer generated code "
  4.  
  5. #End Region
  6.     Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
  7.  
  8.         Me.Table1TableAdapter.Fill(Me.EmpDataSet.table1)
  9.  
  10.     End Sub
  11.  
  12.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  13.         'TODO: This line of code loads data into the 'EmpDataSet.table1' table. You can move, or remove it, as needed.
  14.         ' Me.Table1TableAdapter.Fill(Me.EmpDataSet.table1)
  15.  
  16.     End Sub
  17.  
  18.     Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
  19.         Me.BindingContext(EmpDataSet, "table1").Position = Me.BindingContext(EmpDataSet, "table1").Position + 1
  20.  
  21.     End Sub
  22. End Class
  23.  
when i click on load its working and showing the first record from the database. when im clicking at btnNext its not generating any error or warning in visual stduio 2008 and the text fields are not showing the next record? please tell me what i can do to show next record. thank you.
Aug 19 '09 #1
2 14285
vics
2
I have sme question about that.help me please
Jul 4 '10 #2
@vics
well, you might wanna try this:
Me.bindingsourcenaam.MoveNext()
hope it helps, you can also use MoveLast,MoveFirst,MovePrevious
May 11 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: pmud | last post by:
I have an application (ASP.Net using C# ) . I need to read records from the database based on the value entered by the user. Using Data Reader , I can see only one record in text boxes. But how do...
0
by: popsovy | last post by:
Hi I have a question about whether Data Binding can facilitate the process of saving data in a web application I learned that you can data bind information from a number of different data...
0
by: Larry Serflaten | last post by:
I am not sure how many are aware of this sort of data binding, but as it is new to many (classic) VB developers I thought I would post this once just to let people know of its availablility. ...
19
by: Larry Lard | last post by:
In the old days (VB3 era), there was a thing called the Data Control, and you could use it to databind controls on forms to datasources, and so (as the marketing speak goes), 'create database...
1
by: ankz | last post by:
Hi Guys I have got 3 tables - in Access Database with Student ID as primary Key in all and all tables are linked with 1 to 1 relationship. I have code the everying with manual program to...
10
by: giannis | last post by:
How can i know ("see") the next record using the BindingSource without move to the next record ?
1
by: kinnu | last post by:
Hi, Am using Data1.Recordset.FindFirst "Odd_Company_Name='" & sstr & "'" to find a company name in my database. but when we enter a company name with ' then its giving error. Ex: Oracle -...
1
by: sampalmer21 | last post by:
Hi, I'm creating a database application using c# and ado.net with winforms controls. In sql there is a data type called money which stores values in the format xx.xxxx, this is not in the typical...
2
by: jhoelter | last post by:
Hi, First of all, I thank you for reading the following post and taking a little bit of your time helping me figuring this out. I first tryed to explain my exact case, but it is to hard. Let me...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.