DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: melqui
今日帖子: 4
在线用户: 1
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/3 17:24:05
标题:
求助!Delphi8如何访问数据库? 浏览:5411
加入我的收藏
楼主: 还有,ADO.Net怎么用呢?先谢谢各位高人了。
----------------------------------------------
-
作者:
男 waterstone (waterstone) ★☆☆☆☆ -
盒子活跃会员
2004/4/3 18:03:53
1楼: 刚装好D8
正在学习!

----------------------------------------------
我来自农村广阔的田野我的每一个动作都很夸张http://waterstone.51r.com
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/3 18:10:29
2楼: 需要Data Explorer
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/3 20:10:32
3楼: 说明白一点好吗?
----------------------------------------------
-
作者:
男 smallfang (*&*) ★☆☆☆☆ -
普通会员
2004/4/4 16:48:59
4楼: 这个问题有点大,不太好说清楚啊,你要不问得再具体点好了,别人也不能在这儿开课吧。
----------------------------------------------
如你所愿,你将不会收到本站任何邮件。
作者:
男 waterstone (waterstone) ★☆☆☆☆ -
盒子活跃会员
2004/4/4 18:43:13
5楼: 都才开始学
一块研究吧!置顶13天,看有没有人搞定!


----------------------------------------------
我来自农村广阔的田野我的每一个动作都很夸张http://waterstone.51r.com
作者:
男 lz_oyhq (lz_oyhq) ★☆☆☆☆ -
盒子活跃会员
2004/4/9 12:26:48
6楼: 用ADO.NET其中涉及DATASET DATAREAD 数据库适配器 DATAREAD等对象不是一句话能说清楚,请你查阅介绍ADO.NET有关书籍.
----------------------------------------------
lz_oyhq
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/9 15:37:42
7楼: 我发的那幅图哪儿去了?
此帖子包含附件:
GIF 图像
大小:4.8K
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/9 21:49:21
8楼: 谢谢大家的支持!
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/10 8:46:55
9楼: Access我都连不上。按此在新窗口浏览图片
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/10 21:38:20
10楼: Access连接不上的话就令人不解了。

如果SQL连接不上就很平常了,我的就是
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/10 21:44:19
11楼: 嘿嘿,关键是我一点也不会连,能教教我吗?(最好也发个连接成功和显示数据的截图?)谢谢了!
----------------------------------------------
-
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 11:05:33
12楼: 我连过,很简单,不过要我说出来,很难。我的表达能力有限。
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 12:52:02
13楼: 真的?发个截图?按此在新窗口浏览图片 按此在新窗口浏览图片
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/12 20:19:54
14楼: 嗯,哈哈哈哈哈哈哈,太简单了,我已经连接上了!!!!!!!!!我终于连接上了!!!!!看来不是Delphi8的问题,其实就是使用者自己的问题!!!
此帖子包含附件:
GIF 图像
大小:6.9K
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/12 20:20:46
15楼: 看看,可以打开列表拉!
此帖子包含附件:
GIF 图像
大小:9.1K
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/12 20:21:59
16楼: 还有这个哦…………
此帖子包含附件:
GIF 图像
大小:11.7K
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 20:56:43
17楼: 怎么连的?????????????????????????
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 20:57:01
18楼: 强啊!!!!!!!!
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 20:57:52
19楼: Tell me?万分感谢!!!!
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/12 21:12:48
20楼: 我就相信一定会有人解决的!
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 15:50:21
21楼: Wow!!!我也连上了!原来如此简单!谢谢flyers大哥的指点!!
此帖子包含附件:
GIF 图像
大小:90.5K
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 15:52:35
22楼: 确实简单!!!!!!!我以前光拿着Access试了,没想到还是SQL Server好连。
此帖子包含附件:
GIF 图像
大小:10.0K
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 15:55:49
23楼: 可是Access还是没连上。我还是比较喜欢Access
----------------------------------------------
-
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:33:40
24楼: 他妈的,Access
就是连不上。我看好像是组件有问题!D8真他妈的难!
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:40:47
25楼: 大家说话文明点,呵呵。
----------------------------------------------
-
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:41:35
25楼: 有讨厌BDP的吗?用是好用,但发布程序时要带个borland database provider.


已上结论对吗?

编VCL FORM程序和以前一样,但ASP就比以前的ASP难多了。

我以前白学了。
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:42:40
26楼: 两位版主给我一个星期,我再连连Access,确实难连。
----------------------------------------------
-
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:43:35
26楼: 我还是喜欢ADO.
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:46:18
27楼: 老公,多谢乐。连上了一定要告诉我哟。
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:47:22
27楼: ASP在D8里是ASP.Net,ADO在D8里是ADO.Net。

BDP要是能不用就好了,毕竟不是.Net的东西。同意gaoyong_gy。
----------------------------------------------
-
作者:
男 gaoyong_gy (gaoyong_gy) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 16:53:35
28楼: 还是intraweb好用
----------------------------------------------
Delphi 的移动程序开发,是您不可再错失的机遇:http://blog.163.com/you888@188/blog/static/6723961920169319529515/
作者:
男 dfw@172923 (snowyxx) ★☆☆☆☆ -
普通会员
2004/4/13 20:20:42
29楼: 强人们啊
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/13 20:47:08
30楼: 我有些讨厌BDP,更喜欢ADO.Net
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/13 20:50:25
31楼: 刚才说错了,应该是ADO.Net,而不是ASP.Net幸好改回来了。

其实BDP是ADO.Net的进化形,如果他要是中文且不用携带的话,我一定选择他
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 21:25:04
32楼: BDP和原来的BDE差不多,都不是Windows自带的;而且要发布一个使用它们的软件,也都需要带着它们发布(原来我就烦透BDE了,这回又来个BDP)。
----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/13 21:34:50
33楼: 呵呵,我求助求来了这么多帖子。谢谢大家热心帮助。
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/14 14:28:39
34楼: 互相帮助
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/15 15:57:12
35楼: 咦?怎么取消置顶了?
----------------------------------------------
-
作者:
男 dlp (DLP) ★☆☆☆☆ -
盒子活跃会员
2004/4/22 7:26:12
36楼: 大家看看这篇文章!


Delphi 8 for .NET and ASP.NET Web Forms
In this article I will use Borland Delphi 8 for the Microsoft .NET Framework to build and deploy ASP.NET Web Form applications. We'll be using the Borland Data Providers to connect to an InterBase database, and then use the special Borland DB Web controls to work with the data in the web form. 

New ASP.NET Application
Start Delphi 8 for .NET, and create a new ASP.NET Web Application. Save it as WebForm, so the URL to test it on your local development machine will be http://localhost/WebForm. Note that I've specified Internet Information Server (IIS) as web server option, but you can also use Cassini to test the web form application. 


 
When you click on OK, the new project is created with an empty ASP.NET web form. 

Borland Data Providers
The first thing we need to do is add the connection to the database. I will use the Borland Data Provider for .NET in this example, which allows us to connect to InterBase, DB2, Oracle, MS Access, or SQL Server/MSDE (depending on the edition of Delphi 8 for .NET that you have). We'll use InterBase for this example, so from the Data Explorer (in the upper-right corner), open up the InterBase connection node, and select the IBConn1 node. Right-click on this node in order to configure it. This results in the Connections Editor. Here, you need to specify the path to the InterBase database as value of the Database property. Note that just the path is not enough, since you also need to prefix it with the name of the machine where the InterBase database is located (relative to the ASP.NET web server application that is, which means we can use localhost here). Without the name of the machine (or IP-address), the connection can still be made at design-time, but will fail at runtime. 
Apart from the Database property, you also need to specify the UserName and Password values, which are sysdba and masterkey for the Employee.gdb database. 


 
Before you close this dialog, it's a good idea to click on the Test button, you at least you know if you didn't make any mistake with these property values. 
Once the connection works, you can close the dialog. Then, you can open up the IBConn1 node, which shows subnodes for the Tables, Views and (stored) Procedures in the InterBase database. For our example, we need a table, so open up the Table node. This will show the eleven tables in the InterBase database, including the EMPLOYEE table. Now, click on the EMPLOYEE table and drag it to your ASP.NET web form and drop it there. This will create two new components in the non-visual area of the HTML Designer: BdpConnection1 and BdpDataAdapter1. 

Configure Data Adapter
Select the BdpDataAdapter1 component and click on the "Configure Data Adapter" verb at the bottom of the Object Inspector. This will start the Data Adapter Configuration dialog. This dialog can be used to examine or modify the configuration of the BdpDataAdapter. In this example, the BdpDataAdapter was automatically created since we dragged the EMPLOYEE table to the designer area. So it shouldn't come as a surprise that the BdpDataAdapter is connected to the BdpConnection component (which was also automatically created) and has four predefined SQL Command properties with ready to use SQL statements for SELECT, UPDATE, INSERT and DELETE. 


 
You can still change the SQL Commands here, if you wish. Once you're happy, you need to go to the last tab (DataSet) to specify that the output of the preconfigured SELECT query should be placed in a new dataset called dataSet1. Then, click on OK to close this dialog, which will result in a third component in the non-visual area of the designer, namely dataSet1. 
Now, set the Active property of the BdpDataAdapter1 component to True to make sure we get live data at design-time (which is a great help to design and test the page without having to guess how the final page will look like in the end). 

Designing the Web Form
With the dataset in place, it's time to build the visual part of the data entry form. Open the DB Web category in the Tool Palette. But first double-click on the DBWebDataSource component so it will also be placed in the non-visual area of the HTML Designer. Point the DataSource property of DBWebDataSource to dataSet1 - the .NET dataset that contains the results of the SELECT query on the EMPLOYEE table. The DBWeb Data Source component will act as a "gateway" between the visual DB Web controls and the .NET dataset. 
The other DB Web controls include a DBWebCalendar, DBWebCheckBox, DBWebDropDownList, DBWebGrid, DBWebImage, DBWebLabel, DBWebLabeledTextBox, DBWebListBox, DBWebMemo, DBWebNavigator, DBWebRadioButtonList, and DBWebTextBox. 


 
Let's start with the two most powerful controls: the DBWebGrid in combination with the DBWebNavigator. Double-click on these two controls in the Tool Palette to place them on the HTML Designer. Select the DBWebNavigator, point its DataSource property to DBWebDataSource1, and its TableName property to EMPLOYEE. 
Now, select the DBWebGrid, point its DataSource property to DBWebDataSource1 as well, and its TableName property to EMPLOYEE. This should give you instant live data at design-time: 


 
The DBWebDataGrid contains built-in support for paging, editing, deleting and updating. Although to be honest, for the last feature we need to write one line of code to actually send the update from the DBWebDataGrid via the BdpDataAdapter and the BdpConnection component to the actual underlying EMPLOYEE table from the InterBase database. That line of code needs to be written in the OnApplyChangeRequest event handler of the DBWebDataSource component, as follows: 

  procedure TWebForm1.DBWebDataSource1_OnApplyChangesRequest(sender: System.Object;
    e: Borland.Data.Web.WebControlEventArgs);
  begin
    BdpDataAdapter1.AutoUpdate(dataSet1, 'EMPLOYEE', BdpUpdateMode.All)
  end;

You can now compile and run the application from the Delphi 8 for .NET IDE. Note that there are two ways to run the application: with or without the debugger, both available in the Run menu (see last month's article for more details). 
Deployment
To deploy the ASP.NET Web Form application, take a closer look at your project directory, which is actually the virtual directory itself. You need to deploy the assembly located in the \bin subdirectory - that's WebForm.dll in our case - as well as the WebForm1.aspx file and optionally the web.config and global.asax files. We also need to deploy the assembly that contains the DB Web controls; Borland.Data.Web.dll. And since we're using the Borland Data Provider, we also need to deploy Borland.Data.Provider.dll, Borland.Data.Common.dll, and the InterBase specific Borland.Data.InterBase.dll as well as the InterBase client gds32.dll (visible as Vendor client property in the Connections dialog). All these files can be placed in the same \bin subdirectory of the virtual directory on the web server, or you can register the assemblies in the GAC (Global Assembly Cache) on the web server, but this usually requires manual assistance from your ISP. 

Other Controls
As I've showed earlier, the DBWeb category of the Tool Palette contains more than just the DBWebGrid control. And not everybody wants to show more than one record at the same time. Especially when offering a data-entry screen to the endusers. 
So, click on the DBWebGrid and remove it from the ASP.NET Web Form. Instead, add four DBWebTextBox controls, a DBWebLabel and a DBWebCalendar control. The following table should give a quick and clear overview of which component types you need to drop, in which order, how to call them, and where to connect their properties to. 

New Component Property Value 
DBWebLabel Name DBWLEMPNO 
 DBDataSource DBWebDataSource1 
 TableName EMPLOYEE 
 ColumnName EMP_NO 
 

DBWebTextBox Name DBWTBFIRST_NAME 
 DBDataSource DBWebDataSource1 
 TableName EMPLOYEE 
 ColumnName FIRST_NAME 
 

DBWebTextBox Name DBWTBPHONE_EXT 
 DBDataSource DBWebDataSource1 
 TableName EMPLOYEE 
 ColumnName PHONE_EXT 
 

DBWebCalendar Name DBWCHIRE_DATE 
 DBDataSource DBWebDataSource1 
 TableName EMPLOYEE 
 ColumnName HIRE_DATE 
 

DBWebTextBox Name DBWTBJOB_GRADE 
 DBDataSource DBWebDataSource1 
 TableName EMPLOYEE 
 ColumnName JOB_GRADE 
 

DBWebTextBox Name DBWTBSALARY  
 DBDataSource DBWebDataSource1  
 TableName EMPLOYEE  
 ColumnName SALARY  

This is not a complete coverage of the EMPLOYEE table, but it will be enough to demonstrate some of the validation capabilities of ASP.NET. The DBWebLabel is read-only, so that control doesn't need validation. The DBWebCalendar control can only be used to select a date, so apart from the fact that you can still select a date that is logically wrong, you cannot enter a date that is syntactically wrong. 
More interesting are the four DBWebTextBox controls can be associated with one of the ASP.NET Validation controls to perform input validation. 
Input Validation
There are two different kinds of validation we can add to the ASP.NET project: server-side validation and client-side validation. If the enduser enters data in the DBWebTextbox controls and hits the next button on the navigator, then this is equal to clicking on the submit button. The data will be sent to the web server, and we can now perform server-side data validation on the data that the enduser just entered (or modified). If the data is invalid, we can respond in kind. 
The alternative is that a little section of script code is executed when the enduser clicks on the navigator button. This scripting code can make a first attempt at checking the validity of the data that is entered in the browser. This is called client-side validation, and the obvious benefit is that is doesn't need the round-trip to the server in order to validate your data. 

Validating using ASP.NET
Using ASP.NET, we can actually use validation server controls that generate client-side script. This means that the controls run at the server, but the script is executed at the client side in the browser. 
ASP.NET contains six built-in validator controls, namely the RequiredFieldValidator, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator and ValidationSummary. They can be found in the "Web Controls" category of the Tool Palette. 

RequiredFieldValidator
Let's start with the RequiredFieldValidator. This control will enforce the fact that the enduser has to specify a value for the given field. To demonstrate its use, drag one from the Web Controls category on the ASP.NET web form, and place it right next to the DBWTBFIRST_NAME control to enforce the fact that the FIRST_NAME may not be left empty. Placing the RequiredFieldValidtor next to the DBWTBFIRST_NAME control is not enough, of course, you also have to point the ControlToValidate property of the RequiredFieldValidator to the DBWTBFIRST_NAME. Apart from that, you may want to change the ErrorMessage property, which by default only says "RequiredFieldValidator". At runtime, the validator is invisible, but as soon as the DBWTBFIRST_NAME is empty and the cursor leaves the edit control, then the validator is triggered and the error message shown in the browser. Apart from that, the JavaScript code will ensure that you cannot use the DBWebNavigator to move to another page without solving the validation problem. 

CompareValidator
Another ASP.NET validation control is the CompareValidator. Where the RequiredFieldValidator could only verify whether or not a field is empty, the CompareValidator can compare the contents of a field against a value or data type. And especially the last one is very handy when it comes to web input, since you want to validate the currency or other numerical input fields before sending them to the server. The CompareValidator has two properties that you can use to point to the DBWebTextBox to validate: either ControlToCompare or ControlToValidate. The first one compares the value to a given value, the second one compares the content to a given type. We'll use the latter now. You can use the CompareValidator to validate the type of input for the PHONE_EXT field, by setting type to Integer (the phone number consists of numbers only), and the Operator property to DateTypeCheck. 
Apart from using the CompareValidator to check if the input is of a specific type, we can also use the CompareValidator to compare a field value against a specified value, using the operator Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan, or LessThanEqual. 

RangeValidator
So far, we've been able to check if a field is empty or not, and if a field contains a value that is within a specified type (or matches a specified value). Using the RangeValidator, we can take it one step further, and check if a field value is within a specified range. As an example, we can verify that the SALARY isn't negative or higher than a specified maximum value. Or that the JOB_GRADE is at least a certain value. To build these examples, drop a RangeValidator control next to the DBWTBJOB_GRADE control, set the ControlToValidate property to DBWTBJOB_GRADE, the type to Integer, the MinValue to 4, and the MaxValue to 12. Make sure to set the ErrorMessage property, for example to "Education level must be between 4 and 12". 

RegularExpressionValidator
Another validator control - that I will not demonstrate here - is the RegularExpressionValidator. This validator control works just like the CompareValidator or the RangeValidator, but uses a regular expression to validate the value from the input field. This can be used for complex values like zip or postal codes. 

ValidationSummary
The ValidationSummary control is a special validation control. Not really a validation control, in fact, but more a control that lists the summary of all validation violations in your page. We can place it on the web form, and it will automatically display all errors in a (bulleted) list, which can be useful at times. 
The summary can be shown in the ValidationSummary control itself, or using a messagebox (or both), based on the value of the ShowSummary and ShowMessageBox properties of the ValidationSummary control. 

Validation in Action
With all the validation controls in place, compile and run the application and clear some fields or enter invalid values to test the use of the validator controls: 


 
You can click on the DBWebNavigator, but you will not be able to perform any action - navigator or apply data to the database - before the validation errors are solved. Only the undo buttons will work, reverting the input fields to their original record values again. 

Summary
In this article I've demonstrated how to build ASP.NET Web Form applications using Borland Delphi 8 for .NET. I've shown that we can connect to databases like InterBase (or DB2, Oracle, MS Access or SQL Server/MSDE) with the Borland Data Provider, and can use Borland's new DB Web controls to build powerful user interfaces. 
Combining the DB Web controls with the ASP.NET input validation controls enable us to build robust data entry pages as web applications. 


----------------------------------------------
-
作者:
男 dlp (DLP) ★☆☆☆☆ -
盒子活跃会员
2004/4/22 7:26:33
37楼: 我照着这个教程做了一遍! 

因为是第一次接触有关内容!做起来不太顺,但总体感觉还可以!发现BDP跟ADO.NET基本是一致的嘛!也是Connection,DataAdapter,DataSet这些部件嘛!只是多了个DBWebDataSource和其他的DBWebCalendar, DBWebCheckBox, DBWebDropDownList, DBWebGrid, DBWebImage, DBWebLabel, DBWebLabeledTextBox, DBWebListBox, DBWebMemo, DBWebNavigator, DBWebRadioButtonList, and DBWebTextBox。 

ADO.NET中直接操作DataSet来获取数据;而BDP则在DataSet后再增加了BWebDataSource,其他控件通过它来访问数据! 




----------------------------------------------
-
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/22 20:59:35
38楼: 你烦BDE吗?它跟原来的ADO相似,有一个TDatabase,一个TQuery,一个TTable。
BDP也和ADO.Net相似,我也不喜欢BDP。为什么Borland在数据访问上总是要独树一帜呢?
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/4/23 13:40:31
39楼: 看花了眼也看不懂,反正我个人认为BDP是专门支持D8的插件,没看见从Data Explorer中拖动,他不创建ADO.Net元素,却创建BDP,而我仔细看一下,BDP和ADO.Net几乎一模一样,就是DataSource的内容不大一样,还有调用方式(旨在D8中),ADO.Net里调用需要System.Data,而BDP直接调用控件,还有BDP有许多小工具方便程序员编写数据库。但是,我宁愿去选ADO.Net也不愿意去选BDP,因为不方便,而且还是E文,看都看不懂……我英语水平太差了……
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
作者:
男 ssyyxx (Startar) ★☆☆☆☆ -
盒子活跃会员
2004/4/28 20:56:20
40楼: 但是发布软件时还要带着个BDP呀,麻烦。不如ADO.NET
----------------------------------------------
-
作者:
男 luckypig (luckypig) ★☆☆☆☆ -
盒子活跃会员
2004/6/18 15:12:32
41楼: 楼上用的那些方法很简单嘛,连不上是设置的问题吧.
----------------------------------------------
-
作者:
男 flyers (flyers) ★☆☆☆☆ -
普通会员
2004/6/18 20:47:48
42楼: 呵呵,对头!
----------------------------------------------
大家好,我是Flyers。

是Delphi.Net版主,小弟会尽力解决大家的问题!谢谢支持!
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行138.6719毫秒 RSS