|
| |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
不只是vb.net,C#等微软的开发软件可以调用.net framework,据我所知至少有28中我知道的开发语言如何调用.net framework.下面我就给出一段事例,说明使用perl.net来访问数据库 <%@ Page Language="Perl" %> <script runat ="server"> use namespace "System::Data"; use namespace "System::Data::SqlClient"; =for interface protected override void OnLoad(System.EventArgs e); =cut sub OnLoad { my($this, $e) = @_; my $myConnection = SqlConnection->new("Data Source=(local); Trusted_Connection=Yes; Initial Catalog=pubs"); my $myCommand = SqlCommand->new("Select * From Publishers", $myConnection); $myConnection->Open(); $this->{myDataGrid}{DataSource} = $myCommand->ExecuteReader(PerlNET::enum("CommandBehavior.CloseConnection")); $this->{myDataGrid}->DataBind; } </script> <html> <body> <form runat ="server"> <asp:DataGrid id="myDataGrid" runat ="server" /> </form> </body> </html> 返回类别: 教程 上一教程: ASP.NET升级能力探讨(二) 下一教程: 在ASP.NET中将数据直接输出成Excel内容 您可以阅读与"使用perl.net访问数据库"相关的教程: · 使用COBOL.net访问数据库 · Dotnet总结(2)--访问ms sql server 数据库基类--2 · 在ASP+中访问数据库 · 使用ADO.NET轻松操纵数据库 · 实战 .Net 数据访问层 - 1 |
| 快精灵印艺坊 版权所有 |
首页 |
||