Hi!
When using the dataset designer, I sometimes run into a relatively annoying problem.
Scenario 1:
I drop a datatable from the server explorer.
In the wizard, I go back one step and tell it to generate the procedures for me.
When I ge to the step where I can check "GenerateDBDirectMethods", I can do so.
Everything works fine.
Scenario 2:
I have pre-prepared stored procedures.
I drop a datatable from the server explorer.
In the wizard I go back one step and tell it to use existing stored procedures.
When I reach the step where I should be able to check "GenerateDBDirectMethods", I cannot.
I also cannot set the property to True in the dataset properties window, whatever I do.
Is this behavior by design, and if, why so Where is the difference between both scenarios
Regards,
Ziga Jakhel

DataSet Designer - Not able to use "GenerateDBDirectMethods" when using Stored Procedures problem
Caddre
It looks like you may have found a bug here. I don't believe the checkbox should be disabled when creating TableAdapters that use existing stored procedures. I will make sure this is forwarded on to the development team to investigate.
For now, you can work around this by creating a new TableAdapter in the DataSet Designer by right-clicking on the designer surface and choosing Add->TableAdapter. Then go through the wizard choosing Use Existing Stored Procedures. The checkbox will still be disabled but it will be checked and the DBDirect methods will be created. You will also be able to turn on/off the GenerateDBDirectMethods property in the properties window by following this workaround.
I hope this helps.
Jay Hickerson
Visual Basic Team
jeff.townes
I am not able to implement this workaround. I right click and add a tableadapter. and follow the wizard selecting create new stored procedure selection and same error appears. are you saying that we have to create the stored procedures ahead of time and avoid using "Create Stored Procedure" selection or am I doing something wrong
Thanks
pdns
Thanks for the workaround & the swift reply :)
Otherwise the behaviour is really sporadic... if, for instance, I create a dataadapter using sql statements or have it create it's own procedures it works fine... so yes, it definitely smells like a bug.
I already created a bug report via the feedback site... there were similar bugs in the betas but were supposed to have been fixed. Apparently not :(
Thanks again for verifying.
Regards,
Ziga