Ok, I use the following code to get info about mp3 files and then store as strings. Now I want to take the strings and use SQL to INSERT them into a table (add rows). The "Call ADOCreateTable" in the code creates a new table in the db. You should be able to see what I want to do by looking at the below code. I tried just typing INSERT and VALUE SQL commands, but it says it needs to be set = to something. Do I need to declare I'm using SQL first or something?
VB Code:
  1. Private Sub Command2_Click()
  2. Dim x As Integer
  3. Dim strFilepath As String, strFileName As String, _
  4. strFileSize As String, strArtist As String, _
  5. strTitle As String, strAlbum As String, strTrack As String, _
  6. strFrequency As String, strBitrate As String, _
  7. strLength As String
  8.  
  9.  
  10.  
  11. lstCategories.AddItem txtcategory.Text
  12. Call ADOCreateTable  'create the new table in the db
  13.  
  14. For x = 0 To File1.ListCount - 1    'loop through the filelistbox
  15.     fname = File1.Path & "\" & File1.List(x)
  16.     ReadMP3 fname, True, True
  17.    
  18.     strFilepath = fname              'store the info as strings
  19.     strFileName = File1.List(x)
  20.     strFileSize = FileLen(fname)
  21.     strArtist = GetMP3Info.Artist
  22.     strTitle = GetMP3Info.Songname
  23.     strAlbum = GetMP3Info.Album
  24.     strTrack = GetMP3Info.Track
  25.     strFrequency = GetMP3Info.Frequency
  26.     strBitrate = GetMP3Info.bitrate
  27.     strLength = GetMP3Info.Duration
  28.    
  29.     '------------------------------------------------------------------------
  30.     'Here is where I want to add all the strings into the table
  31.     '------------------------------------------------------------------------
  32.      Next    'do this for every file in the filelistbox
  33.  
  34.  
  35. Call WriteTextFile   'Updates entries in category combobox
  36. End Sub