data access component - project doesn't access method correctly
Posted on 2004-09-14
I made a component of several dataadapters and a dataset. I also included a public method:
Public class cmpITdata
Public Sub LoadData(ByVal ds As DataSet)
When I call the method in my project, I reference it as follows:
I added a datagrid to the form and specified the datasource as dsbuddata, datamember as spselvendors, and the datakeyfield as vendorid.
In the pageload event I call the databind method on the datagrid (dgVendors.databind) (of course I do this after calling the LoadData procedure).
When I run the project, no data appears in the datagrid. However, if, instead of calling the loaddata procedure, I do the following, it works:
This is my first component so i'm sure I'm doing something wrong here! Any help would be much appreciated. Thanks!