Link to home
Start Free TrialLog in
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.
EditCallSW.txt
Avatar of matrix_aash
matrix_aash
Flag of United Kingdom of Great Britain and Northern Ireland image

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

Cheers.
Add a connection string in the page.

www.connectionstrings.com

Cheers.
Hi

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

session("smbdb")

If you change the connection in the session object, it should point to the new DB.
Avatar of habbotha
habbotha

ASKER

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
Sounds more like web.config file to me..

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

Cheers.
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") =
or
    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.  
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.
ASKER CERTIFIED SOLUTION
Avatar of habbotha
habbotha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Okay thanks for letting us know.

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