ZhiYi
February 1st, 2006, 04:35 AM
Hi,
I am using the microsoft enterprise library 2006 data access application block. I have created an asp.net webpage using vb and added some button controls(create,update,delete,get) and a gridview control. The database to be connected to is NorthWind and the northwnd.mdf and northwnddataset.xsd files have been added to the project.
Besides, I have also configured the data access application block using the 'Enterprise Library Configuration' program. I used the default settings as listed in the enterprise library walkthrough.
I have also linked the gridview to the northwind database using GridView tasks. Are there anymore files to add or anymore configurations to be made before I can start to code and use the features provided by the data access application block? e.g databasefactory, addInParameter, ExecuteDataSet().... etc
ALso, where do we write a procedure?
e.g CREATE PROCEDURE GetProductName
@ProductID int
AS SELECT ProductName FROM Products WHERE ProductID = @ProductID
The enterprise library walkthrough "assumes that the stored procedure has been created in the database to which the connection string in the code refers". So, if we want to write our own procedures, where do we write them and how to 'link' it to the project?
I am using the microsoft enterprise library 2006 data access application block. I have created an asp.net webpage using vb and added some button controls(create,update,delete,get) and a gridview control. The database to be connected to is NorthWind and the northwnd.mdf and northwnddataset.xsd files have been added to the project.
Besides, I have also configured the data access application block using the 'Enterprise Library Configuration' program. I used the default settings as listed in the enterprise library walkthrough.
I have also linked the gridview to the northwind database using GridView tasks. Are there anymore files to add or anymore configurations to be made before I can start to code and use the features provided by the data access application block? e.g databasefactory, addInParameter, ExecuteDataSet().... etc
ALso, where do we write a procedure?
e.g CREATE PROCEDURE GetProductName
@ProductID int
AS SELECT ProductName FROM Products WHERE ProductID = @ProductID
The enterprise library walkthrough "assumes that the stored procedure has been created in the database to which the connection string in the code refers". So, if we want to write our own procedures, where do we write them and how to 'link' it to the project?