473,386 Members | 1,753 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,386 software developers and data experts.

Data Adapter Binding Help

BG
I have a datagrid with paging. Using the following code, it loads data
initially as expected. When I click the next/previous buttons several times,
the table will eventually disappear. It's in the binding but I don't see it.
Any and all suggestions are welcome.

Thanks

G

Sub Page_Load

GetStats(MyIdentity)

End Sub

Sub GetStats(ByVal MyIdentity As String)

Try
Dim Myconnection As New OleDbConnection(connectionstring)
Myconnection.Open()

Dim objSocialAdapter As New OleDbDataAdapter
objSocialAdapter.TableMappings.Add("Table", _SOCIAL)
Dim CmdSocial As OleDbCommand = New OleDbCommand(SQL,
Myconnection)
CmdSocial.CommandType = CommandType.Text
objSocialAdapter.SelectCommand = CmdSocial
objSocialAdapter.Fill(objdset)

Myconnection.Close()

dgSocial.DataSource = objdset.Tables(_SOCIAL)

If Not IsPostBack Then
DataBind()
End If

Catch ex As SystemException

End Try

End Sub
Nov 19 '05 #1
1 852
"BG" <bg*****@yahoo.com> wrote in message
news:41***********************@news.skynet.be...
I have a datagrid with paging. Using the following code, it loads data
initially as expected. When I click the next/previous buttons several
times,
the table will eventually disappear. It's in the binding but I don't see
it.


In the PageChanged and Sort events, you have to reload your data and rebind
it to the DataGrid. Do this after you have changed the new page index.

John Saunders
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
4
by: washoetech | last post by:
Hello, I am working on a project where I need to be able to grab the data from an Excel spreadsheet and create a new table in my database based on the columns in the spreadsheet. After the...
10
by: Fares Eidi | last post by:
I am a VB6 intermediate programmer just starting out using VB.net and would like to ask what I'd be missing out on if I just use time saving techniques like data binding, data adapter wizards etc...
4
by: Agnes | last post by:
I am confused about these two things 1st)As form load I new a data adapter programmicaly , and I can use stored procedure to 'select sth ' and then fill into the dataset.by using binding context,...
1
by: Fred Flintstone | last post by:
I've created my own data classes to retrieve data from a SQL server. I find it far more flexible. But it leaves me with some other questions. I've compiled the data classes to self contained...
9
by: Jenden0 | last post by:
I'm new to C# (and Microsoft in general) so this may be a simple problem, but I haven't been able to figure it out yet. I've got a database with a number of different tables and I want the user...
12
by: Randy | last post by:
Hi, Trying to pass along a table row delete to the datasource, but I'm crashing. Here is the code: Private Sub btnDeleteIngr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
0
by: Aykut Canturk | last post by:
As all we know there are 2 ways for binding gridview to sql table. using sqldata adapter and using code. What I want to know is, in large tables, is there a perfomance difference. When using code...
0
by: akshalika | last post by:
I am new to Biztalk. In my project we need to connect oracle database and insert data into oracle table using BizTalk project. I use WCF Adapter pack(SP2). I create biztalk project then using Consume...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.