I have tried to provide an easy procedure showing simple code.

Requirement

We have to needed one separately Gmail account for your Google Drive.





Now create a new project.



  1. Imports System.Data
  2. Imports System.Data.OleDb
  3. Public Class Form1
  4. Public ConnString As String
  5. Public conn As New OleDbConnection
  6. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  7. Dim userPath As String
  8. userPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
  9. Label1.Text = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + userPath + "\Google Drive\useradmin.accdb;Persist Security Info=False"
  10. ConnString = Label1.Text
  11. End Sub
  12. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  13. Try
  14. conn.ConnectionString = ConnString
  15. If conn.State = ConnectionState.Closed Then
  16. conn.Open()
  17. End If
  18. Dim sql As String = ("select * from tbl_regis")
  19. Dim dataadapter As New OleDbDataAdapter(sql, conn)
  20. Dim ds As New DataSet()
  21. Dim dt As New DataTable()
  22. dataadapter.Fill(ds)
  23. dt = ds.Tables(0)
  24. DataGridView1.DataSource = dt
  25. Catch ex As Exception
  26. MessageBox.Show(ex.Message)
  27. End Try
  28. conn.Close()
  29. End Sub
  30. End Class



Now you can share your database in your group and others.

Thanks.