Improve company productivity with a Business Account.Sign Up


Problem selecting custom OLEDB connection string file in recordset (query) when there are multiple database connections.

Posted on 2004-10-19
Medium Priority
Last Modified: 2010-04-25
I created a group of pages stored in a subfolder (Events1) that use an OLEDB custom connection string connecting to a .mdb Access file (db1.mdb). The 'connConnection1' file created by 'define' is stored in the Connections folder. I then started to create another group of pages in a subfolder (Events2) with a new Access .mdb database.  I then created the a second login page in the Events2 folder. With the login page open in the editor I then defined a new customer connection string, 'connConnection2' connecting to db2.mdb, also stored in the Connections folder.  I tested it and it works. When I opened each of the new pages in the second group of pages in the Events2 folder, they all have the 'connConnection1' connection and NOT the 'connConnection2'. If I select the 'connConnection1' entry and click on the '-' icon on the Application > Database tab, the first, 'connConnection1' file is deleted. If I click on the '+' icon and create a new database connection, it has to be a different name. I have NOT been able to locate any help on how to 'change'  the connection from 'connConnection1' or 'add' the 'connConnection2' connection. If I try to add a 'Recordset (Query)' from the Server Behavors tab in the Application panel I'm unable to select another connection - only the first one is displayed.

Why? Where is the database connection file link stored? I've looked at the code and it isn't there! Am I wrong to assume that I can have 2 (or more) OLEDB (NON-DSN) database definitions?
Question by:jimbthom
  • 3
  • 3
LVL 10

Expert Comment

ID: 12357525
yes, you can have more than one connection.  
Just to be clear,
in the applications tab, under databses, you have two connections. conn..1 and con..2
you also have two folders events1 and events2 with files in them.
you can only 'see' the conn..1 form all files?

Also, after rereading you question, I think you 'may' not understand DW way of connections (sorry if I am wrong)

when you setup the two connections, they should be visable ( on application tab)  from all php.asp... pages in your site.  This does NOt mean that that page is connected.
You only need to setup the connection once, then setup the other one once.

now, when you ask DW to talk to the database, you should be given the option of which connection you want to use (becasue you know which  database each connection is conneced to)

Let me know if I am way off base.


Author Comment

ID: 12358697
Thanks for your help. To clarify, on the Database tab of the Application panel only ONE connection (conn..1 or conn..2) is displayed, depending upon the page oppened in the edit window. This is not just in the 'Recordset (Query)' behavior. You may have given a clue. I didn't mention that I am working on .asp pages, not PHP. Any idea where the information on connections available is maintained in DW for newly oppened pages? Because, if I create a new page (right click the mouse), and then open the page created in this manner, it only shows connection conn..1 in the Database tab of the Application panel. I would have assumed that it would display any pages in the Connections folder - and it does not! Right now there are 4 connection .asp files in the Connections folder.

Thonks Rockman.
LVL 10

Accepted Solution

rockmansattic earned 1000 total points
ID: 12359114
Ill look into it after lunch...

one quick thing.  recreate site cache.


See if that helps
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!


Author Comment

ID: 12361313
I recreated the site cache. Didn't make a difference. I closed DW and restarted it. It starts with no connections shown in the Database panel (and grayed). If I switch to another task (the IE window where I'm updating this comment) and then switch back to DW, the 'conn..1' connection is then displayed (grayed). I removed the other two conn files so only 'conn..1' and 'conn..2' are in the Connections folder. If I open a new document (page)using the Files > New > Dynamic page > ASP JavaScript > Create, the new unamed file opens in the edit window AND the newest connection ('conn..2)  is displayed in the Database panel - and it is NOT grayed. I can then save the page (say as test1.asp). I can then open it and the 'conn..2' connection remains displayed - but ONLY the 'conn..2' and not 'conn..1'! If I then create a new page using the 'right-click' mouse button > New File, it creates the file and I then name it test2.asp, when I open it, the Database panel will switch from from 'conn..2' to 'conn..1'.

I am running ver 7.01.

I have another issue which I have searched every help database, forum, Macromedia site, etc., without even finding any similar problem. That problem (see - the File panel view keeps swithing from Testing Server back to Remote View as I work) still remains unresolved. What's more, it appears that this occurs to be unique to my PC. And it never happened before I upgraded to 2004 MX. Possably the problem lies there. I started working on a project for a teacher (and my wife is a teacher) so I purchased (and registered) an Educational Version Suite MX. When I finished that project I decided that DW was MUCH better than FrontPage, which I had been using, so I purchased a non-EV version upgrade. I never created a dynamic page with the EV version so I don't know if the problem would occur with the EV version.

When I updated, the EV version wasn't removed. (I can't remember if I was prompted or not, but it still is on my system, in any case.) Possibly both these issues (and maybe more that I haven't run accross yet) are related to the previous EV, which is still on my system.

I really do appreciate your help. Thanks,


Author Comment

ID: 12374923
I may have discovered the reason this is happening. I originally started developing the site in html code. I later decided to use mostly APS JavaScript, but I inadvently setup the site management for the testing server as VBScript. When I discovered that I had setup the testing server incorrectly as APS VBScript and all my .asp files have VBScript code instead of JavaScript code. I changed the testing server site management to JavaScript. This appears to have fixed the problem. Now what I need to know is if there is any way to convert the 'site' (i.e. multiple .asp files) from VBScript to JavaScript? I haven't been unable to find any extensions or help on the subject.

LVL 10

Expert Comment

ID: 12381329
glad you got it

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…
Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question