DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > NetBeans
Reload this Page SQL ,NetBean EXPERTs HELP !!!
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Default SQL ,NetBean EXPERTs HELP !!! - 01-13-2009, 05:56 PM

When I connect to MSSQL using Visual Studio [Language c#]...I use this connection string :
String JO = "Data Source=PEARL\\JAGA_2;Database=WOLF;user id=sa ;password='starlet';Pooling=False";


When I connect to MSSQL using NETBEANs i use this connection-String :
Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
"databaseName=BOOM;user=sa;password='starlet'; ";


Here is the question .
How can NetBeans know which SqlServer instance to access ?
[since I did not specify it in the connection string]
[infact I wrote Data source:=PEARL\\JAGA_2 ONLY in connectionString for Visual Studio...not for NetBeans]



Regards



P.S.
Can anydody translate the connectiion String at the TOP[the one I wrote for Visual Studio] into a valid connection string that I can use in NetBeans ?
Thanks
jo90way is online now Report Post
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
Send a message via AIM to davidsalter
Default 02-21-2009, 09:45 AM

You need to add an instanceName parameter.

e.g.

instanceName=JAGA_2

Full details at: Building the Connection URL
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com