Search Results

Search found 2 results on 1 pages for 'liming'.

Page 1/1 | 1 

  • ADO.NET Batch Insert with over 2000 parameters

    - by Liming
    Hello all, I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql is constructed using StringBuilder in the forms of "insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" " where "X" represents a "for loop" about 700 rows StringBuilder sb = new StringBuilder(); for(int i=0; i<700; i++) { sb.Append("insert into table (column1, column2, column3) values (@param1-"+i+", @param2-"+i, +",@parm3-"+i+") " ); } followed by constructing a command object injecting all the parameters w/ values into it. Essentially, 700 rows with 3 parameters, I ended up with 2100 parameters for this "one sql" Statement. It ran fine for about a few days and suddenly I got this error =============================================================== A severe error occurred on the current command. The results, if any, should be discarded. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNon Any pointers are greatly appreciated.

    Read the article

  • Commons VFS and IBM MVS System

    - by Liming
    Hello All, I'm using Apache Commons VFS / SFTP, we are trying to download files from the IBM MVS system. The download part is all good, however, we can not open up the zipped files after downloading. Seems like the zip file was compressed using a different algorithm or something Anyone has any pointers? *Note, the same function works fine if we connect to a regular unix/linux SFTP server. Below is an example of what we did String defaultHost = "[my sftp ip address]"; String host = defaultHost; String defaultRemotePath = "//__root.dir1.dir2."; String remotePath = defaultRemotePath; String user = "test"; String password = "test"; String remoteFileName = "Blah.ZIP.BLAH"; log.info("FtpPojo() begin instantiation"); FileObject localFileObject = fsManager.resolveFile("C:/Work/Blah.ZIP.BLAH"); log.debug("local file name is :"+localFileObject.getName().getBaseName()); log.debug("FtpPojo() instantiated and fsManager created"); String uri = createSftpUri(host, user, password) + ":322"+remotePath+remoteFileName; remoteRepo = fsManager.resolveFile(uri, fsOptions); remoteRepo.copyFrom(localFileObject, Selectors.SELECT_ALL);

    Read the article

1