on 2012 Jan 04 3:45 PM
We are in the process of adding more flexibility to our data partitioning on a working synchronization scheme. Our first step is converting our normal SQL scripts to run under the DirectRow handling for each table and populating the download stream through the .NET API. It all seems to be working fine until we try reading from tables that contain a long varchar or xml type column. For these we have receive either Out of Memory exceptions or Protected Memory Access exceptions.
Versions: SA 12.0.1.3436 (& 3519, latest EBF), .NET 4, Consolidated db running under SA 12.0.1, OS Win 7 x64
SQL is running under the iAnywhere reader, and the exception happens on the first call to NextRow() before we have any chance to access the data in our code. Code snippet with the key elements of the data access is below.
Are there known limitations when dealing with long data types? We have several long binary types in other tables which do download just fine. As long as we skip tables with the long character types everything else succeeds (with a couple workarounds for other small problems).
Thanks
using System.Data; using iAnywhere.MobiLink.Script; ... // called from handle_download: loop through download tables // connection is the return from DBConnectionContext.GetConnection() // downloadCommand is the return from a call to DownloadTableData.GetUpsertCommand() private void executeDownload(string sqlStatement, DBConnection connection, IDbCommand downloadCommand) { var selectCommand = connection.CreateCommand(); selectCommand.CommandText = sqlStatement; selectCommand.Prepare(); var tableUpsertParameters = downloadCommand.Parameters; var reader = selectCommand.ExecuteReader(); object[] row; // memory access exception happens in call to reader.NextRow() while ((row = reader.NextRow()) != null) { //add row to download stream here } reader.Close(); selectCommand.Close(); }
Request clarification before answering.
I've reproduced the exceptions you reported in the question and have a fix. I'll update this answer tomorrow with a CR# you can use to request an EBF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
60 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.