How to Serializable OracleConnection
-
Hi all, I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security. But I known OracleConnection Object build-in .Net without implement IxmlSerializable, in others words OracleConnection don't have ability Serializable. Pls, help me. Give me introduction or some guide to pass Instance of OracleConnection to Client from Webservices. Thank alot Best Regard Luc
-
Hi all, I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security. But I known OracleConnection Object build-in .Net without implement IxmlSerializable, in others words OracleConnection don't have ability Serializable. Pls, help me. Give me introduction or some guide to pass Instance of OracleConnection to Client from Webservices. Thank alot Best Regard Luc
lucdt wrote:
I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security
You can't do that. The Oracle connection object is not serializable. All database operations should be handled by the WebService, not the client. The client and webservice should pass the data back and forth, not database objects like connections, dataadapters, commandbuilders, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hi all, I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security. But I known OracleConnection Object build-in .Net without implement IxmlSerializable, in others words OracleConnection don't have ability Serializable. Pls, help me. Give me introduction or some guide to pass Instance of OracleConnection to Client from Webservices. Thank alot Best Regard Luc
You cannot do this and even if you could there's no point. Separate your application logic to at least 4 different layers: - database - data access layer (the only layer that has to use OracleConnection) - business logic layer - UI layer The layers communicate only with the layer above or underneath so the UI layer does not communicate with DAL and certainly not with the database. There are several good walkthroughs and articles about this in the internet.
The need to optimize rises from a bad design. My articles[^]
-
You cannot do this and even if you could there's no point. Separate your application logic to at least 4 different layers: - database - data access layer (the only layer that has to use OracleConnection) - business logic layer - UI layer The layers communicate only with the layer above or underneath so the UI layer does not communicate with DAL and certainly not with the database. There are several good walkthroughs and articles about this in the internet.
The need to optimize rises from a bad design. My articles[^]
-
lucdt wrote:
I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security
You can't do that. The Oracle connection object is not serializable. All database operations should be handled by the WebService, not the client. The client and webservice should pass the data back and forth, not database objects like connections, dataadapters, commandbuilders, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008