Not sure if you are looking for help or trying to point out the error to someone else. Here's what I see wrong:
1. You have lost your connection to the database, or it was never there to begin with. That's why you are getting the runtime error. 2. This line: String updateip = " Update dsnuser set incomingip= 'request.getRemoteAddr()' where uname = '" + uname + "' "; is all wrong. Your database is not going to know what to do with the "request.getRemoteAddr()" method call. You have to do it like this: String updateip = " Update dsnuser set incomingip= '" + request.getRemoteAddr() + '" You have to include the value of the variable (getRemoteAddr) into the SQL String. 3. You are looking for trouble by nameing a table "dsnSOMETABLE." Tables should generally be named "tblSOMETABLE" Syed -----Original Message----- From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 5:56 PM To: [EMAIL PROTECTED] Subject: How to put getRemoteAddr() into SQL server table? Source code: ----------------------------------------- String updateip = " Update dsnuser set incomingip= 'request.getRemoteAddr()' where uname = '" + uname + "' "; SQLStatement.executeUpdate(updateip); ----------------------------------------- Error message: JDBC Driver]Object has been closed. at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.validateClosedState(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getString(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getString(Unknown Source) Franco =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
