You should try using the Data Object Wizard to generate a Data Class object
for the Data Environment Command. If nothing else it will give you a TON of
code that shows you how to do most of the below tasks.
To do this, launch the Data Object Wizard Add-In from the project that
contains the Data Environment Command object. Start by 'creating a class'
and on the next step you can select your Data Environment Command object.
Follow through the rest of the steps identifying and FK lookup information,
Persistence information (insert/update/delete) parameter info and mappings
and then press 'finish'. You will see a Data Class generated that can be
simple bound or set as the consumer for a complex bound object such as the
Data Grid. If you want to you can launch the Data Object Wizard again and
instead of creating a Class you can now create a User Control based on the
Class that was just created. Select the DOW generated Data Class, select
the type of control you want to create (Grid, Single Record, etc) and press
finish. You will now have a UserControl bound to the Data Class.
Again, if nothing else you will get a TON of code to get you moving along.
Hope this helps!
>When I use VB6's Data Environment Designer with SQL Server 6.5, I can't do
>the following operations:
>1) Create a stored procedure usign the toolbar command
>2) Use named parameters in stored procedures or SQL text queries
>3) Use the Design mode without getting an error the firs time I drag&drop a
>Table from Data Connection Dialog
>4) Manage OUTPUT parameters without writing ADO code manually
>5) Manage return values from Stored Procedures
>6) Debugging T-SQL in stored procedures called using unnamed parameters in
>text SQL query (like EXEC sp_mysp ?,?,?,?)
>If you know how to resolve any of these problems, please email me!!!