471,309 Members | 1,089 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,309 software developers and data experts.

A webserivce that connects to different providers

J-T
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based on
the first paramter go through switch case statment or create classes and
interfaces for it .? I could n't find any samples that can give me some
idea.
Thankls for you time in advance.

Janathon
Dec 5 '05 #1
3 1046
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of course,
this means you might have to tweak some things (depending on whether or not
you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed so
that they all derive from common base classes (which means you can use the
abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based on
the first paramter go through switch case statment or create classes and
interfaces for it .? I could n't find any samples that can give me some
idea.
Thankls for you time in advance.

Janathon

Dec 5 '05 #2
J-T
Hello Nicholas,

I am using .Net Framework 2.0 ,so as you said there is no need for
enterprise library. Can you guide me to the some docs or examples of this?

Thanks a lot

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2******************@TK2MSFTNGP09.phx.gbl...
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of
course, this means you might have to tweak some things (depending on
whether or not you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed so
that they all derive from common base classes (which means you can use the
abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based
on the first paramter go through switch case statment or create classes
and interfaces for it .? I could n't find any samples that can give me
some idea.
Thankls for you time in advance.

Janathon


Dec 5 '05 #3
J-T,

If you look at the inheritance tree for SqlDataAdapter, SqlConnection,
SqlCommand, etc, etc, you will notice that they all derive from common base
classes (which the ole-db, odbc provider derive from as well). Once you
know where you have to get your data from, you can create an instance of
this provider, and then reference only the methods on the base classes
shared by all.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <J-*@nospam.com> wrote in message
news:u0****************@tk2msftngp13.phx.gbl...
Hello Nicholas,

I am using .Net Framework 2.0 ,so as you said there is no need for
enterprise library. Can you guide me to the some docs or examples of this?

Thanks a lot

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2******************@TK2MSFTNGP09.phx.gbl...
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of
course, this means you might have to tweak some things (depending on
whether or not you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed
so that they all derive from common base classes (which means you can use
the abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based
on the first paramter go through switch case statment or create classes
and interfaces for it .? I could n't find any samples that can give me
some idea.
Thankls for you time in advance.

Janathon



Dec 5 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by J.MOUZAKIS | last post: by
1 post views Thread by John | last post: by
2 posts views Thread by =?Utf-8?B?Z292ZXI=?= | last post: by
11 posts views Thread by =?Utf-8?B?UGF0Qg==?= | last post: by
reply views Thread by Kjartan Furnes | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.