Passing connection string to business logic component

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
 
M

Mark Rae

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.
 
H

heinz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top