Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 01-07-2009
Member
 
Join Date: Feb 2009
Posts: 96
need some fast VB.net help

I cant get the datagrid to populate.
Any idea why it wouldnt populate? I get an error Datamember property 'getemployees' is not found on the data source.
I's using a stored procedure for this.


thanx in advance




ALTER PROCEDURE getEmployees

AS
SELECT EmployeeID, FirstName, LastName, HireDate
FROM Employees
ORDER BY LastName
RETURN



Public Class Employees

Private Sub Employees_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'load info

Try
Dim EmployeesData As New DataTier 'set data
Dim EmployeesDataSet As NorthwindDataSet 'tell it where to get data

EmployeesDataSet = EmployeesData.getEmployees() 'tell it to get data

Dim ABindingSource As New BindingSource 'make a binder
With ABindingSource
.DataSource = EmployeesDataSet
.DataMember = "getEmployees"

End With
DGVEmployees.DataSource = ABindingSource

Catch ex As Exception
MessageBox.Show(ex.Message) 'exception
End Try

End Sub

End Class


Public Class DataTier
'set variables
Private EmployeesDataSet As NorthwindDataSet
Private EmployeesTableAdapter As NorthwindDataSetTableAdapters.EmployeesTableAdapter

Public Function getEmployees() As NorthwindDataSet 'make data set

EmployeesDataSet = New NorthwindDataSet 'set variables
EmployeesTableAdapter = New NorthwindDataSetTableAdapters.EmployeesTableAdapter 'set adapter

EmployeesTableAdapter.Fill(EmployeesDataSet.Employees) 'fill the adapter
Return EmployeesDataSet 'return the data

End Function
End Class
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "need some fast VB.net help"
Thread Thread Starter Forum Replies Last Post
How to get indexed fast The*Conqueror Technology & Internet 4 16-01-2011 04:32 AM
FPGA for MD5: how fast can it go? Roasted Operating Systems 4 07-05-2010 02:59 PM
Sims 3 Too fast? Paulino Video Games 4 30-03-2010 08:32 AM
Cannot get fast forward or fast reverse to work with Windows Media Player Kodika Windows Software 2 26-12-2009 11:40 PM
How fast is a T3 line? angmar67 Networking & Security 3 17-06-2009 01:51 PM


All times are GMT +5.5. The time now is 12:04 AM.