奇怪的问题,用查询分析器执行视图可以得到结果,但为什么在delphi里用table调用却不行了?还有错误提示!!!!(100分)

  • 主题发起人 主题发起人 zengting
  • 开始时间 开始时间
Z

zengting

Unregistered / Unconfirmed
GUEST, unregistred user!
数据库是ms sql server
错误信息如下:
限制数据类型属性冲突

视图如下:
SELECT tb.*, Son1.theName AS mobAtComType,
dbo.view_MobileAtCom.ComName AS mobAtCom
FROM (SELECT dbo.mobIn.*, dbo.SysUser.userName AS opMan,
dbo.mobileHouse.mobAtComTypeID AS mobAtComTypeID,
dbo.mobileHouse.mobAtComID AS mobAtComID
FROM dbo.mobIn LEFT OUTER JOIN
dbo.SysUser ON
dbo.mobIn.opManID = dbo.SysUser.userID LEFT OUTER JOIN
dbo.mobileHouse ON dbo.mobIn.mobCode = dbo.mobileHouse.mobCode)
tb LEFT OUTER JOIN
dbo.DataOneMixSon Son1 ON tb.mobAtComTypeID = Son1.sonID LEFT OUTER JOIN
dbo.view_MobileAtCom ON CONVERT(varchar(10), tb.mobAtComTypeID)
+ 'AND' + CONVERT(varchar(10), tb.mobAtComID) = dbo.view_MobileAtCom.DoubleID

 
用 TQuery 或 TStoredProc 试试呢??
 
后退
顶部