编程点滴,目前主要研究Android

对待生活,应该怀着一颗感恩的心

首页 新随笔 联系 订阅 管理

放假之前从图片馆里借了本书——《ADO.NET技术内幕》(原名 ADO.NET Core Reference, Microsoft Press, Author: David Sceppa),寒假里仔仔细细地看了几遍,我感觉除了有一些小错误外(印刷错误还是相当多),这本书是相当不错的,讲的浅显易懂,又很有深度。现在我更加的了解了ADO.Net,现在一般的数据库操作我已经很熟练了。从China-pub的书评里找到了这本书的刊误,整理了一下贴在这里,希望对大家有点帮助。

第三章

  • P54
    图3.3有误。
  • P78(-13)

  • 在一个已经打开的Connection对象上调用Open方法将会关闭并重新开放该连接,如果连接池可用,在这样的情况下就会生成一个与到数据源的附加连接。初始连接被关闭时,就会被传送到池中。但是,由于连接池是在另一线程上处理的,所以在Connection对象基于连接字符串请求一个与数据源的连接时,初始连接有可能无法使用。
    建议:在一个已经开的Connection对象上调用Open方法将会关闭并重新打开该连接,如果连接池可用,这种情况有可能生成一个到数据源的新连接。(因为)原有连接被关闭时,会被传送到池中。但是,由于连接池是在另一线程上处理的,所以在Connection对象基于连接字符串请求一个与数据源的连接时,原有连接有可能无法使用。
    原文:Calling the Open method on a Connection object that's already opened will close and then reopen the connection. If connection pooling is enabled, this scenario might generate an additional connection to your data source. When the initial connection is closed, it's sent to the pool. However, because pooling is handled on another thread, the initial connection might not be available when the Connection object requests a connection to the data source based on the connection string.
    评论:将“an additional connection”译作“附加连接”不太妥当,容易让人误以为同时有两个连接。至于“initial connection”,似乎译作“原有连接”会容易理解一些。

第四章

  • P97(-8) 假设我们建立了一个应用程序…
    整段及其后都误把“orders”译作“顺序”(应该是“订单”),误把“customers”
    译作“客户端”(应该是“客户”)。
  • P98(-2) …无须再考虑去删除它的问题…
    建议:…无须再考虑字符定界的问题…
    原文:…you don't need to worry about delimiting them.
    评论:译者可能将“delimiting”看作“deleting”
    又:该书多处将“delimit/delimiter”译作“分隔/分隔符”(P299,P316…),窃以为译作“定界/定界符”较为合适。
  • P99(3)
    由于需要通过引用来遍历所查询的文本值,所以必须将值中的独立引用相应地替换为两个连续的独立引用。想在代码的一个字符串中放置两个引用的开发人员终于得到了解放。
    建议:因为需要用单引号把要查找的文字值括起来,所以必须用两个连续的单引号替换值中的单引号。这与开发人员想在字符串中放置双引号的情况相类似。
    原文:Because you need to surround the literal value you're searching for with quotes, you have to replace the single quotes in the value with two consecutive single quotes. Developers who've tried to put double quotes into a string in their code can relate.
    评论:对“quotes”的错误翻译导致整段内容无法理解。另外,译者也误把“relate”看作“relax”
  • P108(-5)
    拖放一个SQL Server存储过程会创建一个SqlCommand对象,并使用一个来自其他数据源的存储过程来创建一个OleDbCommand对象。
    建议:拖放一个SQL Server存储过程会创建一个SqlCommand对象,而使用一个来自其他数据源的存储过程则创建一个OleDbCommand对象。
    原文:Dragging and dropping a SQL Server stored procedure creates a SqlCommand, and using a stored procedure from other data sources creates an OleDbCommand.
    评论:该段内容讨论的其实是两种情况,这里的连词and实际上是whereas的意思。
  • P113(-13)
    在代码中,标记出了一个对Cancel方法的调用。去掉标记字符,重新运行代码,就可证明Cancel方法删除了查询结果。
    建议:在代码中,一个对Cancel方法的调用被注释掉。去掉注释符号,重新运行代码,就可证明Cancel方法丢弃了查询结果。
    原文:In the code, there's a call to the Cancel method that's commented out. Remove the comment character(s) and re-run the code to demonstrate that the Cancel method discards the results of the query.
    评论:“comment”通常译作“注释”。Marker,tag等才译作“标记”。
  • P115
    最后两段的“关键”建议均改为“关键字”
    原文:Using KeyInfo in the Options parameter forces the DataReader to fetch additional schema information from your data source to indicate whether the columns in the result set are part of the key columns in the tables in your data source.
    If you use the SchemaOnly option, you don't need to include KeyInfo as well. The key information will be included in the schema automatically.

    评论:嘻嘻,有点吹毛求疵。
  • P124(-8)
    即使你正在使用一个机器人代码生成工具…
    建议:即使你正在使用一个功能强大的代码生成工具…
    原文:Even if you're using a robust code generation tool, such as the ones included in Visual Studio .NET, you might still need to modify the Direction value of your Parameter objects in some cases.
    评论:“robust”“robot”
  • P125最后一段
    两个“显式”应改为“隐式”。
    原文:The DbType and OleDbType properties are closely related. Setting the value of one of these properties affects the value of the other. For example, if you set the DbType property of an OleDbParameter to DbType.Int32, you're implicitly setting the OleDbType to OleDbType.Integer. Similarly, if you set the OleDbType to OleDbType.UnsignedTinyInt, you're implicitly setting the DbType property to DbType.Byte.

第五章

  • P147(-8)
    但实际上查询返回的仍是100行。
    建议:“100”应改为“1000”。
    原文:But the actual query still returns 1000 rows.
  • P161(1)
    当您通过从服务器资源管理器进行拖放操作无法在所获取的行上设置一个过滤器的时候,可以在服务器资源管理器…
    建议:虽然您无法通过从服务器资源管理器进行拖放操作来设置行的过滤条件,但可以在服务器资源管理器…
    原文:While you can't set a filter on the rows you retrieve by dragging and dropping from Server Explorer, you can indicate which columns you want to include in your DataAdapter object's query by selecting specific columns from your table or view in Server Explorer.
    评论:“while”为“虽然”的意思。
  • P162(2)
    通常代码都很难阅读,而且阅读代码并非最为有效的、高度推荐的一种方法,…
    建议:(向导所生成的)代码或许不容易理解,(代码所使用的)也不一定是最高效或最值得推荐的方法,…
    原文:The code might not always be easy to read, and it might not be the most efficient or highly recommended approach, but it's a great way to learn how the different objects in the ADO.NET object model interact.
    评论:第一个it应该指的是“The code”
  • P171(1)
    使用FillSchema方法较为直接,和两者不同,但Fill方法略有不同,对于Fill方法来说,您可以提供…
    建议:使用FillSchema方法相当简单,跟学过的Fill方法非常相似,只有一点细微差别,跟Fill方法一样,您可以提供…
    原文:Using the FillSchema method is rather straightforward and will remind you of the Fill method, with one slight difference. As with the Fill method, you can supply a DataSet, a DataSet and a table name, or a DataTable.

第六章

  • P187(3)
    …可以使用DataTable对象的Rows属性来将一个DataRow对象指派给DataTable的特定行。
    建议:…可以使用DataTable对象的Rows属性来将一个DataRow对象赋值为DataTable的特定行。
    原文:To assign a DataRow object to a particular row in the DataTable, you use the DataTable object's Rows property.
    评论:“assign”通常译作“赋值”
  • P187(-3)
    …便可如访问DataAdapter中数据那样来访问…中的“DataAdapter”应为“DataReader”
    原文:As you can see, once you set the DataRow object to a row in the DataTable, accessing the value of a particular column is similar to accessing data in a DataReader.
  • P187(-1)
    在使用DataReader的情况下,…
    建议:和DataReader一样,…
    原文:As with the DataReader, using an index-based lookup will return data more quickly than a string-based lookup. I've used column names to make the code snippet easier to follow.
  • P191(-9)
    标题“用DataAdapter.Fill模式来检索模式信息”应为“用DataAdapter.FillSchema来获取模式信息”
    原文:Retrieving Schema Information Using DataAdapter.FillSchema
    评论:“FillSchema”是DataAdapter的一个方法,“Retrieve”译作“获取/获得”较好。
  • P192(5)
    但是如果应用程序不是用作特殊查询的话,便不需要知道查询返回的是哪一列,因此不要在已完善的应用程序中…
    建议:但是除非你的应用程序是一个特殊的查询工具程序,否则你应该知道查询返回哪些列,因此你没必要在已完善的应用程序中…
    原文:But unless your application is an ad-hoc query tool, you should know which columns your queries return, so you should have no need to use features such as DataAdapter.FillSchema in your full-blown applications.
  • P192(8)
    查看数据列对象将发现ReadOnly、 AllowDBNull、MaxLength和 ReadOnly(我觉得应该是unique)属性…
    建议:查看DataColumn对象将发现ReadOnly、 AllowDBNull和MaxLength属性…
    原文:Examine any of these DataColumn objects and you'll find that the ReadOnly, AllowDBNull, MaxLength, and ReadOnly properties are set correctly.
    评论:原文有误,印刷时把作者的疑惑也打印出来了。嘻嘻。
  • P193(15)
    可以创建一个新DataTable,并通过信号调用将它添加到一个现有DataSet对象的Table集合中…
    建议:可以在一个调用中创建一个新DataTable,并将其添加到一个现有DataSet对象的Tables集合中…
    原文:You can create a new DataTable and add it to an existing DataSet object's Tables collection in a single call, as shown in the following code snippet.
    评论:“single”非“signal”
  • P193(-2)
    :先创建一个DataColumn对象
    建议:。现在让我们来创建自己的DataColumn对象
    原文:In order to store the results of a query, the DataTable needs to have columns. Earlier in the chapter, you saw how the DataAdapter can create new DataColumn objects for you. Now let's create our own DataColumn objects. We can add DataColumn objects to a Table object's Columns collection using code that's nearly identical to the code we used to add a new DataTable to a DataSet object's Tables collection:
  • P199(-9)
    “-5”改为“5”。
  • P207(6)
    如果列没有默认值,该列就被设置为适当的默认值或Null
    建议:列的值被设置为适当的默认值,如果没有默认值,则被设为Null
    原文:The values in the columns are set to the appropriate default values or to Null if they don't have defaults. By creating the new DataRow but not adding it to the Rows collection, you can assign values to your columns before making the new DataRow part of your DataTable.
  • P208(-6)
    除了增加了对DataRow对象的BeginEdit方法和EndEdit方法的调用,还有第二种方法可以更新行,它与第一种方法类似。
    建议:第二种更新行的方法与第一种类似,只是增加了对DataRow对象的BeginEdit方法和EndEdit方法的调用。
    原文:The second way to update a row is similar to the first, except that you add calls to the DataRow object's BeginEdit and EndEdit methods.
    评论:“except that”的意思是“只不过”。
  • P209(-10)
    “处理一行”应为“处理一列”。
    原文:The difference between the properties is that the Item property works with one column at a time and the ItemArray property returns and accepts an array in which each item corresponds to a column.
  • P210(6)
    …可以使用Visual Basic.NET或Visual C# .NET中的关键字Nothing
    建议:…可以使用Visual Basic.NET中的关键字NothingVisual C# .NET中的null
    原文:If you want to use the ItemArray property but you don't want to change the value of every column in your row, you can use the Nothing keyword in Visual Basic .NET or null in Visual C# .NET.
  • P212(14)
    rowCustomer.ItemArray = aCustomer;应该删除。
    评论:原文也有此行,应该是原作者笔误。
  • P212(18)
    我们通常使用的是Remove方法。RemoveAt方法需要确定想要清除的行的索引,而DataRow对象中不存在返回该信息的属性。
    建议:我通常喜欢使用Remove方法。RemoveAt方法需要确定想要清除的行的索引,而DataRow
    对象没有公开返回该信息的属性。
    原文:I generally prefer using the Remove method. The RemoveAt method requires that you determine the index of the DataRow you want to remove. The DataRow object does not expose a property to return this information.
    评论:没有大的错误,只是希望译文能尽可能忠于原文。
  • P215(16)
    调用BeginEdit之前使用Current常量即可返回列的值,该值不必是列的原始值。
    建议:使用Current常量可返回该列在调用BeginEdit之前的值,该值不一定是其原始值。
    原文:Using the Current constant will return the value of the column before BeginEdit is called—which is not necessarily the original version of the column.
    评论:“before BeginEdit is called”应该是修饰“value”而不是“Using”
  • P215表6.4
    前两行的“默认”一列应该是“InitialValue”而不是“NewValue”
    评论:原文也是如此,不明所以。
  • P220(2)
    一旦您将新DataSet添加到项目之后,就会看到与基于DataAdapter对象生成DataSet时一样的设计器,除非新DataSet是空的。
    建议:一旦您将新DataSet添加到项目之后,就会看到与基于DataAdapter对象生成DataSet时一样的设计器,只不过该新DataSet
    是空的。
    原文:Once you've added a new DataSet to your project, you'll see the same designer that you saw when we generated a DataSet based on DataAdapter objects, except that your new DataSet will be empty.
    评论:“except that”是“只不过”的意思。
  • P220
    “注意”一段文字中的“接口”建议改为“界面”。
    原文:XML-savvy developers will quickly pick up on concepts such as the fact that a DataTable in the DataSet corresponds to an element within the schema file, but developers with less XML experience might be confused by this interface. You might see a more data-specific DataSet designer in a future release of Visual Studio .NET. In the meantime, I'll cover the basic features of constructing a new DataSet using this interface.
    评论:“interface”既可以译作“接口”也可译作“界面”,但一般在讨论UI的时候习惯译作“界面”。
  • P228(8)
    即使是您可将对象存储在DataSet对象的ExtendedProperties集合中,可能也需要使用到简单的字符串。
    建议:虽然您可以在DataSet对象的ExtendedProperties
    集合中存储对象,但应该尽量只(用其)存储简单的字符串。
    原文:Even though you can store objects within the DataSet object's ExtendedProperties collection, you should probably stick with simple strings.
  • P234(2)
    可以使用MergeFailed事件来处理在用DataSet对象的Merge方法时所发生的任何失败。一般来说,本书作者不会激发的MergeFailed事件,您激发MergeFailed事件的可能性比较大。
    建议:可以使用MergeFailed事件来处理在用DataSet对象的Merge方法时所发生的任何失败。就个人而言,我没有办法(编写示例代码)触发该MergeFailed
    事件,你们或许可以成功做到。
    原文:You can use the MergeFailed event to handle any failures that occur when you use the DataSet object's Merge method. Personally, I've been unable to cause the MergeFailed event to fire. You might have more success causing MergeFailed to fire.
  • P241(17)
    “Count”应该为“Compute”
    原文:However, you can use an expression-based column to perform the calculation between the two columns and then use that expression-based column in the Count method: SUM(ItemTotal).
    评论:原文也是如此,疑为笔误。
  • P241(18)
    Compute方法通过使用继承对象的数据类型来返回结果,…
    建议:Compute方法返回的结果是一般的Object数据类型,…
    原文:The Compute method returns its results using the generic Object data type.
  • P241(-5)
    DataSet对象的GetChanges方法会返回…
    建议:DataTable对象的GetChanges
    方法会返回…
    原文:The DataSet object's GetChanges method returns a new DataTable with the same structure and also includes all rows from the original DataTable that contain pending changes.
    评论:原文亦是如此,疑为笔误。
  • P242(3)
    ImportRow方法接受DataRow对象,并将该数据库加到DataTable中
    建议:ImportRow方法接受DataRow对象,并将该数据行加到DataTable

    原文:The ImportRow method accepts a DataRow object and adds that row of data to the DataTable.
  • P244(-3)
    如果数据库中对应的列不接受空值,使用DataAdapter对象的方法创建新DataColumn时则不会将AllowDBNull属性设置为True,
    建议:即使数据库中对应的列不接受空值,使用DataAdapter对象的Fill方法创建新DataColumn时也不会将其AllowDBNull属性设置为False

    原文:Using a DataAdapter object's Fill method to create new DataColumn objects will not set the AllowDBNull property to True even if the corresponding column in the database does not accept null values.
    评论:翻译有误,原文也有误。
  • P245(-10)
    下面的例子表明了使用元素和使用DataSet中数据属性的区别。
    建议:下面的例子表明了对DataSet
    中数据使用元素和属性的区别。
    原文:The following examples show the difference between using elements and attributes for data within your DataSet.
  • P247(12)
    只要不将Expression属性设置为默认空字符串,就会…
    建议:只要设置DataColumn 的Expression
    属性而非使用其默认的空字符串,就会…
    原文:Setting the Expression property of a DataColumn to anything other than the default empty string will automatically set the ReadOnly property of the DataColumn to True.
    评论:没有什么错误,只是有点拗口而已,我的建议也不见得好。
  • P249(17)
    …则每个DataColumn的属性都不会被设置为True,…应为“每个DataColumn的Unique属性”
    原文:If you create a unique constraint or a primary key on a collection of columns, the Unique property of each DataColumn will not be set to True because the values within the column are not necessarily unique.
  • P254(-10)
    GetChildRows方法返回一组DataRow对象中的子数据。
    建议:GetChildRows方法以DataRow
    对象数组的形式返回子数据。
    原文:The GetChildRows method returns child data in an array of DataRow objects.
  • P256(5)
    例如,DataRow被“添加”的RowState使用的是当前版本的数据而不是初始版本的数据。DataRow被“删除”的RowState使用的是初始版本的数据而不是当前版本的数据。
    建议:例如,一个RowState为Added 的DataRow只有当前版本而没有初始版本。一个RowState为Deleted的DataRow
    只有初始版本而没有当前版本。
    原文:For example, a DataRow whose RowState is Added will have a current version but not an original version. A DataRow whose RowState is Deleted will have an original version but not a current version.
    评论:“Added”以及“Deleted”均为DataRowState的枚举值。并非动词的被动式。
  • P256(-10)
    IsNull方法正是第二种选择。该方法接受列的名称,列的序数位置或DataRow对象本身并返回一个Boolean值以确定列是否包含null值。
    建议:IsNull方法可以简化第二种选择。该方法接受列的名称,列的序数位置或DataColumn对象本身并返回一个Boolean值以确定该列是否包含null
    值。
    原文:The IsNull method can simplify the second of these options. This method accepts the name of a column, its ordinal position, or the DataColumn object itself and returns a Boolean value to indicate whether the column contains a null value.

第七章

  • P272(3)
    如果使用的不是采用DataRow的值的方法,那么看到的将是数据的当前值。
    建议:如果你使用不带DataRowVersion参数的那一(重载)方法,那么你看到的将是数据的当前版本。
    原文:If you use the methods that do not take a value from DataRowVersion, you'll view the current version of the data.
  • P287的标题
    DataRelation对象引用”改作“DataRelation对象参考”比较合适
    原文:DataRelation Object Reference

第八章

  • P299(12)
    8.1.4 使用分隔符
    建议:8.1.4 使用定界符
    原文:Working with Delimiters
    评论:从文中意思来看,“Delimiters”译作“定界符”比较合适。
  • P299(13)
    您可能已经注意到在这两个数据库查询示例和DataTable.Select的示例中,我们都…
    建议:您可能已经注意到在数据库查询示例和DataTable.Select的示例中,我们都…
    原文:You might have noticed that in both the database query example and the DataTable.Select example, we specified criteria for string-based columns.
  • P300中11行,-7行以及P301中第2、10和16行的“)”应为“]”。
  • P317表8.3首行的说明一列“创建新的DataRow对象”应为“创建新的DataRowView对象”
    原文:Creates a new DataRowView object
  • P317(-8)
    可以用调用DataRow或DataRowView对象的Delete方法取代一个对DataRow或者DataRowView的引用。
    建议:如果有DataRow或DataRowView对象的引用,则可直接调用其Delete
    方法(以删除该行)。
    原文:If you have a reference to the DataRow or the DataRowView, you can call the Delete method of the DataRow or DataRowView object instead.
    评论:“instead
    ”在这里并非“取代”的意思,而是表示另一种可行的(删除)方法。
  • P321(8)
    DataView对象有一个事件ListEvent,该事件在…
    建议:DataView对象有一个ListChanged
    的事件,该事件在…
    原文:The DataView object has one event, ListEvent, which fires when the contents of the DataView change—such as when a row visible through the DataView is added, deleted, or modified;
    评论:评论:原文亦是如此,疑为笔误。
  • P322(-10)
    可以通过Item属性中列的名称或者其原始值来访问该列。
    建议:可以通过Item
    属性中列的名称或序号来访问该列。
    原文:You can access the column by using its name or its ordinal value in the Item property.
    评论:可能是误把“ordinal”当作“original
    ”。

第九章

  • P337最后一段
    图9.3是开发环境的一个直观显示。它显示了强类型DataRow的列在语句执行结果后的易访问性。…强类型DataSet对象和语句完成无法消除开发周期中出现的这种问题。
    建议:图9.3是开发环境的一个快照。它显示了强类型DataRow的列在语句完成功能下极易访问。…强类型DataSet
    对象和语句完成功能几乎消除开发周期中出现的这类问题。
    原文:Figure 9-3 is a snapshot of the development environment. It shows that the columns of the strongly typed DataRow are easily accessible through statement completion. I was thrilled when Visual Basic introduced statement completion in version 5. However, if I made a mistake typing the name of a column in my Visual Basic 6 and ADO 2.x code, I would not discover that mistake until I ran my application. Strongly typed DataSet objects and statement completion can all but eliminate such problems in the development cycle.
    评论: “语句完成功能(statement completion)”指当你在Visual Studio.NET的编辑器中编写代码语句时,编辑器会弹出窗口提示你当前对象的可用成员或函数的参数等以帮助你完成输入的功能(通常与IntelliSense连用)。
    “all but
    ”意思是“差不多,几乎”。
  • P344(9)
    这3个选项中,使用FillSchema需要在设计时做大量的工作,这是因为ReadXmlSchema需要生成.xsd文件。第5章已经讨论过为何要尽量避免在代码中使用这个特性了。
    建议:这3个选项中,使用FillSchema方法在设计时所需工作量最少(因为使用ReadXmlSchema方法需要你构建自己的.xsd
    文件)。然而,我们在第5章已经讨论过为何要尽量避免在代码中使用这个特性。
    原文:Of these three options, using FillSchema requires the least amount of work at design time (because ReadXmlSchema requires that you build your .xsd file). However, in Chapter 5 we discussed why you should avoid using this feature in your code whenever possible.
    评论:文中对比为DataSet添加Schema的三种方法,然后指出虽然FillSchema在设计时最省工夫,不过却要付出运行时性能的代价,因而不提倡使用。“However”所表达的转折关系应该翻译出来。
  • P347(10)
    这指出了重要的一点:任何您无法编写的代码对于强类型DataSet对象类来说也同样无法生成。
    建议:这指出了重要的一点:对于强类型DataSet
    对象类中的所有(自动生成的)代码,我们都可以自己手工编写。
    原文:This brings up an important point. There's nothing in the code for the strongly typed DataSet object's class that you can't write yourself.
    评论:双重否定就是肯定。
  • P347(17)
    由于以上的改进是同强类型DataSet相关的,因此创建、填充和访问强类型DataSet需要更多的时间。
    建议:由于强类型DataSet所引致的额外开销,所以创建、填充和访问强类型DataSet
    需要更多的时间。
    原文:Because of the added overhead that comes with a strongly typed DataSet, creating, filling, and accessing strongly typed DataSet objects takes more time.
  • P350(14)
    这完全取决于应用程序的需要。如果应用程序的性能不是最优先的考虑事项,…
    建议:这完全取决于应用程序的需要。如果应用程序的性能是最优先的考虑事项,…
    原文:It all depends on the needs of your application. If the performance of your application is the absolute highest priority, you should use only untyped DataSet objects.
  • P350(-7)
    DataSet对象提供限制验证的特性,…
    建议:DataSet
    对象仅提供有限的数据验证的功能,…
    原文:DataSet objects offer limited validation features.
    评论:“limited
    ”译作“有限的”会比较容易理解。
  • P351(1)
    如果查看.NET框架的SDK中“使用类型化DataSet的注释”的主题,会找到控制通过工具生成的一些强类型类名字的不同选项,还可以发现当包含空值的强类型DataRow类被重新激活的属性中包含空值时,应该如何来控制它们。
    XML架构定义工具会检查的文挡中列出的.xsd文件的注释。
    建议:如果查看.NET框架的SDK中“Using Annotations with a Typed DataSet
    ”的主题,会找到如何控制由工具生成的强类型类的名字的各种方法,还可知道如何控制当强类型DataRow类包含空值时该如何响应。XML架构定义工具
    会检查你的.xsd文件中所列出的注释。
    原文:If you check the “Using Annotations with a Typed DataSet” topic in the .NET Framework SDK, you'll find various options for controlling the names of some of the strongly typed classes generated by the tool. You'll also discover how to control how the properties on your strongly typed DataRow classes react when they contain null values. The XML Schema Definition Tool checks your .xsd file for the annotations listed in the documentation.
  • P351(4)
    中的“用户接口”建议改为“用户界面”
    原文:The XML Schema designer does not let you add annotations to your DataSet object's .xsd file through the designer's user interface.

第十章

  • P361(-4)
    需要在DataTable中检查修改的行并确定储存在第一行中的修改类型(更新、插入或者删除)。
    建议:需要检查DataTable
    中修改过的各行并确定每行的修改类型(更新、插入或者删除)。
    原文:We need to examine the modified rows in our DataTable and determine the type of change stored in each of these rows (update, insert, or delete).
  • P375(6)
    在前面我提到过DataAdapter便您可定义…
    建议:在前面我提到过DataAdapter
    让您可定义…
    原文:Earlier, I mentioned that the DataAdapter lets you define your own updating logic.
  • P395(-5)
    在这个查询中引用的列接受空值。…
    建议:在这个查询中引用的列都不接受空值。…
    原文:None of the columns referenced in this query accepts Null values.

第十一章到最后

  • P436(1)
    不过,这个例子并不是很有用。一些开发人员会将包含…
    建议:不过,这个例子并不是很有用。极少开发人员会将包含…
    原文:This example is not terribly useful, however. Few developers will combine two DataSet objects that contain DataTable objects with the same name but that have completely different structures.
  • P436中图11.8右上角的表(即第2个DataTable)
    ID-Key为3的那行其ID-Key应改为4。
    评论: 原文亦是如此,应为笔误。
  • P441(-9)
    还有一种可用的解决方案,但是它不是针对代码的弱点的。
    建议:还有一种可用的解决方案,但是编码较为复杂。
    原文:Another solution is available, but it's not for the weak of code.
    评论:“it's not for the weak of code”
    直译就是“它不适合编码能力较弱的人士”。
  • P456(10)
    这种行为模拟了婚礼。婚礼不会因为您说了“我愿意”就成立了。如果在最后一秒钟其他人站出来,那么您就仍然是未婚的。
    建议:这种行为与举行婚礼相似。婚姻关系不会因为您说了“我愿意”就成立了。如果另一半在最后一秒钟不愿意的话,那么您就仍然是未婚的。
    原文:This behavior is analogous to a wedding ceremony. The marriage isn't official just because you say “I do.” If the other person backs out at the last second, you're not married.
    评论:“back out”
    意思是“食言,反悔”。
  • P462(3)P463(-11,-6)
    “界面”改为“接口”比较合适。
    评论:主要是对“interface”的翻译问题。
  • P474(-7)
    如果查询的结果要表示为格式正确的文档,…
    另外,我们需要向XmlDocument对象添加顶级节点,…
    建议:如果查询的结果是格式正确的文档,…
    否则的话,我们需要向XmlDocument
    对象添加顶级节点,…
    原文:If the results of the query were to represent a well-formed XML document, loading the data into an XmlDocument object would be simple. You'd only need to call the XmlDocument object's Load method and supply the XmlReader object.
    Instead, we need to add a top-level node to the XmlDocument object and then append the results of the query to that top-level node, one node at a time. The following code snippet demonstrates this technique:
  • P475(-5)
    空行漏掉了一些代码
    建议: 增加下面代码:
        while(!rdr.EOF)
            nodRoot.AppendChild(xmlDoc.ReadNode(rdr));

    评论: 原文亦是如此,应为笔误。
  • P481(3)
    …只不过查询包含一个针对CustomerID列的参数maker而不是明确指定这个值:
    建议:…只不过查询包含一个针对CustomerID列的参数标记而不是明确指定这个值:
    原文:The following template query retrieves the same information—orders and line item information for a customer—except the query contains a parameter marker for the value of the CustomerID column rather than specifies that value explicitly:
  • P551(-8)
    WHERE rownum <= 10)
    建议: WHERE rownum <= 50)
    原文: WHERE rownum <= 10)

    评论:原文亦是如此,应为笔误。
posted on 2005-03-20 11:25  chengbo  阅读(875)  评论(0编辑  收藏  举报