|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
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 |
![]() |
|
Tags: vbnet |
Thread Tools | Search this Thread |
|
![]() | ||||
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 |