delphi源代码(delphi源代码)

delphi源代码(delphi源代码)

ID:9284889

大小:26.55 KB

页数:30页

时间:2018-04-26

delphi源代码(delphi源代码)_第1页
delphi源代码(delphi源代码)_第2页
delphi源代码(delphi源代码)_第3页
delphi源代码(delphi源代码)_第4页
delphi源代码(delphi源代码)_第5页
资源描述:

《delphi源代码(delphi源代码)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、delphi源代码(Delphi源代码)ConductingproblemcodeUsingSystem;UsingSystem.Data;UsingSystem.Configuration;UsingSystem.Web;UsingSystem.Web

2、.Security;UsingSystem.Web.UI;UsingSystem.Web.UI.WebControls;UsingSystem.Web.UI.WebControls.WebParts;UsingSystem.Web.UI.HtmlControls;UsingSystem.Data.SqlClient;Publicpartialclass_Default:System.Web.UI.Page{ProtectedvoidPage_Load(objectsender,EventArgsE)

3、{}ProtectedvoidButton1_Click(objectsender,EventArgsE)------------------------------------Commonlyusedthansimplestatements;Messagebox.show("HELLO,WORLD");Label2.hide();controlhide;;Textbox1.clear();TheInwebcode,ifyouwanttolinktothedatabase,youonlyneedto

4、refertoweb.configinkey.Forexample:Thedefinitionofdatabaseconnectioninweb.configisasfollows:Then,whenyouwanttoconn

5、ecttothedatabaseinthepagecode:SqlConnectionconn=newSqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);------------------------------------------------------------------------Databaseconnection:Privatevoidbutton1_Click(objectsender,Eve

6、ntArgsE){Label1.Text=textBox1.Text;SqlConnectionnwindconn=newSqlConnection("DataSource=WORKKAOQIN;InitialCatalog=worksystem;PersistSecurityInfo=True;UserID=sa;pwd=sa");//sqlconnectionobjectlinkingdatasource;SqlCommandcatCMD=nwindconn.CreateCommand();Ca

7、tCMD.CommandText="selectemp_id,card_idfromemployee"";Nwindconn.Open();SqlDataReadermyReader=catCMD.ExecuteReader();While(myReader.Read()){Console.WriteLine("t{0}t{1}",myReader.GetString(0),myReader.GetString(1));}MyReader.Close();Nwindconn.Close();}[

8、reprinted]SqlConnectiondatabaseconnectionseveralways(2010-06-2310:50:04)Reprinttheoriginallabel:reprintclassification:SQLdatabaseTextaddress:SqlConnectiondatabaseconnectionseveralways:Author:len2009Theconnectionstringhasseveralforms,som

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。