mashlaha.blogg.se

Google drive api java
Google drive api java











google drive api java

Handle any errors that may have occurred.I have uploaded some test files to my google anycodings_java drive using their website and my gmail anycodings_java account The files are in "My anycodings_java Drive" and not shared drive. Iterate through the data in the result set and display it. String SQL = "SELECT Country, SUM(UnitPrice * Quantity) Total " Create and execute an SQL statement that returns some data. String connectionUrl = "jdbc:sqlserver://localhost:5000 databasename=GoogleDriveDSN user=test password=test" Ĭlass.forName(".SQLServerDriver") Ĭon = DriverManager.getConnection(connectionUrl) Create a variable for the connection string. C:\Program Files\Microsoft Jdbc Driver 6.0 for SQL Server\sqljdbc_6.0\enu\auth\圆4

google drive api java

Step-2:Assuming the Microsoft SQL Server Jdbc Driver is in below folder Step-1: Install ZappySys ODBC PowerPack and Configure Data Gateway Here is Java program's code in text format: When you run the code it will make the API call and read the data: "jdbc:sqlserver://localhost:5000 databasename=GoogleDriveDSN user=tdsuser password=test" You can use this information now to configure Connection with UseCustomApp=true.Īnd finally, fill in all the required parameters and set optional parameters if needed.: When prompted Select Application Type as Desktop App and click Create to receive your ClientID and Secret.Click CREATE CREDENTIALS (some where in topbar) and select OAuth Client ID option.Go to back to main screen of Google API Console.Now we need to enable Google Drive API.Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown).

google drive api java

  • From the Project Dropdown (usually found at the top bar) click Select Project.
  • To register an App, perform the following steps (Detailed steps found in the help link at the end): To make this work you will have to create an OAuth application.













    Google drive api java