hey guys,
How do i call a safe datareader which is in my collection class directly from my webform.Is it Possible???
Hi yh_ink,
I don't think you'd want to do that. If you try to read data directly from the database from your form, you'd be missing out on the whole seperation of layers business. Your form should use your business objects, and let the business objects handle reading the data.
Why do you want to use the reader directly in your form? Maybe if you give a scenerio, you could get some options.
Regards,
Mike
hi mike
If i have a get method with datareader in my collection.how can i use that from my form.because it has to be passed with dr.What should be passed in that case.
please let me know
thanks
yh_ink,
I want to make sure I'm clear. You have a public get method in your business object that takes a datareader as a parameter?
Mike
You do not want to pass datareaders around. If you want to pass data to your UI use a collection, custom collection, array of structs or a datatable. Whatever you do, do not pass datareaders to the presentation layer.
Copyright (c) Marimer LLC