Passing connection string to business logic component

  • Thread starter Thread starter Stimp
  • Start date Start date
S

Stimp

I am creating a DLL in VS.NET that will be used on .net and asp
websites.

What is the best way to pass a SQL connection string into the class
methods?

I can't use the web.config method since this won't be compatible with
classic asp websites.

Cheers,
Peter
 
I can't use the web.config method since this won't be compatible with
classic asp websites.

Web.config is just a simple XML document - just use the ASP Classic XML
methods to open it read-only and extract the connection string.
 
1) Create an ordinary text file with the connection string in it
and use a stream reader from asp page and asp.net dll. They are
slightly different in asp and asp.net but both will work fine.
2) Put it in XML and read it form both asp and asp.net with appropriate
methods (google them!)

Hope I have not missed the point!
Heinz
 
Back
Top