P
Paul
I have an xsd file called zTest.xsd. In it, I have a DataTable called
CategoryCountByStore, a TableAdapter that is generated automatically called
CategoryCountByStoreTableAdapter, and a GetMethod name
etCategoryCount )which gets the value from a Stored Procedure). Using
Visual Studio 2005 and testing by Preview Data" it works fine, returning an
integer reflecting a SQL Count. (e.g. running the
preview...Results:CategoryCountByStore = 4, for some StoreID that is filled
in in the value column.)
I have a file under the folder App_Code called Stores.vb. In it, I have the
statement:
Public Function CategoryCountByStore(ByVal StoreID As Integer)
Dim CountCategoriesByStore As New
zTestTableAdapters.CategoryCountByStoreTableAdapter
Return CountCategoriesByStore.GetCategoryCount(StoreID)
End Function
I get no error messages (I know that means little).
Now, I would like to get that value displayed on a WebPage, so I tried, in
the page's code-behind: (The Label2 is in the html section)
Dim myCategoryCount As New Stores
Dim StoreID As Integer = 2
Label2.Text = myCategoryCount.CategoryCountByStore(StoreID).ToString.
But I do not get the value I expected (I get the label saying
CategoryCountByStore).
Could you please go over how to get a value from a DataSet, as Visual Studio
makes easy now, to a Class (object?) and then to the page?
TIA,
Paul
CategoryCountByStore, a TableAdapter that is generated automatically called
CategoryCountByStoreTableAdapter, and a GetMethod name
etCategoryCount )which gets the value from a Stored Procedure). Using
Visual Studio 2005 and testing by Preview Data" it works fine, returning an
integer reflecting a SQL Count. (e.g. running the
preview...Results:CategoryCountByStore = 4, for some StoreID that is filled
in in the value column.)
I have a file under the folder App_Code called Stores.vb. In it, I have the
statement:
Public Function CategoryCountByStore(ByVal StoreID As Integer)
Dim CountCategoriesByStore As New
zTestTableAdapters.CategoryCountByStoreTableAdapter
Return CountCategoriesByStore.GetCategoryCount(StoreID)
End Function
I get no error messages (I know that means little).
Now, I would like to get that value displayed on a WebPage, so I tried, in
the page's code-behind: (The Label2 is in the html section)
Dim myCategoryCount As New Stores
Dim StoreID As Integer = 2
Label2.Text = myCategoryCount.CategoryCountByStore(StoreID).ToString.
But I do not get the value I expected (I get the label saying
CategoryCountByStore).
Could you please go over how to get a value from a DataSet, as Visual Studio
makes easy now, to a Class (object?) and then to the page?
TIA,
Paul