asp基础学习代码ado与web数据库

asp基础学习代码ado与web数据库

ID:27110895

大小:63.00 KB

页数:6页

时间:2018-12-01

asp基础学习代码ado与web数据库_第1页
asp基础学习代码ado与web数据库_第2页
asp基础学习代码ado与web数据库_第3页
asp基础学习代码ado与web数据库_第4页
asp基础学习代码ado与web数据库_第5页
资源描述:

《asp基础学习代码ado与web数据库》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、ADOandWebdatabaseADO(ActiveXDataObject)WebdatabaseisWebtechnologyanddatabasetechniquesWebdatabaseUseCGI(CommonGatewayInterface)VisitWebdatabaseUseIDC(InternetDatabaseConnector)VisitWebdatabaseUseASPandADOvisitWebdatabaseODBC(OpenDataBaseConnection)Databa

2、seconnectiontechnologyDSN(DataSourceName)ADOdatabasevisittechnologyADOcomponentprovidessevenkindsofobjectsandfoursetThemostcommonlyusedisConnectionobject,CommandobjectandRecordsetobjectUsingConnectionobjectcanestablishandmanagementwithagivendatabaseConne

3、ctionUseCommandobjectcanrealizetheflexiblefordatabasequeriesUseRecordsetobjectstorageandprocessingthedatatoreturnresultsConnectionobjectTobeusedinconnectionwiththeestablishmentandmanagementoftheapplicationandthedatabaseSetconn=server.createobject(“ADODB.

4、Connection”)ConnectionobjectthecommonlyusedmethodsOpenmethodConnection.OpenExecutemethodConnection.ExecuteClosemethodConnection.CloseConnectionStringconnectstringAccessOLEDBconnectstringProvider=Microsoft.Jet.OLEDB.4.0;Source=Pointing.MDBfilesofphysicalp

5、athsAccessODBCconnectstringDriver={MicrosoftAccessDriver(*.mdb)};DBQ=pointing.mdbfilesofphysicalpathsRecordsetobjectSetrs=server.createobject(“ADODB.Recordset”)Recordset.openmethodRecordset.opensource,activeconnection,CursorType,LockTypeCursorType:0,defa

6、ultvalue,expresstoopenacanonlymoverecordpointercursor,andnotallowcorrectanyrecords。1,游标可上下移动,可更新删除,所作的修改无法由他人读取。2,打开一个动态类型的游标,可自由移动,可修改记录。3,打开一个静态类型的游标,可自由上下移动,不能修改记录。LockType:1,defaultvalue,以只读方式取得Recordset2,保守式锁定,在对某记录修改时就锁定,修改完后再解除。3,开放式锁定,仅在调用Update方

7、法更新记录时锁定。TheothermethodsofRecordsetAddNew:在记录集的最后添加一条新纪录Close:关闭指定的Recordset对象MoveFirst、MoveLast、MoveNext、MovePrevious、MoveDelete:intherecordsdeleteonecurrentrecordUpdate:将修改后的记录内容保存回数据库Recordset’sattributesBOF:whetherinthefrontofthefirstrecordEOF:whethe

8、rinthebehindofthelastrecordRecordCount:返回记录集的记录条数intheobjectsofRecordset,FieldssetconsistofmanyFieldobjects,everyFieldobject对应于Recordset记录集中的一列。UseFieldobjectandFieldssetcanachieveeveryfieldwhichareineveryrecordtomanage。Co

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

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

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