In Access, create a new parameterized query.
PARAMETERS CustomerID Short;
SELECT Customer.CustomerID, Customer.LastName, Customer.FirstName
ORDER BY Customer.LastName;
Then in Visual Studio .NET, open up the Server Explorer pane and create a new
connection to the MDB (when the Data Link Properties dialog pops up, click the
Provider tab, then select "Microsoft Jet 4.0 OLE DB Provider", etc..)
Then create a new (or open an existing) WinForm in design view
Then navigate to the Stored Procedure in the Server Explorer and drag and drop the
the Stored Procedure onto the form. Visual Studio .NET will then create a new
OledbConnection and OledbCommand objects for you on the form. The code
for these objects will be found in the form's hidden Region "Windows Form
Designer generated code ".
Note you can also drag and drop a Table, which will create a OledbConnection
and a OledbDataAdapter. Visual Studio .NET will create the CommandInsert,
CommandUpdate, and CommandDelete statements from the CommandSelect
statement within the OledbDataAdapter for you automatically.
Microsoft ASP.NET MVP
Hire top-notch developers at