Hello Bobert,
Not sure whether it may be the cause but :
Instance == Your Google API Project ID:InstanceName
HomeCome == Your DB created within the instance.
For example in my case the code snippet is something like:
Connection connection = null;
try {
DriverManager.registerDriver(new AppEngineDriver());
connection = DriverManager.getConnection("jdbc:google:rdbms://<Project
ID>:<Instance Name>/<DB");
ResultSet resultSet = connection.createStatement().executeQuery("Select
guestName, content, entryID from entries");
...
}
Best Regards
Narinder
On Sun, Jan 22, 2012 at 12:13 AM, Bobert <[email protected]> wrote:
> Hello,
>
> I've tried this example
> https://developers.google.com/cloud-sql/docs/developers_guide_javamodified
> with following changed code:
>
> public String getEmployee() throws SQLException {
> String name = "";
>
> Connection c = null;
> c =
> DriverManager.getConnection("jdbc:google:rdbms://<Instance>/homecome");
> //c =
> DriverManager.getConnection("jdbc:google:rdbms://<Instance>/homecome",
> "<username>@googlemail.com", "<pass>");
> ResultSet rs = c.createStatement().executeQuery("Select name FROM
> friendgroup");
>
> while (rs.next()){
> name += " " + rs.getString("name");
> }
>
> c.close();
>
> return name + " - ok";
> }
>
>
> But unfortunately I get following error. For <Instance>, <username> and
> <pass> I use the Right names. The database name is homecome.
>
> java.sql.SQLException: Access denied for user
> '<username>@googlemail.com'@'localhost'
> (using password: YES)
>
> What am I doing wrong, can someone help me?
>
> Thanks Bobert
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/fXfwMGYKBF0J.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.