MySQL Forums
Forum List  »  Newbie

Re: how can i open sql database
Posted by: Aljaz Cink
Date: July 17, 2005 11:21PM

these are the lines i use to connect:
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection(
"jdbc:sqlserver://server_ip","usr","pwd");

database name is "applog"
i tried the query u gave me, but it won't work. where can i use statement "SELECT DATABASE()", this is not java language, it's sql. isn't it?i'm not sure....i'm a total newbie for sure :)

i also tried to open db in the line "....://server_ip","usr","pwd","dbname);
is that possible?

Options: ReplyQuote


Subject
Written By
Posted
July 14, 2005 05:51AM
Re: how can i open sql database
July 17, 2005 11:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.