Avatar of habbotha
habbotha asked on

Edditing ASP pages in Dreamweaver

Hi there, I have inheritted a SQL database which has ASP pages attached to it.  The ASP pages were written directily in notepad.  The OLE connection is inbedded into each page manually.  I now need to eddited these pages and insert new fields etc.  However when I work with ASP pages I always work with them via Dreamweaver CS3.  In the past I have only created ASP pages to point to an Access Database.  I understand that the OLE or DSN setup would be the same.  My question really is how can I get these ASP pages to point to the new OLE or DSN connection that I have created in Dreamweaver, so that I dont have to start all 50 odd pages from scratch.  I have attached one of the example pages.
Adobe DreamweaverASPMicrosoft SQL Server 2005

Avatar of undefined
Last Comment

8/22/2022 - Mon

Alter your connection string in the asp pages so that they look at the server and the database you want.


Add a connection string in the page.




Looks like the pages are just using a connection accessed through the Session object:


If you change the connection in the session object, it should point to the new DB.
Your help has saved me hundreds of hours of internet surfing.

Hi Nerdwood,  in doing what you suggested i now get an error message saying the following

   Microsoft VBSscript runtime error '800a01a8'
   Object requird:'[undefined]'
   /hb408dev/EditCallSW.asp, line 56

This is the code on line 56:  set rs=session("hb408dev").execute(SQL)

Thanks Heather

"smbdb" is the name of a variable being passed through the Session object. Somewhere "smbdb" is being set... and I think it has the DB connection. Track "smbdb" down, and I think you have the solution! :P

hi will give it a try thanks.  I am guess it would be in a file similar to "web.config" or "bin" file that Dreamweaver creates
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Sounds more like web.config file to me..

that is the file which should most probably have the connection string.


You should have a connection string in the web.config file... I'm guessing it's called "smbdb".

Classic ASP doesn't have Web.Config.  Its unlikely to have Bin either because back then the DLL had to be registered in Windows and the server rebooted.

It might be referenced in an include file.  What you need to do is do a text search for where the session object is set.  So search for:

    session("smbdb") =

If you site uses a login page, its likely that this value would be set directly after logging in, so check there first.  
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

I object to the closure of this question I'm afraid.  I'd like to know if you solved the problem, and if so, how it was done?

This will provide useful info for people searching for answers in the future.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Okay thanks for letting us know.

I think this question can be PAQ'd now, with your points refunded.