Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connections Conflict??

Status
Not open for further replies.

sweetp

Technical User
Jan 9, 2002
35
US
I have 2 database connections on my server (using jsp and iPlanet with Dreamweaver). Everything is fine if users only use one of the programs (it never locks up), but if I make both available, after someone uses one, then the next time a person goes into the other jsp program, it hangs. I have the CloseConnection command at the end of each program.

Thanks for any ideas!
sweetp
 
it could be:
-account rights used to connect to DB
-DB setup (permissions, concurrent connections,timeouts...)

make sure ur using an Admin Account to connect in both connection strings...or make 2 differenet admin accounts and use them in those connections...
HTH

> need more info?
:: don't click HERE ::
 
lebisol,

Thanks for your reply. I'm still trying to piece together the possibilities. FYI, I'm using NT and Access 2000. I do have a driver timeout for the ODBC bridge-driver set to 5000 (according to a tech note telling me to do so). General permissions for the DB's are set to authenticated users (full-control).

I don't know how (if) I can set up anything special to say you can have concurrent connections (even though the ODBC driver is single-thread) I figure even if you have only 1 person going into a DB, then getting out, and then another users going into a different DB, it should be able to handle it. If there is something I need to set, I'd sure like to know! My manager really wants both DB's accessible to our users.

What do you mean "using an Admin Account to connect in both connection strings"?

I appreciate any future help!
sweetp
 
OK in that case try doing a DSN-less connection string....in which u can also specify the user /password.
I would suggest that u use diff. accounts for the web access.
u said ur using JavaScripPages to do this?
in that case gear your troubelshooting towards JDBC drivers
take alook at:

wher u will not the :
Code:
  // ODBC data source name 
        String dsn = "jdbc:odbc:Nooderwind"; 
        String user = "admin"; 
        String password = "";
HTH
Keep posting...

> need more info?
:: don't click HERE ::
 
lebisol,

Are you saying that the only way I can run 2 different DB's without conflicts is to use the userid & password portion? I'll look at it, but I don't understand why that would be required. Right now we don't log in at all (they just click the link in our Intranet, and can start using the Conference Room Schedule program). Wow, people aren't going to be happy with me if they need to log in every time!

Again, thanks for all your help.
sweetp
 
no no u most definetly can.
Now, the DW likes to use included connection file (ONLY 1 at the time...sometimes it overwrites the include ...sometimes it does not :-( ) so u would need to do some manual codeing in direction of:
---------------------
Open Connection to DB1
Execute SQL
Close Connection
=============
...to DB2
-||-
Close
------------------------
the issue would arise if u try to display both SQL results from Both connections/DBs on the same Page......different issue.

What I suggested before is to try to use differnt connection type (as a test)....this would not force your users to login...this is an account that u specify for DB.
By defult ur are "admin" meaning that u can do whatever on the DB...from creating tables to deleting entire DB...which as a scurity step 1 should not be allowed.
You should have:
-1 admin account that "does it all"
- web account - used to connect to DB through connection string and can only INSERT,UPDATE,SELECT...whatever appropriate for 'web access' and that is the account u would use in connection string to attach to the database...every visitor/user of the site would use this account just to gain rights to the DB
(most of the samples u see will say user:admin to ensure your can connect but from security point make sure it is not the 'actual admin' account or u will face security issue later on - like SQL injections,URL executions etc.)

so to recap:
It simply could be just that Iplanet locks the DB exclusivly for the 1 account at the time...
1 program=1 connection=1 account

I have very little experience in JSP and tools that come along so I am sorry I cant help you troubleshoot this beast...all I can do is share some general approaches to connectivity....
since no one else is posting u can try posting your connection file and we can see if it something obvious or....hate to say it....look in forums that focus on JSP more than DW itself.
Take care!
All the best!

> need more info?
:: don't click HERE ::
 
Hmmm...posting my connection file. Do you mean the parts in my Dreaweaver code that refer to the connection such as:

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../Connections/conConfRoomSchedule.jsp" %>

which is at the beginning of one DB. There is then some variable stuff and then the following:

// connection information
String MM_editDriver = null, MM_editConnection = null, MM_editUserName = null, MM_editPassword = null;


At the very end of each file that connects to the DB is:

<%
rsAvailConfRooms.close();
StatementrsAvailConfRooms.close();
ConnrsAvailConfRooms.close();
%>

What I'm saying is that Dreamweaver inserted this type of code in my files for both database apps (Conference Room Schedule & Employee Pictorial). Is there some place else I should be looking to give you the info you asked for?

I really appreciate your help. I'm still pretty new to this, and it is frustrating for me because I can't let both apps be available at the same time and I worked so hard on them. Thanks so much.

sweetp
 
Hi Sweetp!
Don't get too frustrated as you will tend to overlook "easy things" :)
Again, sorry but not much experience in writing JSP but we can try...
you would need to post the content of the page conConfRoomSchedule.jsp with bogus user/pass

here is a thread that deals with JSP connectivity:

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top