pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by Ex on Tue 24th Aug 21:00
download | new post

  1.    Private Sub Greport_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Greport_btn.Click
  2.         Dim output As String
  3.  
  4.         If path = "" Then
  5.             MsgBox("Please select a database")
  6.  
  7.         Else
  8.             output = TimeOfDay & "  " & DateString & vbNewLine
  9.  
  10.             con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & path
  11.             con.Open()
  12.  
  13.             qry = "SELECT MSysObjects.Name AS table_name FROM MSysObjects"
  14.             da = New OleDb.OleDbDataAdapter(qry, con)
  15.             da.Fill(ds_tables, "MSysObjects")
  16.  
  17.             For i = 0 To ds_tables.Tables("MSysObjects").Rows.Count
  18.                 qry = "SELECT * FROM " & ds_tables.Tables("MSysObjects").Rows(i).Item(0).ToString
  19.                 da = New OleDb.OleDbDataAdapter(qry, con)
  20.                 da.Fill(ds_tables_content, ds_tables.Tables("MSysObjects").Rows(i).Item(0))
  21.  
  22.                 For c = 0 To ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Rows.Count
  23.  
  24.                     If table_cb.Checked = True Then
  25.                         output &= ds_tables.Tables("MSysObjects").ToString & vbNewLine
  26.                     End If
  27.  
  28.                     If primarykey_cb.Checked = True Then
  29.                         output &= ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Columns.ToString
  30.                     End If
  31.  
  32.                     If foreignkey_cb.Checked = True Then
  33.                         output &= ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Columns.ToString
  34.                     End If
  35.  
  36.                     If attributes_cb.Checked = True Then
  37.                         output &= ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Columns.ToString
  38.                     End If
  39.  
  40.                     If table_data_cb.Checked = True Then
  41.                         For u = 0 To ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Rows.Count
  42.                             For o = 0 To ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Columns.Count
  43.                                 output &= ds_tables_content.Tables(ds_tables.Tables("MSysObjects").ToString).Rows(o).Item(u)
  44.                             Next o
  45.                             output &= vbNewLine
  46.                         Next u
  47.                     End If
  48.  
  49.                 Next c
  50.             Next i
  51.  
  52.             con.Close()
  53.             text_report.Text = output
  54.  
  55.         End If
  56.     End Sub

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@


Remember my settings