home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{9E28F528-1297-11D1-814E-444553540000}#13.0#0"; "DBEXPORT.OCX"
- Begin VB.Form frmTest
- BorderStyle = 3 'Fixed Dialog
- Caption = "Test DBExport"
- ClientHeight = 4095
- ClientLeft = 2295
- ClientTop = 2070
- ClientWidth = 4245
- Icon = "frmTest.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4095
- ScaleWidth = 4245
- ShowInTaskbar = 0 'False
- Begin DBExportActiveX.DBExport DBExport1
- Height = 345
- Left = 1980
- TabIndex = 7
- Top = 3600
- Visible = 0 'False
- Width = 300
- _ExtentX = 529
- _ExtentY = 609
- IniFile = "ExportSettings.ini"
- End
- Begin VB.ComboBox Combo1
- Height = 315
- ItemData = "frmTest.frx":030A
- Left = 2280
- List = "frmTest.frx":0317
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 3000
- Width = 1875
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 120
- TabIndex = 2
- Top = 3000
- Width = 1815
- End
- Begin VB.FileListBox File1
- Height = 2040
- Left = 2220
- Pattern = "*.MDB"
- TabIndex = 1
- Top = 504
- Width = 1932
- End
- Begin VB.CommandButton Command2
- Cancel = -1 'True
- Caption = "Close"
- Height = 375
- Left = 480
- TabIndex = 4
- Top = 3600
- Width = 1335
- End
- Begin VB.DirListBox Dir1
- Height = 2232
- Left = 108
- TabIndex = 0
- Top = 504
- Width = 1935
- End
- Begin VB.CommandButton cmdExport
- Caption = "Export"
- Height = 375
- Left = 2460
- TabIndex = 6
- Top = 3600
- Width = 1335
- End
- Begin VB.Label Label1
- Caption = "Select any Table and click on 'Export'"
- Height = 255
- Left = 810
- TabIndex = 5
- Top = 120
- Width = 2820
- End
- Attribute VB_Name = "frmTest"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim connect As TypeConnect
- Private Sub cmdExport_Click()
- Select Case Combo1.ListIndex
- Case 0 ' access database : let the user choose the table to export (MultiTable=True)
- DBExport1.DatabaseName = Dir1.Path & "\" & File1.filename
- DBExport1.MultiTable = True
- Case Else ' PDox or DBase, export one table at a time (MultiTable=False)
- DBExport1.DatabaseName = Dir1.Path
- DBExport1.TableName = File1.filename
- DBExport1.MultiTable = False
- End Select
- DBExport1.ConnectString = connect
- DBExport1.IniFile = App.Path & "\ExportSettings.ini"
- DBExport1.Execute
- End Sub
- Private Sub Combo1_Click()
- Select Case Combo1.ListIndex
- Case 0
- File1.Pattern = "*.MDB"
- connect = Access
- Case 1
- File1.Pattern = "*.DB"
- connect = Paradox5
- Case 2
- File1.Pattern = "*.DBF"
- connect = DBase5
- End Select
- End Sub
- Private Sub Command1_Click()
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path ' Set file path.
- End Sub
- Private Sub Drive1_Change()
- Dir1.Path = Drive1.Drive ' Set directory path.
- End Sub
- Private Sub File1_DblClick()
- cmdExport_Click
- End Sub
- Private Sub Form_Load()
- Combo1.ListIndex = 0
- End Sub
- Private Sub Test_Click()
- End Sub
-