• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

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

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?
0
jimbthom
Asked:
jimbthom
  • 3
  • 3
1 Solution
 
rockmansatticCommented:
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.

Rockman
0
 
jimbthomAuthor Commented:
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.
0
 
rockmansatticCommented:
Ill look into it after lunch...

one quick thing.  recreate site cache.

site>>adv>>recreate.

See if that helps
rockman
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jimbthomAuthor Commented:
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 http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_21164325.html - 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,

Jim
0
 
jimbthomAuthor Commented:
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.

Jim
0
 
rockmansatticCommented:
glad you got it
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now