Groups | Blog | Home
all groups > inetserver asp db > may 2005 >

inetserver asp db : ASP Connection



Steven Burn
5/24/2005 12:00:00 AM
Take the code for it out of each page, stick it in a new page called =
(for example) myconnection.asp and use the <!--#include tag to include =
it in the pages that use it.

As for your problem, without seeing the code your using, it's a little =
difficult to advise on what to do.

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

[quoted text, click to view]
Wilton Yuan
5/24/2005 12:16:32 AM
Hello,

I developed a ASP web application. I created connection to SQL Server 7 by
DSN at the begin, however, some experts said that DSN connection was not a
good choice. so I changed some of ASP pages to DSNless connection. But the
problem happens, I create DSNless connection on every page, now I have to
move to different computer with diffferent server name. All pages with
DSNless connection stop working unless I change data source to new server
name. This is huge job. Is there a way that I can put the code of connection
to somewhere and the connection will be created when people login, so I
don't have to change it page by page? I know VB and ASP.NET can do that.

Thanks in advance,

Wilton

Wilton Yuan
5/24/2005 11:19:21 PM
Hi Steven Burn,

Thank you very much. Now I added the connection string to global.asa,
but I don't which way is more secure, global.asa or using include file?

Regards,

Wilton

Bob Barrows [MVP]
5/25/2005 7:12:11 AM
[quoted text, click to view]

Neither. They are both equally secure. Somebody would require physical
access to your server in order to acquire your connection string.

I should qualify that: if you've used .inc (or some other extension which is
not included in your ISAPI filter) as the extension for your include file,
it is possible somebody could guess the name of the file and browse to it,
which would in effect, display its contents in the browser (try it). It's a
good practice to use .asp for all files you wish to protect from browsers.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

AddThis Social Bookmark Button