Results 1 to 5 of 5
- 05-17-2012, 09:44 PM #1
Member
- Join Date
- May 2012
- Posts
- 10
- Rep Power
- 0
l connection to an sql server database
Hi,
to connect an sql server database called clients, i used this instruction
the String connection is that oneJava Code:ConnexionSQL = DriverManager.getConnection("jdbc:odbc:bdd_clients","","");all works very well , but now i would like to replace this String connection with a new one which seems like this"jdbc:odbc:bdd_clients","",""
I have tried but it does not work.
jdbc:sqlserver://localhost;databaseName=Clients;integratedSecurity= true;
information : the database is called Clients and is installed on my localhost.
Can you tell me how i can resolve this situation.
Thanks a lot for your help.
curious_programmer
- 05-17-2012, 10:05 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
Re: l connection to an sql server database
What happens when you replace "localhost" by "127.0.0.1"?
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 05-17-2012, 10:13 PM #3
Member
- Join Date
- Apr 2012
- Posts
- 38
- Rep Power
- 0
Re: l connection to an sql server database
what error message do you get when you try to connect?
- 05-18-2012, 09:40 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: l connection to an sql server database
This ^
Without the exception/error/whatever we have no idea what problem your are encountering.
It could be a simple ClassNotFoundException.Please do not ask for code as refusal often offends.
- 05-23-2012, 07:14 AM #5
Similar Threads
-
Database connection with derby on server
By idbirohit in forum New To JavaReplies: 0Last Post: 09-23-2011, 10:18 AM -
Database connection for server
By JavaDreams in forum New To JavaReplies: 5Last Post: 03-14-2011, 10:25 AM -
Issue with JDBC Connection to SQL Server 2005 database when default schema is changed
By NicoleVT2000 in forum New To JavaReplies: 0Last Post: 12-01-2009, 10:01 PM -
Database Connection
By CompleteBeginner in forum New To JavaReplies: 2Last Post: 05-24-2008, 02:30 PM -
Database connection
By oaklander in forum New To JavaReplies: 2Last Post: 11-12-2007, 11:11 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks