Hi all,
      Can run Active Server Pages in Apache on UNIX/Windows.

Thanks in advace.

Udaya.




-----Original Message-----
From: Richard Yee
To: [EMAIL PROTECTED]
Sent: 09/28/2001 11:07 AM
Subject: Re: Jdbc error

What kind of tables are you using in MySQL?  If you are using ISAM,
MyISAM
or HEAP tables, you can't use commit/rollback.
 From the MySQL docs:

1.4.6 How to Cope Without COMMIT/ROLLBACK

The following mostly applies only for ISAM, MyISAM, and HEAP tables. If
you
only use transaction-safe tables (BDB, or InnoDB tables) in an an
update,
you can do COMMIT and ROLLBACK also with MySQL. See section 6.7.1
BEGIN/COMMIT/ROLLBACK Syntax.

The problem with handling COMMIT-ROLLBACK efficiently with the above
table
types would require a completely different table layout than MySQL uses
today. The table type would also need extra threads that do automatic
cleanups on the tables, and the disk usage would be much higher. This
would
make these table types about 2-4 times slower than they are today.

For the moment, we prefer implementing the SQL server language
(something
like stored procedures). With this you would very seldom really need
COMMIT-ROLLBACK. This would also give much better performance.

Loops that need transactions normally can be coded with the help of LOCK
TABLES, and you don't need cursors when you can update records on the
fly.
.
.
.


Regards,

Richard


At 11:29 AM 9/28/01 -0700, you wrote:
>Hi,all
>I had asked this question before,but can't get any answers. could
anyone
>answer me?thanks .
>
>I connected MSsql server with a type4 jdbc driver(atinav).
>I want to execute two update statement in a transaction.the code as
below:
>..............................
>      dbCon.setAutoCommit(false);
>       strSql="update ms_empType set type_desc=?
>,salary_type=?,prob_after=?,prob_unit=?,"+
>         "fix_work_day=?,pay_code=?,base_inc=?,inc_ot=? ,emp_type=?
where
>emp_Type=?";
>       PreparedStatement pstmt3=dbCon.prepareStatement(strSql) ;
>       pstmt3.setString(1,typeDesc) ;
>       pstmt3.setString(2,salaryType) ;
>       pstmt3.setInt(3,probAft) ;
>       pstmt3.setString(4,probUnit);
>       pstmt3.setFloat(5,fwd);
>       pstmt3.setString(6,payCode) ;
>       pstmt3.setFloat(7,baseInc) ;
>       pstmt3.setString(8,incOt);
>       pstmt3.setString(9,"iv") ;
>       pstmt3.setString(10,oEmpType) ;
>       pstmt3.executeUpdate() ;
>       pstmt3.close() ;
>       strSql="update ms_empType set type_desc=?
>,salary_type=?,prob_after=?,prob_unit=?,"+
>         "fix_work_day=?,pay_code=?,base_inc=?,inc_ot=? ,emp_type=?
where
>emp_Type=?";
>       PreparedStatement pstmt2=dbCon.prepareStatement(strSql) ;
>       pstmt2.setString(1,typeDesc) ;
>       pstmt2.setString(2,salaryType) ;
>       pstmt2.setInt(3,probAft) ;
>       pstmt2.setString(4,probUnit);
>       pstmt2.setFloat(5,fwd);
>       pstmt2.setString(6,payCode) ;
>       pstmt2.setFloat(7,baseInc) ;
>       pstmt2.setString(8,incOt);
>       pstmt2.setString(9,empType) ;
>       pstmt2.setString(10,oEmpType) ;
>       pstmt2.executeUpdate() ;
>       pstmt2.close() ;
>       dbCon.commit() ;
>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
>but when i run the jsp includes this code,it throw an error:
>[JDBC SQL Server Driver] Only one statement is allowed in transaction
mode.
>
>if ,as it said,a transaction can't include above one statement,how can
i do
>to control transaction?

========================================================================
===
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
WARNING: The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee.  Access to this message
by anyone else is unauthorised.  If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message in
error. Thank you.----------------- HCL Perot Systems

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to