SQLServer Stored Proc. not working as intented
Hallo all!
first post here as I wasn't able to find any suitable answers in the internet..
a part of my project connects to an SQL Server db and executes a Stored Procedure.
This Procedure fills some tables with data retrieved from an xml file.
so..the problem...
- When I execute it for a small xml it's working great.
- When I execute it for a large xml file:
* It's working as intented when I execute it via sql server directly
* but it's NOT working when I execute it via my project (although it returns a "successful" message).
So...my procedure is correct and any errors are encountered in my java code listed below...any ideas?
Code :
public static void bulkInsertXml(boolean showMessages){
String urlSQLS = "";
try{
//retrieve data from configuration file
java.util.Properties vProp = new java.util.Properties();
java.io.FileInputStream iFile = new java.io.FileInputStream("parser.config");
vProp.loadFromXML(iFile);
urlSQLS = vProp.getProperty("SQLS");
}
catch(Exception ex)
{
}
try {
Connection conn = DriverManager.getConnection(urlSQLS);
Statement stmt = conn.createStatement();
boolean rs;
rs = stmt.execute("exec MISCardLink_DEV.dbo.CIF_bulk_insert 1");
if (!rs){
if (showMessages)
System.out.println("Bulk Insert Succeeded");
}
else{
if (showMessages)
System.out.println("Bulk Insert Failed");
}
conn.close();
}catch (Exception e) {
System.err.println("Got an exception! ");
System.err.println(e.getMessage());
e.printStackTrace();
}
}
thanx for your time!
Re: SQLServer Stored Proc. not working as intented
May or may not pinpoint the problem, but never ignore exceptions such as this.
Re: SQLServer Stored Proc. not working as intented
I left that spot to fill with log4j messages...which I did yesterday.
Still have the same issue though. Checked querry and connection timeout as well to no avail.
Any ideas?
Every thought on the subject will be very appreciated!