*/
Want to see what people are talking about? See the latest forum posts.
*/

View chandru player\addaud.frm

Media player 1.0

Submitted By: chandru_be
Rating: starstarstarstarstar (Rate It)


VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form audio_add
   BackColor       =   &H00F2C6F0&
   Caption         =   "File Adder"
   ClientHeight    =   3030
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5445
   LinkTopic       =   "Form3"
   ScaleHeight     =   3030
   ScaleWidth      =   5445
   StartUpPosition =   3  'Windows Default
   Begin MSComDlg.CommonDialog cmd1
      Left            =   3720
      Top             =   2400
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.TextBox fn
      Height          =   375
      Left            =   1920
      TabIndex        =   4
      Top             =   360
      Width           =   2775
   End
   Begin VB.TextBox pa
      Height          =   375
      Left            =   1920
      TabIndex        =   3
      Top             =   840
      Width           =   2775
   End
   Begin VB.CommandButton ope1
      Caption         =   "Open File"
      Height          =   495
      Left            =   360
      TabIndex        =   2
      Top             =   1680
      Width           =   1335
   End
   Begin VB.CommandButton Command1
      Caption         =   "Add to database"
      Height          =   495
      Left            =   2040
      TabIndex        =   1
      Top             =   1680
      Width           =   1575
   End
   Begin VB.CommandButton cle
      Caption         =   "clear"
      Height          =   495
      Left            =   3840
      TabIndex        =   0
      Top             =   1680
      Width           =   1335
   End
   Begin VB.Label Label1
      BackColor       =   &H00F2C6F0&
      Caption         =   "FILE NAME  :"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   480
      Width           =   1575
   End
   Begin VB.Label Label2
      BackColor       =   &H00F2C6F0&
      Caption         =   "PATH   :"
      BeginProperty Font
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   720
      TabIndex        =   5
      Top             =   960
      Width           =   975
   End
End
Attribute VB_Name = "audio_add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public db As New ADODB.Connection
Public rs1 As New ADODB.Recordset
Private Sub cle_Click()
fn.Text = ""
pa.Text = ""
End Sub

Private Sub Command1_Click()
If ((fn.Text = "") And (pa.Text = "")) Then
MsgBox "Please set filename and path"
End If
rs1.AddNew
rs1.Fields("name") = fn.Text
 rs1.Fields("path") = pa.Text
 rs1.Update
End Sub

Private Sub Form_Load()
Set db = New ADODB.Connection
Set rs1 = New ADODB.Recordset
db.ConnectionString = "provider=Microsoft.Jet.OLEDB.3.51;data source=" & App.path & "\player.mdb;"
'db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=G:\PROGRAMS\sd lab\final\SAVED\player.mdb"
db.Open
rs1.Open "afile", db, adOpenDynamic, adLockOptimistic
rs1.MoveFirst
End Sub

Private Sub Form_Unload(Cancel As Integer)
rs1.Close

End Sub

Private Sub ope1_Click()
cmd1.ShowOpen
fn.Text = cmd1.FileTitle
pa.Text = cmd1.FileName
End Sub

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.