zoukankan      html  css  js  c++  java
  • 在LOTUS中利用ADO连结后端数据库

    http://www.microsoft.com/data/

    "Dbq=c:\somepath\mydb.mdb;" & _
    "Uid=admin;" & _
    "Pwd="'
    Create and Open Connection Object
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Open DBConStr


    ";Data Source=192.168.2.10;User Id=sa;Password=password;Connect Timeout = 10;" & _
    "Initial Catalog=Northwind;"'

    Create and Open Connection Object
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Open DBConStr

    AbsolutePage

    Long

    AbsolutePosition

    Long

    ActiveCommand

    Variant

    ActiveConnection

    String

    BOF

    Boolean

    Bookmark

    Variant

    CacheSize

    Long

    CursorLocation

    Long

    CursorType

    CursorTypeEnum

    DataMember

    String

    DataSource

    EditMode

    EditModeEnum

    EOF

    Boolean

    Fields

    Field

    Filter

    Variant

    Index

    String

    LockType

    LockTypeEnum

    MarshalOptions

    xtdLong

    MaxRecords

    Long

    PageCount

    Long

    PageSize

    Long

    Properties

    Property

    RecordCount

    Long

    Sort

    String

    Source

    String

    State

    Long

    Status

    RecordStatusEnum

    StayInSync

    Boolean

    AddNew

    Cancel

    CancelBatch

    CancelUpdate

    Clone

    Close

    CompareBookmarks

    Delete

    Find

    GetRows

    GetString

    Move

    MoveFirst

    MoveLast

    MoveNext

    MovePrevious

    NextRecordset

    Open

    Requery

    Resync

    Save

    Seek

    Supports

    Update

    UpdateBatch

    ";Data Source=192.168.2.10;User Id=sa;Password=password;Connect Timeout = 10;" & _
    "Initial Catalog=Northwind;"

    'Create and Open Connection Object
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Open DBConStr
    'Create and Open Employee Recordset Object
    Set EmpRS=CreateObject("ADODB.Recordset")
    EmpRS.CursorType=1
    EmpRS.LockType=3
    EmpRS.Open "Suppliers",Conn,1,3,adCmdTable
    'Add New Record
    EmpRS.AddNew
    'Set Field Data
    EmpRS("CompanyName").value="CompanyName"
    EmpRS("ContactName").value="ContactName"
    EmpRS("ContactTitle").value="ContactTitle"
    EmpRS("Address").value="Address"
    EmpRS("City").value="City"
    EmpRS("Region").value="Region"
    EmpRS("PostalCode").value="PostalCode"
    EmpRS("Country").value="Country"
    EmpRS("Phone").value="Phone"
    EmpRS("Fax").value="Fax"
    EmpRS("HomePage").value="HomePage"
    'Update To Record
    EmpRS.Update

    'Clean up
    EmpRS.Close
    Conn.Close
    Set EmpRS=Nothing 
    Set Conn=Nothing
    Exit Sub

    ErrorHandler:
    'Clean up
    If Not EmpRS Is Nothing Then
    If EmpRS.State = adStateOpen Then EmpRS.Close
    End If
    Set EmpRS = Nothing

    If Not Conn Is Nothing Then
    If Conn.State = adStateOpen Then Conn.Close
    End If
    Set Conn = Nothing
     

  • 相关阅读:
    windows ip路由
    linux ip命令和ifconfig命令
    工作项目技术总结
    网络安全体系
    网络适配器输入的IP地址 已经分配给另一个适配器
    Android笔记之ImageView设置图片以灰色显示
    js小功能
    html2canvas截取图片跨域解决办法
    JS学习笔记(二).eq()与[]的区别
    jQuery中常用的元素查找方法总结
  • 原文地址:https://www.cnblogs.com/hannover/p/2232379.html
Copyright © 2011-2022 走看看