Insert, Update failling |
Mike |
2006-10-05 14:30:10 |
I recently downloaded the trial version of the Paradox v3.0 Driver and I am trying to do select,update and delete to make sure all works fine before I can go ahead acquire the license but I am facing the following issues:
1. Insert does not work if any of the table column names contain a space e.g.
Error Message. Here Error Message is a table name when I try to do insert or update it gives the following error:
Syntax error: Stopped parse at Message
java.sql.SQLException: Syntax error: Stopped parse at Message
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.a.b.a(Unknown Source)
at com.hxtt.a.b.a(Unknown Source)
at com.hxtt.a.b.f(Unknown Source)
at com.hxtt.sql.bl.l(Unknown Source)
at com.hxtt.sql.ag.if(Unknown Source)
at com.hxtt.sql.dd.(Unknown Source)
at com.hxtt.sql.bl.a(Unknown Source)
at com.hxtt.sql.bl.prepareStatement(Unknown Source)
at com.hxtt.sql.bl.prepareStatement(Unknown Source)
at com.hxtt.sql.bl.prepareStatement(Unknown Source)
and here is my sql:
String sql="INSERT INTO Validation (Drive,Directory,Extension,Error Message) VALUES (?,?,?,?)";
Now if I remove Error Message column it works fine.
2. It never inserts a data if any column is of type COUNTER, Number or Short. I get the following error:
Failed to insert a new record into table zone! For more information, please use SQLException.getNextException().
java.sql.SQLException: Failed to insert a new record into table zone! For more information, please use SQLException.getNextException().
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.paradox.l.if(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.w.a(Unknown Source)
at com.hxtt.sql.by.for(Unknown Source)
at com.hxtt.sql.bs.int(Unknown Source)
at com.hxtt.sql.db.a(Unknown Source)
at com.hxtt.sql.bl.a(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.dd.char(Unknown Source)
at com.hxtt.sql.dd.executeUpdate(Unknown Source)
I don't about other datatypes. I just wanted to make sure I am able to do any DML tasks before I go ahead and get the license.
Your feedback is appreciated.
Thanks
|
Re:Insert, Update failling |
HXTT Support |
2006-10-05 19:46:45 |
>and here is my sql:
>String sql="INSERT INTO Validation (Drive,Directory,Extension,Error Message)
> VALUES (?,?,?,?)";
>Now if I remove Error Message column it works fine.
You should use:
INSERT INTO Validation (Drive,Directory,Extension,"Error Message") VALUES (?,?,?,?) ;
Or
INSERT INTO Validation (Drive,Directory,Extension,[Error Message]) VALUES (?,?,?,?)
>2. It never inserts a data if any column is of type COUNTER, Number or Short.
> I get the following error:
>Failed to insert a new record into table zone! For more information, please
> use SQLException.getNextException().
You should use:
catch( SQLException sqle )
{
do
{
System.out.println(sqle.getMessage());
System.out.println("Error Code:"+sqle.getErrorCode());
System.out.println("SQL State:"+sqle.getSQLState());
sqle.printStackTrace();
}while((sqle=sqle.getNextException())!=null);
}
to know the detailed error inforamtion. Your sql hasn't passed data verification.
>I don't about other datatypes.
All of Paradox data types, which includes AutoInc, BCD, OLE, Graphic, and so on, are supported.
|
Re:Re:Insert, Update failling |
Mike |
2006-10-06 08:17:59 |
Thanks putting it in [..] worked but I am still not able to insert where the datatype is COUNTER and where the datype is not defined, here is the description of table along with datatypes
Table Name: zone
Columns Name, Type, Size, Scale, Not NULL
ZoneID AlphaNumeric 10 Yes
ZoneDescr AlphaNumeric 30 Yes
ExportSetID 0 Yes
UID COUNTER 30 0 No
And here is the sql to insert:
String sql = "INSERT INTO zone (ZoneID,ZoneDescr,UID) VALUES (?,?,?)";
con = DriverManager.getConnection(url, "", "");
pstmt = con.prepareStatement(sql);
pstmt.setString(1,"1");
pstmt.setString(2,"Zone");
pstmt.setInt(3,4);
And here is the error I am getting:
Failed to insert a new record into table zone! For more information, please use SQLException.getNextException().
Error Code:393216
SQL State:60000
java.sql.SQLException: Failed to insert a new record into table zone! For more information, please use SQLException.getNextException().
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.paradox.l.if(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.w.a(Unknown Source)
at com.hxtt.sql.by.for(Unknown Source)
at com.hxtt.sql.bs.int(Unknown Source)
at com.hxtt.sql.db.a(Unknown Source)
at com.hxtt.sql.bl.a(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.dd.char(Unknown Source)
at com.hxtt.sql.dd.executeUpdate(Unknown Source)
An invalid index data block at position 2048 of C:\Seltec\active\Data\zone.PX
Error Code:139264
SQL State:22000
java.sql.SQLException: An invalid index data block at position 2048 of C:\Seltec\active\Data\zone.PX
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.paradox.r.a(Unknown Source)
at com.hxtt.sql.paradox.r.a(Unknown Source)
at com.hxtt.sql.paradox.f.if(Unknown Source)
at com.hxtt.sql.paradox.f.a(Unknown Source)
at com.hxtt.sql.paradox.l.if(Unknown Source)
at com.hxtt.sql.paradox.l.a(Unknown Source)
at com.hxtt.sql.w.a(Unknown Source)
at com.hxtt.sql.by.for(Unknown Source)
at com.hxtt.sql.bs.int(Unknown Source)
at com.hxtt.sql.db.a(Unknown Source)
at com.hxtt.sql.bl.a(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.dd.char(Unknown Source)
at com.hxtt.sql.dd.executeUpdate(Unknown Source)
It's happening for all the tables where I have a type COUNTER and is required.
Any ideas. I need to do couple of more tests and if all goes fine will need to get the license. Thanks
|
Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 08:40:32 |
>java.sql.SQLException: An invalid index data block at position 2048 of
> C:\Seltec\active\Data\zone.PX
>It's happening for all the tables where I have a type COUNTER and is required.
You can bacup your zone.* talbe, then try once "reindex all on zone" sql, then your insert sql should work normally.
|
Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-06 09:31:16 |
Thanks I am going to try that, but what about where the type of the column is not define. If I try to insert a data in one of the columns where type is not defined it still fails and gives the above error.
Also update does not work if the WHERE clause contains a column-type Short
For example;
column name, type, size
Error Level, Short, 5
Here is my sql:
String sql="UPDATE Verify Set Drive = ?, Directory = ?, Extension = ?,[Error Message] = ?,[Error Code] = ? WHERE [Error Code] = ?";
pstmt.setString(1,"q7");
pstmt.setString(2,"desc7");
pstmt.setString(3,"desc7");
pstmt.setString(4,"we27");
pstmt.setString(5,"6.00");
pstmt.setString(6,"5.00");
But if in my WHERE clause it's Alphanumeric column it works fine, e.g. the following works fine
String sql="UPDATE Verify Set Drive = ?, Directory = ?, Extension = ?,[Error Message] = ?,[Error Code] = ? WHERE Drive = ?";
pstmt.setString(1,"q7");
pstmt.setString(2,"desc7");
pstmt.setString(3,"desc7");
pstmt.setString(4,"we27");
pstmt.setString(5,"6.00");
pstmt.setString(6,"q7");
I have still more test scenarios to go through.
Thanks
|
Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 09:36:04 |
ftp site: ftp.hxtt.com
ftp user: anonymous@hxtt.com
ftp password: (empty)
login mode: normal (not anonymous)
ftp port:21
upload directory: incoming
After upload, you can't see that upload file, but it has been upload. Please include your .db, .px, and so on. Then we will recur your issue and support it in 24 hours.
|
Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-06 09:51:14 |
Thanks I am going to try that, but what about where the type of the column is not define. If I try to insert a data in one of the columns where type is not defined it still fails and gives the above error.
Also update does not work if the WHERE clause contains a column-type Short
For example;
column name, type, size
Error Level, Short, 5
Here is my sql:
String sql="UPDATE Verify Set Drive = ?, Directory = ?, Extension = ?,[Error Message] = ?,[Error Code] = ? WHERE [Error Code] = ?";
pstmt.setString(1,"q7");
pstmt.setString(2,"desc7");
pstmt.setString(3,"desc7");
pstmt.setString(4,"we27");
pstmt.setString(5,"6.00");
pstmt.setString(6,"5.00");
But if in my WHERE clause it's Alphanumeric column it works fine, e.g. the following works fine
String sql="UPDATE Verify Set Drive = ?, Directory = ?, Extension = ?,[Error Message] = ?,[Error Code] = ? WHERE Drive = ?";
pstmt.setString(1,"q7");
pstmt.setString(2,"desc7");
pstmt.setString(3,"desc7");
pstmt.setString(4,"we27");
pstmt.setString(5,"6.00");
pstmt.setString(6,"q7");
I have still more test scenarios to go through.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-06 10:16:15 |
I have uploaded the following files:
zone.PX
ACS.PX
xone.DB
ACS.DB
Verify.db
Noname1.java
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 19:04:06 |
Your upload Verify.db file has a wrong file size(10237bytes), and it should be 10240 bytes. Please try to zip it and reupload.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 19:10:03 |
That verify.db is an invalid pd file in fact.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 19:25:11 |
After run once "reindex all on zone",
String testsql = "INSERT INTO zone (ZoneID,ZoneDescr,UID) VALUES (?,?,?)";
pstmt = con.prepareStatement(testsql);
pstmt.setString(1,"1");
pstmt.setString(2,"Zone");
pstmt.setInt(3,4);
pstmt.executeUpdate();
will failed because primary key violation since there's a row with ZoneID=1.
If used
pstmt.setString(1,"2");
a new row will be normally inserted.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 19:36:59 |
>It's happening for all the tables where I have a type COUNTER and is required.
It's supported, and I haven't seen any issue with it.
For ACS table sample, ACS.px isn't correct too. After run once "reindex all on ACS", you can do the normal insert too.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-06 19:40:44 |
>Thanks I am going to try that, but what about where the type of the column is
> not define. If I try to insert a data in one of the columns where type is not
> defined it still fails and gives the above error.
I haven't seen " the column is not define" message.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-12 19:31:22 |
Hi,
I'll be using the drivers in my we app, but want to know if there's a way to get a connection from a pool rather than manually opening and closing a connection for each request. I am on Oracle Applicarion Sever 10g. Is there a way to get Database connection from PoolableConnections and use JNDI etc. in Oracle App. Server 10g any small sample for me to test. Any performance issues or connection availability in case of concurrent requests i.e. more than 100 a time. I saw an example for PoolableConnections for Tomcat but how will this work for Oracle App Server.
What kind of support I'll get if encountered any issues. How to proceed buying the license and drivers. I have tested the drivers locally but want to make sure how it works in a web application using JNDI for connection lookup.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-12 20:02:36 |
>I saw an example for PoolableConnections for Tomcat but how will this work for
> Oracle App Server.
It can work for Oracle too. It's listed only for Tomcat setting is complicated.
You can find PooledConnection too.
import com.hxtt.sql.*;
HxttConnectionPoolDataSource pds=new HxttConnectionPoolDataSource();
pds.setUrl("jdbc:paradox:/f:/paradoxfiles");
javax.sql.PooledConnection pc=pds.getPooledConnection();
HxttDataSource ds=new HxttDataSource();
ds.setUrl("jdbc:paradox:/f:/paradoxfiles");
HxttRowSet rowSet=new HxttRowSet(ds);
>What kind of support I'll get if encountered any issues.
HXTT provides prompt support, and most issue will be solved in 48 hours.
> How to proceed buying the license and drivers.
It's at Order URL
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-17 10:05:59 |
Hi,
What is the following referencing to :
jdbc:paradox:/f:/paradoxfiles
is this the path to the DataSource.xml file. For Oracle I'll be putting my Datasource values in data-sources.xml can you provide the steps for creating the DataSource PoolConnections in Oracle App. Server. I still am unable to use the connection pool for Oracle App.
So if possible to give the steps. Also does the drivers support batch execution.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-18 04:06:29 |
Hi,
Beside the above issue related to creating a poolable connection in oracle and steps for that, I also discovered another issue with the drivers. Here is the scenario:
I have a column named UID that is an autonumber and whenever I insert any record that number should get incremented and be auto populated in the UID field. But this is not happening, the new Record gets inserted but when I see the UID field it's still blank.
Now if I use the Paradox SQLTool to execute the insert statement it does populate the UID field automatically. I also have a Desktop Application in which whenever a new record is inserted it does populate the UID automatically I believe it's some kind of a sequence. But when using JDBC Drivers to do an insert it never populates the UID field. Any ideas.
This is the main issue and would really like your feedback.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-18 09:07:12 |
>But when using JDBC Drivers to do an insert it never populates the UID field.
> Any ideas.
The latet JDBC 3.0 package has supported to update autonumber type automatically. Please download it.
>can you provide the steps for creating the DataSource PoolConnections in
> Oracle App. Server.
We're downloding Oracle App. Server to prepare such a guide.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-18 10:56:43 |
I am using the latest JDBC 3.0 package but still not able to update autonumber type automatically.
Also regarding Oracle Pool Connection any idea how long it will be before the documentation is ready as we need to get the driver license ASAP. And would really like the above two working.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-18 11:21:28 |
>I am using the latest JDBC 3.0 package but still not able to update autonumber
> type automatically.
It's complemented after received your report on 2006-10-18 04:06:29.0. Please download it.
>how long it will be before the documentation is ready
It should be available in the next 48 hours. First, HXTT need to install Oracle App. Server, then write out such a document.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-18 14:08:17 |
Thanks it worked fine. I'll check back for the Oracle ConnectionPool tomorrow and once tested will go ahead and get the license.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-19 06:38:37 |
Hi,
Mike , I cannot get the Oracle App Server to test your the Oracle ConnectionPool,(the oracle web-site is too snow), but I uses the JDevelop(jdev1013) to test, it should be same about how to configure the ConnectionPool.
You can find a file named data-sources.xml in \j2ee\home\config directory or other location.
Please add the followed code to the file as a child node of data-sources node.
<native-data-source data-source-class="com.hxtt.sql.HxttConnectionPoolDataSource" jndi-name="pgPool"
name="pgPool"
url="jdbc:paradox:/c:/aaaa">
</native-data-source>
Then you can use the follows code to access the datasource and get connection.
Context ctx = new InitialContext();
com.hxtt.sql.HxttConnectionPoolDataSource a = (com.hxtt.sql.HxttConnectionPoolDataSource) ctx.lookup(jndisrcname);
PooledConnection aConn = a.getPooledConnection();
Statement aStat = aConn.getConnection().createStatement();
aStat.executeUpdate("create table XYZ(AINT INT)");
aStat.executeUpdate("insert into XYZ values (1)");
aStat.executeUpdate("insert into XYZ values (2)");
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-19 11:01:31 |
Thanks I'll try but need some clarification.
name="pgPool"
url="jdbc:paradox:/c:/aaaa">
In the above what is jdbc:paradox:/c:/aaaa
does c:/aaa points to the databased location
Also can I define multiple tags with different names in datasource.xml file. Lets say I am connecting to 4 different databases etc. so should I be defining 4 like above with different settings in my xml file.
The other question is regrading the following:
com.hxtt.sql.HxttConnectionPoolDataSource a = (com.hxtt.sql.HxttConnectionPoolDataSource) ctx.lookup(jndisrcname);
what is jndisrcname in the above ctx.lookup(jndisrcname); is it pgPool as defined in the datasource.xml file.
Again thanks for all the support and help.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-19 19:30:26 |
Besides the above questions I have the following issues too
I followed your instructions but no luck so would really need ur help to figure this out. As I am lost right now and don't know what to do.
I have placed the Paradox_JDBC30.jar in the following folder of Application Server
/lib
and entered the following entry in /j2ee/home/config/application.xml in Application Server
I have the following question....
1. Where do I put the username/password inside the data-sources.xml under /j2ee/home/config
Following is my data-sources.xml of Oracle Application Server.
Here is the sample Servlet code I have deployed in Oracle Application Server but unable to get the response:
import java.io.IOException;
import java.io.PrintWriter;
import javax.naming.*;
import java.sql.*;
import javax.sql.PooledConnection;
import javax.servlet.*;
import javax.servlet.http.*;
public class testServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
public void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
try{
Context ctx = new InitialContext();
com.hxtt.sql.HxttConnectionPoolDataSource a = (com.hxtt.sql.HxttConnectionPoolDataSource) ctx.lookup("pgPool");
PooledConnection aConn = a.getPooledConnection();
Statement aStat = aConn.getConnection().createStatement();
ResultSet rs = aStat.executeQuery("select * from Zone where ZoneID=0.71");
ResultSetMetaData resultSetMetaData = rs.getMetaData();
int iNumCols = resultSetMetaData.getColumnCount();
for (int i = 1; i <= iNumCols; i++)
{
System.out.println(resultSetMetaData.getColumnLabel(i)
+ " " +
resultSetMetaData.getColumnTypeName(i));
}
Object colval;
while (rs.next())
{
for (int i = 1; i <= iNumCols; i++) {
colval = rs.getObject(i);
System.out.print(colval + " ");
}
System.out.println();
}
rs.close();
aStat.close();
aConn.close();
}
catch( SQLException sqle )
{
do
{
System.out.println(sqle.getMessage());
System.out.println("Error Code:"+sqle.getErrorCode());
System.out.println("SQL State:"+sqle.getSQLState());
sqle.printStackTrace();
}while((sqle=sqle.getNextException())!=null);
}
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}
Your response is really appreciated. Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-19 19:33:45 |
Besides the above questions I have the following issues too
I followed your instructions but no luck so would really need ur help to figure this out. As I am lost right now and don't know what to do.
I have placed the Paradox_JDBC30.jar in the following folder of Application Server
<code>
<ORACLE_MIDTIER_HOME>/lib
</code>
and entered the following entry in <ORACLE_MIDTIER_HOME>/j2ee/home/config/application.xml in Application Server
<code>
<library path="../../../lib/Paradox_JDBC30.jar"/>
</code>
I have the following question....
1. Where do I put the username/password inside the data-sources.xml under <ORACLE_MIDTIER_HOME>/j2ee/home/config
Following is my data-sources.xml of Oracle Application Server.
<code>
<?xml version = '1.0' standalone = 'yes'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources-9_04.dtd">
<data-sources>
<!--
An example/default DataSource that uses
Oracle JDBC-driver to create the connections.
This tag creates all the needed kinds
of data-sources, transactional, pooled and EJB-aware sources.
The source generally used in application code is the "EJB"
one - it provides transactional safety and connection
pooling. Oracle thin driver could be used as well,
like below.
url="jdbc:oracle:thin:@host:port:sid"
-->
<data-source class="com.evermind.sql.DriverManagerDataSource" name="OracleDS1" location="jdbc/OracleCoreDS" xa-location="jdbc/xa/OracleXADS" ejb-location="jdbc/OracleDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="scott" password="tiger" url="jdbc:oracle:thin:@//localhost:1521/oracle.regress.rdbms.dev.us.oracle.com" inactivity-timeout="30"/>
<native-data-source data-source-class="com.hxtt.sql.HxttConnectionPoolDataSource" jndi-name="pgPool" name="pgPool" url="jdbc:Paradox:///C://Seltec/active//Data"></native-data-source><data-source class="com.evermind.sql.DriverManagerDataSource" name="OracleDS" location="jdbc/wsDemoEmulatedOracleCoreDS" xa-location="jdbc/xa/wsDemoEmulatedOracleXADS" ejb-location="jdbc/wsDemoEmulatedDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="jemuser" password="jempasswd" url="jdbc:oracle:thin:@localhost:1521:ORCL" inactivity-timeout="30"/></data-sources>
</code>
Here is the sample Servlet code I have deployed in Oracle Application Server but unable to get the response:
<code>
import java.io.IOException;
import java.io.PrintWriter;
import javax.naming.*;
import java.sql.*;
import javax.sql.PooledConnection;
import javax.servlet.*;
import javax.servlet.http.*;
public class testServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
public void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
try{
Context ctx = new InitialContext();
com.hxtt.sql.HxttConnectionPoolDataSource a = (com.hxtt.sql.HxttConnectionPoolDataSource) ctx.lookup("pgPool");
PooledConnection aConn = a.getPooledConnection();
Statement aStat = aConn.getConnection().createStatement();
ResultSet rs = aStat.executeQuery("select * from Zone where ZoneID=0.71");
ResultSetMetaData resultSetMetaData = rs.getMetaData();
int iNumCols = resultSetMetaData.getColumnCount();
for (int i = 1; i <= iNumCols; i++)
{
System.out.println(resultSetMetaData.getColumnLabel(i)
+ " " +
resultSetMetaData.getColumnTypeName(i));
}
Object colval;
while (rs.next())
{
for (int i = 1; i <= iNumCols; i++) {
colval = rs.getObject(i);
System.out.print(colval + " ");
}
System.out.println();
}
rs.close();
aStat.close();
aConn.close();
}
catch( SQLException sqle )
{
do
{
System.out.println(sqle.getMessage());
System.out.println("Error Code:"+sqle.getErrorCode());
System.out.println("SQL State:"+sqle.getSQLState());
sqle.printStackTrace();
}while((sqle=sqle.getNextException())!=null);
}
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}
</code>
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-20 04:32:43 |
You can set the username and password in the native-data-source node.
<native-data-source data-source-class="com.hxtt.sql.HxttConnectionPoolDataSource" jndi-name="pgPool" name="pgPool"
url="jdbc:Paradox:///C://Seltec/active//Data" username='aaa'
password='bbb'></native-data-source>
What's the exception information when you can get response?
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-20 04:44:21 |
You can set the username and password in the native-data-source node.
<native-data-source data-source-class="com.hxtt.sql.HxttConnectionPoolDataSource" jndi-name="pgPool" name="pgPool"
url="jdbc:Paradox:///C://Seltec/active//Data" username='aaa'
password='bbb'></native-data-source>
What's the exception information when you can get response?
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-20 09:54:38 |
When I try to start the application server I get the following erros.
Error initializing server: Error instantiating default application at file:/C:/Oracle_Software/portalas/j2ee/home/config/application.xml: Error parsing data-sources config at file:/C:/Oracle_Software/portalas/j2ee/home/config/data-sources.xml: Unknown deployment tag in file:/C:/Oracle_Software/portalas/j2ee/home/config/data-sources.xml: <native-data-source>
As I added the following to data-sources.xml as per your instructions but it's not working
<native-data-source data-source-class="com.hxtt.sql.HxttConnectionPoolDataSource" jndi-name="pgPool" name="pgPool" url="jdbc:Paradox:///C://Seltec//active//Data" username="aaaa" password="bbbb"></native-data-source>
I then changed the above to the following but now it just hangs when starting the application server processes. So I don't know if connectionpooling does work with Oracle Application Server as I have been trying for last 3 days but no luck. Would really like ur feedback on this.
<data-source class="com.hxtt.sql.HxttConnectionPoolDataSource" name="pgPool" url="jdbc:Paradox:///C:/Seltec/active/Data" connection-driver="com.hxtt.sql.paradox.ParadoxDriver" username="BMG" password="VISOR"></data-source>
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-21 09:27:33 |
Any idea how to solve this issue. Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-22 08:16:13 |
You can see http://www.hxtt.com/test/oracleappserv/oracle10g.htm .
This page show the steps how to build a data source.
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-22 12:38:35 |
Thanks for all this as it does works with 10.1.3 but I am using Oracle Application Server 10.1.2. And the instructions you provided I don't see in 10.1.2. Do you know how can I make this to work in 10.1.2 as our Application Server version is 10.1.2. Your prompt response is really appreciated as we need to move on and this is the only last test we have to do.
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-22 20:16:02 |
What's your Oracle Application Server minor version?
10.1.2.00 or 10.1.2.01 or 10.1.2.02?
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-22 22:27:52 |
It's 10.1.2.0.2
Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
Mike |
2006-10-23 14:03:45 |
Any updates. Thanks
|
Re:Re:Re:Re:Re:Re:Re:Re:Insert, Update failling |
HXTT Support |
2006-10-24 07:35:40 |
You can see http://www.hxtt.com/test/oracleappserv1012/.
This page show the steps how to build a data source.
|