Hello,
I am using Relativity for the first time and for the most part things are going well. However, I just tried adding a script as shown below and now I’m getting an internal server error message from our SQL Server.
// Called before each change is applied to the database
function beforeProcessDeltaChange(delta, change, wasRefreshed, canRemove)
{
if (!change.isInsert) {
return;
}
// Query the database for the company name
// Remember - this is DA SQL, not a real SQL
var sql = 'SELECT company FROM bsiCustomers WHERE branch=:pBranch AND custID = :pCustID';
var params = { pBranch : 'pittsburgh', pCustID : 2180 };
var selectResult = lda.selectSQL(sql, params);
var row = selectResult.nextRow();
change.newValues['company'] = row['company'];
}
RemObjects.DataAbstract.DAException: An exception occurred on the server: Transaction aborted. Internal DB server error: This SqlTransaction has completed; it is no longer usable.
Inner Exception: InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
at RemObjects.SDK.Message.ProcessException()
at RemObjects.SDK.BinMessage.InternalReadFromStream(Stream stream)
at RemObjects.SDK.Message.ReadFromStream(Stream stream)
at RemObjects.SDK.IpHttpClientChannel.IntDispatch(Stream request, IMessage response)
at RemObjects.SDK.ClientChannel.Dispatch(IMessage message)
at RemObjects.SDK.DynamicRequest.InternalMakeRequest()
at RemObjects.SDK.DynamicRequest.MakeRequest()
at RemObjects.DataAbstract.RemoteDataAdapter.InternalUpdate(Delta[] deltas)
at RemObjects.DataAbstract.DataAdapter.InternalUpdate(DataSet dataset, String[] tableNames)
at RemObjects.DataAbstract.DataAdapter.Update(DataSet dataset, String[] tableNames)
at RemObjects.DataAbstract.DataAdapter.Update(DataSet dataset)
at VPIClient.DataModule.ApplyUpdates(DataTable table) in c:\Projects\Internal Software\VPI Windows\VPIClient\DataModule.cs:line 366
at VPIClient.fmConflictResolutionCenter.UploadISO9000(DataSet ds) in c:\Projects\Internal Software\VPI Windows\VPIClient\fmConflictResolutionCenter.cs:line 385
at VPIClient.fmConflictResolutionCenter.UploadInspections(DataSet ds) in c:\Projects\Internal Software\VPI Windows\VPIClient\fmConflictResolutionCenter.cs:line 345
at VPIClient.fmConflictResolutionCenter.toolStripButton1_Click(Object sender, EventArgs e) in c:\Projects\Internal Software\VPI Windows\VPIClient\fmConflictResolutionCenter.cs:line 118
Any thoughts on where I should begin to look ?