home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / adoc / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-08  |  2.1 KB  |  69 lines

  1. VERSION 5.00
  2. Object = "{8B1526C3-359E-11D3-8218-F4FE9524C302}#10.0#0"; "ADOC.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5835
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3195
  11.    ScaleWidth      =   5835
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin ADOC.ADOControl ADOControl1 
  14.       Height          =   315
  15.       Left            =   840
  16.       TabIndex        =   2
  17.       Top             =   2280
  18.       Width           =   3735
  19.       _ExtentX        =   6588
  20.       _ExtentY        =   556
  21.       LongRecCount    =   -1
  22.       CursorLocation  =   2
  23.       PageSize        =   10
  24.       StayInSync      =   -1  'True
  25.    End
  26.    Begin VB.Label Label2 
  27.       Caption         =   "Label2"
  28.       Height          =   375
  29.       Left            =   720
  30.       TabIndex        =   1
  31.       Top             =   0
  32.       Width           =   3615
  33.    End
  34.    Begin VB.Label Label1 
  35.       Caption         =   "Label1"
  36.       Height          =   975
  37.       Left            =   840
  38.       TabIndex        =   0
  39.       Top             =   600
  40.       Width           =   3135
  41.    End
  42. Attribute VB_Name = "Form1"
  43. Attribute VB_GlobalNameSpace = False
  44. Attribute VB_Creatable = False
  45. Attribute VB_PredeclaredId = True
  46. Attribute VB_Exposed = False
  47. Private Sub Form_Load()
  48.     Me.Show
  49.     Me.ADOControl1.ConnectString = ";dsn=fox;"
  50.     'Me.ADOControl1.CursorType = adOpenDynamic
  51.     'Me.ADOControl1.LockType = adLockOptimistic
  52.     MsgBox (Me.ADOControl1.OpenRecordset("select * from abc"))
  53.     'MsgBox (Me.ADOControl1.FieldCount)
  54.     Me.ADOControl1.Caption = Me.ADOControl1.FieldName(1)
  55. '    Dim x As New ADODB.Recordset
  56. '    Dim conn As New ADODB.Connection
  57. '    Set conn = Nothing
  58. '    Set conn = New ADODB.Connection
  59. '    conn.Open ";dsn=fox;"
  60. '    SQL = "select * from abc"
  61. '    With x
  62. '        Set .ActiveConnection = conn
  63. '        .CursorType = adOpenDynamic
  64. '        .LockType = adLockOptimistic
  65. '        .Open (SQL)
  66. '    End With
  67. '    Me.ADOControl1.Caption = x.Fields(1).Name
  68. End Sub
  69.