home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / crystal / extras / vbxdemo / server.frm < prev    next >
Text File  |  1994-12-14  |  5KB  |  206 lines

  1. VERSION 2.00
  2. Begin Form SetLogon 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "SQL Server"
  5.    ClientHeight    =   3900
  6.    ClientLeft      =   1875
  7.    ClientTop       =   2460
  8.    ClientWidth     =   5205
  9.    Height          =   4590
  10.    Left            =   1815
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3900
  13.    ScaleWidth      =   5205
  14.    Top             =   1830
  15.    Width           =   5325
  16.    Begin CommandButton Command5 
  17.       Caption         =   "Help"
  18.       Height          =   330
  19.       Left            =   3390
  20.       TabIndex        =   7
  21.       Top             =   1890
  22.       Width           =   1575
  23.    End
  24.    Begin SSFrame Frame3D1 
  25.       Caption         =   "Logon Information"
  26.       Font3D          =   0  'None
  27.       Height          =   3210
  28.       Left            =   330
  29.       TabIndex        =   9
  30.       Top             =   360
  31.       Width           =   2865
  32.       Begin TextBox Text4 
  33.          Height          =   375
  34.          Left            =   180
  35.          PasswordChar    =   "*"
  36.          TabIndex        =   3
  37.          Top             =   2580
  38.          Width           =   2175
  39.       End
  40.       Begin TextBox Text3 
  41.          Height          =   375
  42.          Left            =   180
  43.          TabIndex        =   2
  44.          Top             =   1890
  45.          Width           =   2175
  46.       End
  47.       Begin TextBox Text2 
  48.          Height          =   375
  49.          Left            =   150
  50.          TabIndex        =   1
  51.          Top             =   1215
  52.          Width           =   2175
  53.       End
  54.       Begin TextBox Text1 
  55.          Height          =   375
  56.          Left            =   150
  57.          TabIndex        =   0
  58.          Top             =   495
  59.          Width           =   2175
  60.       End
  61.       Begin Label Label8 
  62.          BackColor       =   &H00C0C0C0&
  63.          Caption         =   "Password(PWD)"
  64.          ForeColor       =   &H00000000&
  65.          Height          =   255
  66.          Left            =   180
  67.          MousePointer    =   11  'Hourglass
  68.          TabIndex        =   8
  69.          Top             =   2340
  70.          Width           =   1455
  71.       End
  72.       Begin Label Label7 
  73.          BackColor       =   &H00C0C0C0&
  74.          Caption         =   "User ID(UID)"
  75.          Height          =   255
  76.          Left            =   180
  77.          TabIndex        =   12
  78.          Top             =   1665
  79.          Width           =   1695
  80.       End
  81.       Begin Label Label6 
  82.          BackColor       =   &H00C0C0C0&
  83.          Caption         =   "Database Name(DSQ)"
  84.          Height          =   255
  85.          Left            =   180
  86.          TabIndex        =   11
  87.          Top             =   990
  88.          Width           =   1695
  89.       End
  90.       Begin Label Label5 
  91.          BackColor       =   &H00C0C0C0&
  92.          Caption         =   "Server Name(DSN)"
  93.          Height          =   255
  94.          Left            =   180
  95.          TabIndex        =   10
  96.          Top             =   270
  97.          Width           =   1695
  98.       End
  99.    End
  100.    Begin CommandButton Command4 
  101.       Caption         =   "Clear Settings"
  102.       Height          =   330
  103.       Left            =   3360
  104.       TabIndex        =   5
  105.       Top             =   750
  106.       Width           =   1575
  107.    End
  108.    Begin CommandButton Command2 
  109.       Caption         =   "Connect"
  110.       Height          =   330
  111.       Left            =   3360
  112.       TabIndex        =   4
  113.       Top             =   360
  114.       Width           =   1575
  115.    End
  116.    Begin CommandButton Command1 
  117.       Caption         =   "Done"
  118.       Height          =   330
  119.       Left            =   3390
  120.       TabIndex        =   6
  121.       Top             =   1500
  122.       Width           =   1575
  123.    End
  124.    Begin Menu MenuFileSQLLogon 
  125.       Caption         =   "&File"
  126.       Begin Menu MenuFileExit 
  127.          Caption         =   "&Exit"
  128.       End
  129.    End
  130. End
  131. Dim DLLName As String
  132.  
  133. Sub Command1_Click ()
  134.  Unload Me
  135.  
  136. End Sub
  137.  
  138. Sub Command2_Click ()
  139.  
  140. 'Set Logon parameters for SQL type Datasource
  141.  
  142.     ConnectString$ = "DSN=" & Text1.Text & ";UID=" & Text3.Text & ";PWD=" & Text4.Text & ";DSQ=" & Text2.Text
  143.     Main.Report1.Connect = ConnectString$
  144.     Main!StatusBar.Caption = ConnectString$
  145.  
  146. End Sub
  147.  
  148. Sub Command4_Click ()
  149.   Text1.Text = " "
  150.   Text2.Text = " "
  151.   Text3.Text = " "
  152. End Sub
  153.  
  154. Sub Command5_Click ()
  155.  
  156.  RCode = Shell("Winhelp c:\crw\crw.hlp", 3)
  157.  If RCode = False Then
  158.    MsgBox ("CRWDEMO cannot find the Crystal Help file in C:\CRW directory")
  159.    Exit Sub
  160.  End If
  161.  
  162. End Sub
  163.  
  164. Sub Command6_Click ()
  165.  
  166. End Sub
  167.  
  168. Sub Command7_Click ()
  169. End Sub
  170.  
  171. Sub Command8_Click ()
  172.    Dim nTables As Integer
  173.  
  174.    If (tableN > 0) Then
  175.       tableN = tableN - 1
  176.    End If
  177.  
  178. End Sub
  179.  
  180. Sub Form_Load ()
  181.    Main!StatusBar.Caption = "Ready"
  182.    tableN = 0
  183. End Sub
  184.  
  185. Sub MenuConnectivityDLL_Click ()
  186.  MsgBox DLLName
  187. End Sub
  188.  
  189. Sub MenuConnectivityDLLtype_Click ()
  190.  
  191.   If DLLName = "PDSODBC.DLL" Or DLLName = "pdsodbc.dll" Then
  192.    MsgBox "Connection via ODBC."
  193.   Else
  194.    MsgBox "Connection via Q+E Lib."
  195.   End If
  196. End Sub
  197.  
  198. Sub MenuExitSQLLogon_Click ()
  199.    Unload Me
  200. End Sub
  201.  
  202. Sub MenuFileExit_Click ()
  203.  Unload Me
  204. End Sub
  205.  
  206.