Orcas尝鲜

    当Visual Studio 2005的Query Builder遭遇Oracle数据库时,你绝对要疯狂!一条完全能正确运行的语句,会被Query Builder自作聪明地篡改得面目全非,然而这还不是最令人气愤的,最气人的是然后它竟然恬不知耻地告诉你语法错误:

Failed to update CommandText:

 The schema of data returned by your new command could not be retrieved. Schema of table "tableName" was not changed and might not reflect data retrieved by your command. The database returned the following error:

Syntax Error: Expecting ',' or 'WHERE' (etc.) after table alias.



关于这个问题,微软是这样解释的:


PROBLEM:
___________________

When trying to use the Query Builder with Oracle, queries that create INNER JOIN syntax result in an error in Query Builder when trying to generate your schemas.

CAUSE:
___________________

The OracleClient FillSchema method that is called by the Query Builder cannot handle INNER JOIN syntax

RESOLUTION:
___________________
When we updated the Query Builder in VS2005 to generate INNER JOIN syntax when the underlying database can handle it, we did not update the OracleClient to handle the INNER JOIN. Therefore, when the Query Builder tries to call the FillSchema method to generate the INSERT, UPDATE, and DELETE statements, it encounters an error. You would also see this error if you called the FillSchema method directly in code.

Unfortunately, the risk associated with modifying OracleClient.FillSchema to handle the INNER JOIN syntax is too risky to do at this time given, so this change has been postponed until at least Orcas. We are also working with Oracle to try to get them to modify their database to return the schema information automatically instead of forcing the provider to interpolate the schema based on the query. This would eliminate the need for the FillSchema method.

    因此,我迫不及待地下载了Orcas June CTP和NetFramework 3.0 June CTP(注意,虽然截止到目前为止,NetFramework 3.0 July CTP已经发布,但Orcas的最新June CTP还无法与之协同工作),找了台Virtual Server测试了一下,果然问题已经解决,Query Builder不再污蔑我们正确的SQL语句,并且所有的DataSet Scheme都识别得相当准确。

补充:
    也许是碰巧的原因,昨天的那条语句比较幸运,在随后的使用中,我还是发现有许多语句仍然会出现老问题,只是比原来有了改善,希望Orcas正式发布的时候,这些问题都能解决。

另:作为一个微软路线的程序员,遭遇Oracle是很悲哀的一件事,因为大部分时间浪费在了一些与创造力毫不相干的环节上。所谓的Oracle专家,很大程度上是这样一种经验丰富的专业人员,他们知道Oracle在哪种情况下行,在哪种情况下不行,在某些场合应该这样做,某些场合应该那样做。

转载于:https://www.cnblogs.com/dotAge/archive/2006/08/08/471237.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值