[Borland] 征集Delphi 2005 在ASP.net 以及VCL 方面的Bug ( 积分: 200 )

  • 主题发起人 主题发起人 y9y
  • 开始时间 开始时间
Y

y9y

Unregistered / Unconfirmed
GUEST, unregistred user!
我在Borland Inc从事DELPHI 的QA工作。负责ASP/HTML, VCL(不含数据库)方面的质量控制。
哪位高手如果愿意把自己在使用Delphi 2005中遇到的在ASP.net以及VCL方面的编程Bug、建议,请麻烦EMAIL和我联系 : joetian2002@yahoo.com,给出详细步奏,中英文都可以。
很抱歉,为避免公司信箱收到过多垃圾邮件,我将在收到您的EMAIL后,再把我在borland公司的email地址给您,供您日后遇到BUG时联络使用)
根据以前的经验,我有可能不能保证每一个BUG都给您回复,请您原谅。但我保证你提的每一个重要的BUG和建议都将被记录并给予重视。
另外,您也可以用英文把您的BUG 登记在:http://qc.borland.com/
谢谢
 
我在Borland Inc从事DELPHI 的QA工作。负责ASP/HTML, VCL(不含数据库)方面的质量控制。
哪位高手如果愿意把自己在使用Delphi 2005中遇到的在ASP.net以及VCL方面的编程Bug、建议,请麻烦EMAIL和我联系 : joetian2002@yahoo.com,给出详细步奏,中英文都可以。
很抱歉,为避免公司信箱收到过多垃圾邮件,我将在收到您的EMAIL后,再把我在borland公司的email地址给您,供您日后遇到BUG时联络使用)
根据以前的经验,我有可能不能保证每一个BUG都给您回复,请您原谅。但我保证你提的每一个重要的BUG和建议都将被记录并给予重视。
另外,您也可以用英文把您的BUG 登记在:http://qc.borland.com/
谢谢
 
嘿嘿,对你的工作表示支持!
不过,最近borland代理商查盗版太厉害,好多公司(主要是中小型软件公司)已经打算放弃DELPHI转向使用.net了。delphi2005在asp方面比.net有什么优势?这个我不清楚啊!
也许有一天,我也会放弃DELPHI转向.net或者java。一是delphi在internet方面编程不具备什么优势,二是查盗版挺厉害,好多公司不敢用borland的产品(主要是盗版的),以后个人找工作的几率低了。
 
To 荷塘新月:
那日后微软加大力度查盗版的时候,你又用什么工具呢?
 
呵呵,写ASP程序,不用.NET也可以吧!写JAVA程序,好像也有免费的软件。我只是觉得,现在公司用delphi的越来越少了,只掌握一种工具,就业的渠道很狭窄。
 
提个建议:界面最好恢复传统的delphi界面
还有,右键菜单Open File at Cursor不能打开文件,必须加.pas才能打开
 
提个建议:界面最好恢复传统的delphi界面
//--这个好像和楼主的要求不太符合[:)]
而且我觉得新的界面用用习惯后应当会比老界面好用的(不过语法高亮怎么和老的设置不一样,而且没有带老的语法高亮度设置,郁闷)。
新的IDE好像有些小问题,而且问题还老出现。
 
delphi在开发速度的优势是目前任何其他语言所不具备的,永远支持
 
新的界面屏幕利用率不如传统的,在800*600下效果不好,
还有一点就是启动时,应该可以选win32,.net环境
 
还是d7之前的IDE布局比较顺手...d8和2005用着总有些别扭
 
2005没有用过,主要是价格太高,中国人的承受能力有限啊
 
支持楼主!
Delphi2005我刚用上几天,发现同样的动态库编译形成的文件变大了几十K。(同Delphi6.0相比)
不过,界面布局比以前更加合理了。我比较喜欢新的IDE布局,有更多的代码可视范围,方便操作!
 
谢谢楼上各位,
荷塘新月:俺位卑职小, 不打击盗版,关于这个建议,我恐怕无法帮上忙。我们只能努力把产品做的更好。
whf: 是,目前设计开发程序,很少再使用800 x 600的分辨率了。
刀剑如梦,我明天上班就去看你说的文件变大的问题。
抱歉,我这里上这个网页比较慢,各位如果遇到BUG,可以写信给:joetian2002@yahoo.com
 
如何解决d2005错改 dreamweaver生成的页面模板标记?
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2952789

用d2005 开发asp.net web application应用, 页面设计使用dreamweaverMx2004, 页面中使用了模板功能, dreamweaver中生成的页面模板标记,当在d2005中保存该aspx页面文件时,d2005自动修改了其页面模板标记的位置,造成错误的代码标记.请问如何解决?
附:
代码:
(1) 正确的aspx页面文件
<%@ Page Language=&quot;c#&quot;
Debug=&quot;true&quot;
Codebehind=&quot;WebForm_user_manage.pas&quot;
AutoEventWireup=&quot;false&quot;
Inherits=&quot;WebForm_user_manage.TWebForm_user_manage&quot;%>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html><!-- Instancebegin
 template=&quot;/Templates/Default_style.dwt&quot;
codeOutsideHTMLIsLocked=&quot;false&quot;
-->
<head>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;>
<!-- Instancebegin
Editable name=&quot;doctitle&quot;
-->
<title></title>
<!-- InstanceEndEditable -->
<link href=&quot;d_style_1.css&quot;
type=&quot;text/css&quot;
rel=&quot;stylesheet&quot;>
<!-- Instancebegin
Editable name=&quot;head&quot;
--><!-- InstanceEndEditable -->
</head>
<body>
    <form runat=&quot;server&quot;>
     <!---页面顶部开始  --->
     ..........
     <!---页面顶部结束  ---><!---页面主区域开始  ---><!-- Instancebegin
Editable name=&quot;EditRegion_main&quot;
-->
     
     
     ................
       
<!-- InstanceEndEditable --><!---页面主区域结束  ---><!---页面底部开始  ---> 
....................
 <!---页面底部结束  --->	
	
     </form>
</body>
<!-- InstanceEnd --></html>       
(2) 被d2005改错的页面
<%@ Page Language=&quot;c#&quot;
Debug=&quot;true&quot;
Codebehind=&quot;WebForm_user_manage.pas&quot;
AutoEventWireup=&quot;false&quot;
Inherits=&quot;WebForm_user_manage.TWebForm_user_manage&quot;%>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html>
  <head>    (注:此处以下都被d2005改动了位置)
    <title></title>
<!-- Instancebegin
 template=&quot;/Templates/Default_style.dwt&quot;
codeOutsideHTMLIsLocked=&quot;false&quot;
-->
    <meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=gb2312&quot;><!-- Instancebegin
Editable name=&quot;doctitle&quot;
--><!-- InstanceEndEditable -->
    <link href=&quot;d_style_1.css&quot;
type=&quot;text/css&quot;
rel=&quot;stylesheet&quot;><!-- Instancebegin
Editable name=&quot;head&quot;
--><!-- InstanceEndEditable -->
  </head>
  <body>
    <form runat=&quot;server&quot;><!---页面顶部开始  --->
         ..........
     <!---页面顶部结束  ---><!---页面主区域开始  ---><!-- Instancebegin
Editable name=&quot;EditRegion_main&quot;
-->
     
     
     ................
       
<!-- InstanceEndEditable --><!---页面主区域结束  ---><!---页面底部开始  ---> 
....................
 <!---页面底部结束  --->
  </form><!-- InstanceEnd -->  (注:此外该标记被d2005移动了位置)
  </body>
</html>
 
我试用D2005写了一个asp.net,就一个页,用Access做数据库。在开发的机器上跑没问题。
我试着发布到 VMWare 虚拟机里装的干净的windows里,安装了Dot Net 1.1。按照delphi的Help的说法,我把相关的几个文件都拷贝过去了:
Borland.Data.Common.dll
Borland.Data.Provider.dll
Borland.Data.Msacc.dll //这个for access
另外,还把 bdpmsa20.dll也拷贝过去,放到winnt/system32目录下。
OK,访问我的页面,能打开,然后点了按钮,页面要执行数据库操作了,出错。错误提示:
The located assembly's manifest definition with name 'Borland.Data.Msacc'do
es not match the assembly reference.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: The located assembly's manifest definition with name 'Borland.Data.Msacc'do
es not match the assembly reference.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Borland.Data.Msacc' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = Borland.Data.Msacc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b
(Fully-specified)
LOG: Appbase = file:///C:/GSite
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:/WINNT/Microsoft.NET/Framework/v1.1.4322/aspnet.config).
LOG: Using machine configuration file from C:/WINNT/Microsoft.NET/Framework/v1.1.4322/config/machine.config.
LOG: Post-policy reference: Borland.Data.Msacc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b
LOG: Attemptingdo
wnload of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/gsite/cf6e40b8/3f28e5e7/Borland.Data.Msacc.DLL.
LOG: Attemptingdo
wnload of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/gsite/cf6e40b8/3f28e5e7/Borland.Data.Msacc/Borland.Data.Msacc.DLL.
LOG: Attemptingdo
wnload of new URL file:///C:/GSite/bin/Borland.Data.Msacc.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
按照 Help 里的说法,把那些文件都复制过去就对了。那么,请教一下,这个问题是怎么回事?
 
上述错误,我猜是版本的问题。我查了那几个 Borland.Data.xxx.Dll,版本都是2.2.0.0
在我的开发机上搜索文件,把所有C盘上的Borland.Data.xxx.Dll都搜索出来,那个 Borland.Data.Msacc.dll只有一份,版本是 2.2.0.0
因此,搞不清楚究竟是什么问题了。
 
我今天刚弄了delphi2005用了下,下面是我在做简单的C#project时,Delphi2005自动生成的代码,我想这段代码,不用我说,你们也知道发生了什么
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace DelDotNet
{
/// <summary>
/// Summary description for WinForm.
/// </summary>
public class WinForm : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Windows.Forms.DataGrid dataGrid1;
private DelDotNet.DataSet1 dataSet11;
private System.Windows.Forms.MenuItem menuItem3;
private Borland.Data.Provider.BdpConnection bdpConnection1;
private Borland.Data.Provider.BdpCommand bdpSelectCommand1;
private Borland.Data.Provider.BdpCommand bdpInsertCommand1;
private Borland.Data.Provider.BdpCommand bdpUpdateCommand1;
private Borland.Data.Provider.BdpCommand bdpDeleteCommand1;
private Borland.Data.Provider.BdpDataAdapter bdpDataAdapter1;
private DelDotNet.DataSet2 dataSetau;
public WinForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support -do
not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet11 = new DelDotNet.DataSet1();
this.bdpConnection1 = new Borland.Data.Provider.BdpConnection();
this.bdpSelectCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpInsertCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpUpdateCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpDeleteCommand1 = new Borland.Data.Provider.BdpCommand();
this.bdpDataAdapter1 = new Borland.Data.Provider.BdpDataAdapter();
this.dataSetau = new DelDotNet.DataSet2();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).begin
Init();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).begin
Init();
((System.ComponentModel.ISupportInitialize)(this.bdpDataAdapter1)).begin
Init();
((System.ComponentModel.ISupportInitialize)(this.dataSetau)).begin
Init();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3});
this.menuItem1.Text = &quot;hello&quot;;
//
// menuItem2
//
this.menuItem2.Checked = true;
this.menuItem2.Index = 0;
this.menuItem2.RadioCheck = true;
this.menuItem2.Text = &quot;yes&quot;;
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = &quot;all&quot;;
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = &quot;integrated security=SSPI;data source=/&quot;./&quot;;persist security info=Fal&quot;
+
&quot;se;initial catalog=pubs&quot;;
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = &quot;select * from Titles&quot;;
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// dataGrid1
//
this.dataGrid1.AlternatingBackColor = System.Drawing.Color.Lavender;
this.dataGrid1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.BackgroundColor = System.Drawing.Color.LightGray;
this.dataGrid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGrid1.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
this.dataGrid1.CaptionForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.DataMember = &quot;&quot;;
this.dataGrid1.DataSource = this.dataSetau.authors;
this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid1.FlatMode = true;
this.dataGrid1.Font = new System.Drawing.Font(&quot;Tahoma&quot;, 8F);
this.dataGrid1.ForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.GridLineColor = System.Drawing.Color.Gainsboro;
this.dataGrid1.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
this.dataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.HeaderFont = new System.Drawing.Font(&quot;Tahoma&quot;, 8F, System.Drawing.FontStyle.Bold);
this.dataGrid1.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.LinkColor = System.Drawing.Color.Teal;
this.dataGrid1.Location = new System.Drawing.Point(0, 0);
this.dataGrid1.Name = &quot;dataGrid1&quot;;
this.dataGrid1.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
this.dataGrid1.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.SelectionBackColor = System.Drawing.Color.CadetBlue;
this.dataGrid1.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.Size = new System.Drawing.Size(792, 370);
this.dataGrid1.TabIndex = 0;
//
// dataSet11
//
this.dataSet11.DataSetName = &quot;DataSet1&quot;;
this.dataSet11.Locale = new System.Globalization.CultureInfo(&quot;zh-CN&quot;);
this.dataSet11.Namespace = &quot;http://www.changeme.now/DataSet1.xsd&quot;;
//
// bdpConnection1
//
this.bdpConnection1.ConnectionOptions = &quot;transaction isolation=ReadCommitted;blobsize=1024&quot;;
this.bdpConnection1.ConnectionString = &quot;database=pubs;hostname=.;assembly=Borland.Data.Mssql, Version=2.0.&quot;
+
&quot;0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b;vendorclien&quot;
+
&quot;t=sqloledb.dll;provider=MSSQL;username=sa;password=erpserver2003&quot;;
//
// bdpSelectCommand1
//
this.bdpSelectCommand1.CommandOptions = null;
this.bdpSelectCommand1.CommandText = &quot;SELECT au_id, au_lname, au_fname, phone, address, city, state, zip&quot;
+
&quot;, contract FROM dbo.authors&quot;;
this.bdpSelectCommand1.CommandType = System.Data.CommandType.Text;
this.bdpSelectCommand1.Connection = this.bdpConnection1;
this.bdpSelectCommand1.ParameterCount = ((short)(0));
this.bdpSelectCommand1.SchemaName = null;
this.bdpSelectCommand1.Transaction = null;
this.bdpSelectCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpInsertCommand1
//
this.bdpInsertCommand1.CommandOptions = null;
this.bdpInsertCommand1.CommandText = &quot;INSERT INTO dbo.authors (au_id, au_lname, au_fname, phone, address&quot;
+
&quot;, city, state, zip, contract ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?&quot;
+
&quot;)&quot;;
this.bdpInsertCommand1.CommandType = System.Data.CommandType.Text;
this.bdpInsertCommand1.Connection = this.bdpConnection1;
this.bdpInsertCommand1.ParameterCount = ((short)(9));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_id&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(11)), ((byte)(0)), 11, &quot;au_id&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_lname&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;au_lname&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_fname&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;au_fname&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;phone&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(12)), ((byte)(0)), 12, &quot;phone&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;address&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;address&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;city&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;city&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;state&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(2)), ((byte)(0)), 2, &quot;state&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;zip&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(5)), ((byte)(0)), 5, &quot;zip&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;contract&quot;, Borland.Data.Common.BdpType.Boolean, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), 0, &quot;contract&quot;, System.Data.DataRowVersion.Current, null));
this.bdpInsertCommand1.SchemaName = null;
this.bdpInsertCommand1.Transaction = null;
this.bdpInsertCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpUpdateCommand1
//
this.bdpUpdateCommand1.CommandOptions = null;
this.bdpUpdateCommand1.CommandText = @&quot;UPDATE dbo.authors SET au_id = ?, au_lname = ?, au_fname = ?, phone = ?, address = ?, city = ?, state = ?, zip = ?, contract = ? WHERE au_id = ? AND au_lname = ? AND au_fname = ? AND phone = ? AND address = ? AND city = ? AND state = ? AND zip = ? AND contract = ?&quot;;
this.bdpUpdateCommand1.CommandType = System.Data.CommandType.Text;
this.bdpUpdateCommand1.Connection = this.bdpConnection1;
this.bdpUpdateCommand1.ParameterCount = ((short)(18));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_id&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(11)), ((byte)(0)), 11, &quot;au_id&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_lname&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;au_lname&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_fname&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;au_fname&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;phone&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(12)), ((byte)(0)), 12, &quot;phone&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;address&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;address&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;city&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;city&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;state&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(2)), ((byte)(0)), 2, &quot;state&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;zip&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(5)), ((byte)(0)), 5, &quot;zip&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;contract&quot;, Borland.Data.Common.BdpType.Boolean, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), 0, &quot;contract&quot;, System.Data.DataRowVersion.Current, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_idOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(11)), ((byte)(0)), 11, &quot;au_id&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_lnameOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;au_lname&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_fnameOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;au_fname&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;phoneOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(12)), ((byte)(0)), 12, &quot;phone&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;addressOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;address&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;cityOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;city&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;stateOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(2)), ((byte)(0)), 2, &quot;state&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;zipOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(5)), ((byte)(0)), 5, &quot;zip&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;contractOriginal&quot;, Borland.Data.Common.BdpType.Boolean, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), 0, &quot;contract&quot;, System.Data.DataRowVersion.Original, null));
this.bdpUpdateCommand1.SchemaName = null;
this.bdpUpdateCommand1.Transaction = null;
this.bdpUpdateCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpDeleteCommand1
//
this.bdpDeleteCommand1.CommandOptions = null;
this.bdpDeleteCommand1.CommandText = &quot;DELETE FROM dbo.authors WHERE au_id = ? AND au_lname = ? AND au_fn&quot;
+
&quot;ame = ? AND phone = ? AND address = ? AND city = ? AND state = ? &quot;
+
&quot;AND zip = ? AND contract = ?&quot;;
this.bdpDeleteCommand1.CommandType = System.Data.CommandType.Text;
this.bdpDeleteCommand1.Connection = this.bdpConnection1;
this.bdpDeleteCommand1.ParameterCount = ((short)(9));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_idOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(11)), ((byte)(0)), 11, &quot;au_id&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_lnameOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;au_lname&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;au_fnameOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;au_fname&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;phoneOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(12)), ((byte)(0)), 12, &quot;phone&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;addressOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(40)), ((byte)(0)), 40, &quot;address&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;cityOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(20)), ((byte)(0)), 20, &quot;city&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;stateOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(2)), ((byte)(0)), 2, &quot;state&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;zipOriginal&quot;, Borland.Data.Common.BdpType.String, Borland.Data.Common.BdpType.stFixed, 0, System.Data.ParameterDirection.Input, false, ((byte)(5)), ((byte)(0)), 5, &quot;zip&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.Parameters.Add(new Borland.Data.Common.BdpParameter(&quot;contractOriginal&quot;, Borland.Data.Common.BdpType.Boolean, Borland.Data.Common.BdpType.Unknown, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), 0, &quot;contract&quot;, System.Data.DataRowVersion.Original, null));
this.bdpDeleteCommand1.SchemaName = null;
this.bdpDeleteCommand1.Transaction = null;
this.bdpDeleteCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// bdpDataAdapter1
//
this.bdpDataAdapter1.Active = true;
this.bdpDataAdapter1.DataSet = this.dataSetau;
this.bdpDataAdapter1.DataTable = this.dataSetau.authors;
this.bdpDataAdapter1.DeleteCommand = this.bdpDeleteCommand1;
this.bdpDataAdapter1.InsertCommand = this.bdpInsertCommand1;
this.bdpDataAdapter1.SelectCommand = this.bdpSelectCommand1;
this.bdpDataAdapter1.StartRecord = 0;
this.bdpDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping(&quot;Table&quot;, &quot;authors&quot;, new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping(&quot;au_id&quot;, &quot;au_id&quot;),
new System.Data.Common.DataColumnMapping(&quot;au_lname&quot;, &quot;au_lname&quot;),
new System.Data.Common.DataColumnMapping(&quot;au_fname&quot;, &quot;au_fname&quot;),
new System.Data.Common.DataColumnMapping(&quot;phone&quot;, &quot;phone&quot;),
new System.Data.Common.DataColumnMapping(&quot;address&quot;, &quot;address&quot;),
new System.Data.Common.DataColumnMapping(&quot;city&quot;, &quot;city&quot;),
new System.Data.Common.DataColumnMapping(&quot;state&quot;, &quot;state&quot;),
new System.Data.Common.DataColumnMapping(&quot;zip&quot;, &quot;zip&quot;),
new System.Data.Common.DataColumnMapping(&quot;contract&quot;, &quot;contract&quot;)})});
this.bdpDataAdapter1.UpdateCommand = this.bdpUpdateCommand1;
//
// dataSetau
//
this.dataSetau.DataSetName = &quot;DataSet&quot;;
this.dataSetau.Locale = new System.Globalization.CultureInfo(&quot;zh-CN&quot;);
this.dataSetau.Namespace = &quot;http://www.changeme.now/DataSet2.xsd&quot;;
//
// WinForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(792, 370);
this.Controls.Add(this.dataGrid1);
this.Menu = this.mainMenu1;
this.Name = &quot;WinForm&quot;;
this.Text = &quot;WinForm&quot;;
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bdpDataAdapter1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataSetau)).EndInit();
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new WinForm());
}
/// <summary>
/// menuItem2_Click
/// </summary>
private void menuItem2_Click(object sender, System.EventArgs e)
{
this.sqlConnection1.Open();
this.sqlDataAdapter1.Fill(this.dataSet11);
this.sqlConnection1.Close();
}
private void menuItem3_Click(object sender, System.EventArgs e)
{
this.menuItem2.PerformClick() ;
this.menuItem2_Click(null,null);
}
}
}
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Windows.Forms.DataGrid dataGrid1;
private DelDotNet.DataSet1 dataSet11;
private System.Windows.Forms.MenuItem menuItem3;
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet11 = new DelDotNet.DataSet1();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).begin
Init();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).begin
Init();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3});
this.menuItem1.Text = &quot;hello&quot;;
//
// menuItem2
//
this.menuItem2.Checked = true;
this.menuItem2.Index = 0;
this.menuItem2.RadioCheck = true;
this.menuItem2.Text = &quot;yes&quot;;
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = &quot;all&quot;;
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = &quot;integrated security=SSPI;data source=/&quot;./&quot;;persist security info=Fal&quot;
+
&quot;se;initial catalog=pubs&quot;;
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = &quot;select * from Titles&quot;;
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// dataGrid1
//
this.dataGrid1.AlternatingBackColor = System.Drawing.Color.Lavender;
this.dataGrid1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.BackgroundColor = System.Drawing.Color.LightGray;
this.dataGrid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGrid1.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
this.dataGrid1.CaptionForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.DataMember = &quot;&quot;;
this.dataGrid1.DataSource = this.dataSet11._Table;
this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid1.FlatMode = true;
this.dataGrid1.Font = new System.Drawing.Font(&quot;Tahoma&quot;, 8F);
this.dataGrid1.ForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.GridLineColor = System.Drawing.Color.Gainsboro;
this.dataGrid1.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
this.dataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.HeaderFont = new System.Drawing.Font(&quot;Tahoma&quot;, 8F, System.Drawing.FontStyle.Bold);
this.dataGrid1.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.LinkColor = System.Drawing.Color.Teal;
this.dataGrid1.Location = new System.Drawing.Point(0, 0);
this.dataGrid1.Name = &quot;dataGrid1&quot;;
this.dataGrid1.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
this.dataGrid1.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid1.SelectionBackColor = System.Drawing.Color.CadetBlue;
this.dataGrid1.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
this.dataGrid1.Size = new System.Drawing.Size(792, 370);
this.dataGrid1.TabIndex = 0;
//
// dataSet11
//
this.dataSet11.DataSetName = &quot;DataSet1&quot;;
this.dataSet11.Locale = new System.Globalization.CultureInfo(&quot;zh-CN&quot;);
this.dataSet11.Namespace = &quot;http://www.changeme.now/DataSet1.xsd&quot;;
//
// WinForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(792, 370);
this.Controls.Add(this.dataGrid1);
this.Menu = this.mainMenu1;
this.Name = &quot;WinForm&quot;;
this.Text = &quot;WinForm&quot;;
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
this.ResumeLayout(false);
}
 
同时也给些建议(仅供参考):
A. 在Visual C#中,输入///或,会自动生成XML格式的标签,同时当调用该方法时,会出现你写在里边的注释,虽然Delphi2005可以出现一些提示,但是出现的只不过是函数的原形,如果在原来的基础上加山C#中的功能就更好了。
B. Delphi 的编成模式非常方便,但是再作DotNet程序时,加载的东西太多,用很多都用不上,这首先就增大了耗用的内存,同时也给界面刷新带来问题,在写程序时可能需要在代码和画面间不停的切换,这样就影响了工作效率,Delphi2005中(或下一个版本中)的界面能不能简洁些,像whf的方法我认为挺合理的,就是在开始就选则是传统的Window程序还是DotNet程序。
时刻关注……
 
fengyakun_2003: 谢谢,能否麻烦EMAIL给我你是如何生成这段代码的步骤的,越详细越好,这显然是个很糟糕的BUG,但我没有遇到过这情况。一定是有什么特别的原因:特别的步奏、或者特别的系统配置造成的这问题,不然,应该有很多人遇到这情况。
我的EMAIL地址是:joetian2002@yahoo.com
 
邪神,谢谢,D2005的确会重新格式你的APS代码,我从你给的代码里,只看到被格式改变了注释部分,它造成的影响是什么?能否给我Email : joetian2002@yahoo.com
 
后退
顶部