+ Reply to Thread
Results 1 to 3 of 3

VBA connection string to google Cloud SQL

  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    Canada eh
    MS-Off Ver
    2010
    Posts
    22

    Question VBA connection string to google Cloud SQL

    Hi guys,

    So I have a macro that pulls data from a mySQL table from a database on localhost server.

    I have another mySQL server which has been successfully connected to a cloud SQL instance in the Google Developers Console.

    I would like to take the existing macro I have and rather than pull data from the localhost table, I would like it to pull from a table on the Google server.

    The macro code is as follows:
    Please Login or Register  to view this content.
    It is not as simple as changing Server_Name = GoogleServer (as I've named it in mySQL) or the direct IP address
    If I do, I get an error on the cn.Open line saying cannot find server.

    For the localhost configuration, I had to check off [Microsoft Active X Data Objects 2.x library] in VBA Reference.
    If there a specific one I need to check off to connect to the Google server? ...something about JDBC?

    Any help would be appreciated!

  2. #2
    Registered User
    Join Date
    02-10-2015
    Location
    Canada eh
    MS-Off Ver
    2010
    Posts
    22

    Re: VBA connection string to google Cloud SQL

    So I realized that I did not configure my ODBC driver for the GoogleServer connection. Now that it's properly configured to the right server address, my code now errors out complaining about "unknown database" where before it was saying unknown server.

    I think it's syntax in the way I'm specifying the server or database

    I have it now as:
    Please Login or Register  to view this content.
    According to SQL Server connection strings - ConnectionStrings.com
    I think it's supposed to be "Connection to a SQL Server Instance"

    Please Login or Register  to view this content.
    Because on google developers console, my database is listed on a Cloud SQL instance.

    I have been unable to modify the connection string so that it accepts my instance "mix-845:test-db" (mix-845 is Authorized App Engine Application)
    Such as:
    Please Login or Register  to view this content.
    My info is as follows:
    Server: GoogleServer (xxx.xxx.xxx.xxx)
    Instance: mix-845:test-db
    Database: GoogleDB

  3. #3
    Registered User
    Join Date
    02-10-2015
    Location
    Canada eh
    MS-Off Ver
    2010
    Posts
    22

    Re: VBA connection string to google Cloud SQL

    Turns out it was a matter of case-sensitivity.

    My database in GoogleServer is actually googleDB, not GoogleDB.

    Once fixed, the code works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel External Connection Dropping Password from Connection String?
    By mar0isa in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-06-2015, 10:35 AM
  2. MS Query & Google Drive (Cloud Issue)
    By philcvo in forum Excel General
    Replies: 0
    Last Post: 03-16-2014, 07:04 PM
  3. Passing string to Google Custom Search Engine
    By Jack:) in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2013, 09:08 PM
  4. File Lost in Google Cloud
    By waqarqrl in forum Excel General
    Replies: 6
    Last Post: 08-29-2012, 02:52 PM
  5. JQuery Google Visualizations Intro / Tag (Word) Cloud Generator
    By VTHokie11 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-24-2012, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1