设为首页
加入收藏
站内地图
旧版入口
当前位置:首页 > 站长学院 > 网络编程 > ASP.NET

Orcas尝鲜

作者:佚名 出处:网络转载 时间:08-08 点击:

内容载入中...
您的支持我们的动力 上学堂

当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都识别得相当准确。
收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息