P
ppqingyu
Unregistered / Unconfirmed
GUEST, unregistred user!
这是在存储过程中的定义:
InsertFirstCase(@Case varchar(100),@Case_transact varchar(2500),@Insure varchar(250),
@BranchBewrite varchar(4000),@Involved_personnel varchar(8000),@CaseID InT OUTPUT )
在查询分析器中没有问题:
declare @Case varchar(100),@case_transact varchar(2500),
@Insure varchar(250),@BranchBewrite varchar(4000),@Involved_personnel varchar(8000)
SELECT @Case ='{CFC72D81-FF86-406B-9807-E163E56A0412}|440922640706003|1|AFAD00|0|',
@case_transact = '1|案号|经办人|茂名市中级人民法院|陈海|一审阶段|2006-07-01|2007-03-01|案由|1|1|1|',
@Insure = 'AFAGAA04DFA2006B000001|AFAGAA04DFA2006C000001|400|400|400|2006-01-01|车牌号码|被保险人|',
@branchBewrite = '案件主要描述|机构诉讼意见|',
@Involved_personnel = '(1)原告|在有人要||||(2)被告|英雄模范||||'
DECLARE @CaseID INT
EXEC InsertFirstCase @Case,@Case_transact,@Insure,@BranchBewrite,@Involved_personnel,@CaseID
在程序中不能够通过,出现下面的错误,这是DELPHI中的代码:
try
DM.cdsInsertFirstCase.Close;
DM.cdsInsertFirstCase.FetchParams;
DM.cdsInsertFirstCase.Params.ParamByName('@Case').AsString := FCase;
DM.cdsInsertFirstCase.Params.ParamByName('@Case_transact').AsString := FCase_transact;
DM.cdsInsertFirstCase.Params.ParamByName('@Insure').AsString := FInsure;
DM.cdsInsertFirstCase.Params.ParamByName('@BranchBewrite').AsString := FBranchBewrite;
DM.cdsInsertFirstCase.Params.ParamByName('@Involved_personnel').AsString := FInvolved_personnel;
DM.cdsInsertFirstCase.Params.ParamByName('@CaseID').AsInteger := CaseID;
DM.cdsInsertFirstCase.Execute;
strCaseID := DM.cdsInsertFirstCase.Params.ParamByName('@CaseID').AsString;
ShowMessage('提交成功,当年案件编号:' + strCaseID);
except
ShowMessage('提交失败');
end;
在DELPHI调用参数,出现这个错误:First chance exception at $7C812A5B. Exception class EOleException with message '不允许从数据类型 ntext 到 varchar 的隐性转换。请使用 CONVERT 函数来运行此查询。'. Process LawManage.exe (224)
这会是什么问题?
InsertFirstCase(@Case varchar(100),@Case_transact varchar(2500),@Insure varchar(250),
@BranchBewrite varchar(4000),@Involved_personnel varchar(8000),@CaseID InT OUTPUT )
在查询分析器中没有问题:
declare @Case varchar(100),@case_transact varchar(2500),
@Insure varchar(250),@BranchBewrite varchar(4000),@Involved_personnel varchar(8000)
SELECT @Case ='{CFC72D81-FF86-406B-9807-E163E56A0412}|440922640706003|1|AFAD00|0|',
@case_transact = '1|案号|经办人|茂名市中级人民法院|陈海|一审阶段|2006-07-01|2007-03-01|案由|1|1|1|',
@Insure = 'AFAGAA04DFA2006B000001|AFAGAA04DFA2006C000001|400|400|400|2006-01-01|车牌号码|被保险人|',
@branchBewrite = '案件主要描述|机构诉讼意见|',
@Involved_personnel = '(1)原告|在有人要||||(2)被告|英雄模范||||'
DECLARE @CaseID INT
EXEC InsertFirstCase @Case,@Case_transact,@Insure,@BranchBewrite,@Involved_personnel,@CaseID
在程序中不能够通过,出现下面的错误,这是DELPHI中的代码:
try
DM.cdsInsertFirstCase.Close;
DM.cdsInsertFirstCase.FetchParams;
DM.cdsInsertFirstCase.Params.ParamByName('@Case').AsString := FCase;
DM.cdsInsertFirstCase.Params.ParamByName('@Case_transact').AsString := FCase_transact;
DM.cdsInsertFirstCase.Params.ParamByName('@Insure').AsString := FInsure;
DM.cdsInsertFirstCase.Params.ParamByName('@BranchBewrite').AsString := FBranchBewrite;
DM.cdsInsertFirstCase.Params.ParamByName('@Involved_personnel').AsString := FInvolved_personnel;
DM.cdsInsertFirstCase.Params.ParamByName('@CaseID').AsInteger := CaseID;
DM.cdsInsertFirstCase.Execute;
strCaseID := DM.cdsInsertFirstCase.Params.ParamByName('@CaseID').AsString;
ShowMessage('提交成功,当年案件编号:' + strCaseID);
except
ShowMessage('提交失败');
end;
在DELPHI调用参数,出现这个错误:First chance exception at $7C812A5B. Exception class EOleException with message '不允许从数据类型 ntext 到 varchar 的隐性转换。请使用 CONVERT 函数来运行此查询。'. Process LawManage.exe (224)
这会是什么问题?