本文整理汇总了C#中System.Data.SqlClient.SqlCommand.OnReturnStatus方法的典型用法代码示例。如果您正苦于以下问题:C# SqlCommand.OnReturnStatus方法的具体用法?C# SqlCommand.OnReturnStatus怎么用?C# SqlCommand.OnReturnStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.SqlClient.SqlCommand
的用法示例。
在下文中一共展示了SqlCommand.OnReturnStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryRun
//.........这里部分代码省略.........
if (null != bulkCopyHandler)
{
if (!TryProcessRow(stateObj._cleanupMetaData, bulkCopyHandler.CreateRowBuffer(), bulkCopyHandler.CreateIndexMap(), stateObj))
{
return false;
}
}
else if (RunBehavior.ReturnImmediately != (RunBehavior.ReturnImmediately & runBehavior))
{
if (!TrySkipRow(stateObj._cleanupMetaData, stateObj))
{ // skip rows
return false;
}
}
else
{
dataReady = true;
}
if (_statistics != null)
{
_statistics.WaitForDoneAfterRow = true;
}
break;
}
case TdsEnums.SQLRETURNSTATUS:
int status;
if (!stateObj.TryReadInt32(out status))
{
return false;
}
if (cmdHandler != null)
{
cmdHandler.OnReturnStatus(status);
}
break;
case TdsEnums.SQLRETURNVALUE:
{
SqlReturnValue returnValue;
if (!TryProcessReturnValue(tokenLength, stateObj, out returnValue))
{
return false;
}
if (cmdHandler != null)
{
cmdHandler.OnReturnValue(returnValue);
}
break;
}
case TdsEnums.SQLSSPI:
{
// token length is length of SSPI data - call ProcessSSPI with it
Debug.Assert(stateObj._syncOverAsync, "ProcessSSPI does not support retry, do not attempt asynchronously");
stateObj._syncOverAsync = true;
ProcessSSPI(tokenLength);
break;
}
case TdsEnums.SQLTABNAME:
{
{
if (!stateObj.TrySkipBytes(tokenLength))
{
return false;
}
示例2: Run
//.........这里部分代码省略.........
{
SqlReturnValue rec = this.ProcessReturnValue(tokenLength, stateObj);
if (cmdHandler != null)
{
cmdHandler.OnReturnValue(rec);
}
goto Label_06D5;
}
case 0xad:
{
SqlLoginAck ack = this.ProcessLoginAck(stateObj);
this._connHandler.OnLoginAck(ack);
goto Label_06D5;
}
case 0x88:
{
if (stateObj._cleanupAltMetaDataSetArray == null)
{
stateObj._cleanupAltMetaDataSetArray = new _SqlMetaDataSetCollection();
}
_SqlMetaDataSet altMetaDataSet = this.ProcessAltMetaData(tokenLength, stateObj);
stateObj._cleanupAltMetaDataSetArray.SetAltMetaData(altMetaDataSet);
if (dataStream != null)
{
dataStream.SetAltMetaDataSet(altMetaDataSet, 0x88 != stateObj.PeekByte());
}
goto Label_06D5;
}
case 0x79:
{
int status = stateObj.ReadInt32();
if (cmdHandler != null)
{
cmdHandler.OnReturnStatus(status);
}
goto Label_06D5;
}
case 0x81:
if (tokenLength != 0xffff)
{
stateObj._cleanupMetaData = this.ProcessMetaData(tokenLength, stateObj);
}
else if (cmdHandler != null)
{
stateObj._cleanupMetaData = cmdHandler.MetaData;
}
if (dataStream != null)
{
byte num5 = stateObj.PeekByte();
dataStream.SetMetaData(stateObj._cleanupMetaData, (0xa4 == num5) || (0xa5 == num5));
}
else if (bulkCopyHandler != null)
{
bulkCopyHandler.SetMetaData(stateObj._cleanupMetaData);
}
goto Label_06D5;
case 0xd1:
if (bulkCopyHandler == null)
{
if (RunBehavior.ReturnImmediately != (RunBehavior.ReturnImmediately & runBehavior))
{
this.SkipRow(stateObj._cleanupMetaData, stateObj);
}
break;
}