<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Accessing SQL Server on NetBeans using JDBC, Part I: Create a connection</title>
	<atom:link href="http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/</link>
	<description>Just another IT weblog</description>
	<lastBuildDate>Fri, 12 Mar 2010 02:15:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: linglom</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-6068</link>
		<dc:creator>linglom</dc:creator>
		<pubDate>Tue, 23 Feb 2010 03:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-6068</guid>
		<description>Hi, Thiri
The JDBC driver on this tutorial supports both SQL Server 2000 and 2005. You don&#039;t need to change the driver. But I&#039;m not sure about struts framework, you should see its document.

&lt;hr /&gt; 

Hi, Sreenivas
I&#039;m not familiar with tomcat. Is there any error message while debugging?</description>
		<content:encoded><![CDATA[<p>Hi, Thiri<br />
The JDBC driver on this tutorial supports both SQL Server 2000 and 2005. You don&#8217;t need to change the driver. But I&#8217;m not sure about struts framework, you should see its document.</p>
<hr />
<p>Hi, Sreenivas<br />
I&#8217;m not familiar with tomcat. Is there any error message while debugging?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sreenivas</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-6048</link>
		<dc:creator>sreenivas</dc:creator>
		<pubDate>Fri, 19 Feb 2010 07:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-6048</guid>
		<description>hello sir,
         My test connections of odbc are successful. But in tomcat its not showing Please give me reply</description>
		<content:encoded><![CDATA[<p>hello sir,<br />
         My test connections of odbc are successful. But in tomcat its not showing Please give me reply</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiri</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-6039</link>
		<dc:creator>Thiri</dc:creator>
		<pubDate>Thu, 18 Feb 2010 07:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-6039</guid>
		<description>hi, sir
I want to change MS sql Server 2000 to 2005 in my project which was created by struts framework 1.2.9 and apache tomcat 5.0. How can i change sql driver 2000 to 2005.


With Best Regards,</description>
		<content:encoded><![CDATA[<p>hi, sir<br />
I want to change MS sql Server 2000 to 2005 in my project which was created by struts framework 1.2.9 and apache tomcat 5.0. How can i change sql driver 2000 to 2005.</p>
<p>With Best Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linglom</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4913</link>
		<dc:creator>linglom</dc:creator>
		<pubDate>Wed, 25 Nov 2009 08:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4913</guid>
		<description>Hi, NeoBones
Thanks for your sharing.</description>
		<content:encoded><![CDATA[<p>Hi, NeoBones<br />
Thanks for your sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NeoBones</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4905</link>
		<dc:creator>NeoBones</dc:creator>
		<pubDate>Sun, 22 Nov 2009 06:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4905</guid>
		<description>Otra Forma de Realizar la conexion de dos forma: JDBC y OBDC

import java.sql.*;
public class abrirConexion
{	
//Conectandose a SqlServer Usando JDBC y ODBC
public static void main(String[] args) 
{
	/**********************************
	 *                                *
	 * Usando una Conección tipo ODBC *
	 *                                *
	 **********************************/
   		 
//	//Se entiende que usamos el Protocolo ODBC, que usaremos una ves que allamos agregado
//	//en la Directiva de ODBC de Windows la conección correspondiendo a la base de datos.
// 	String url = &quot;jdbc:odbc:Ejemplo&quot;; 
//	String usuario = &quot;NeoBones&quot;; 
//	String password = &quot;&quot;; 
//	Statement stmt = null; 
//	//Carga del driver 
//	try { 
//	    Class.forName(&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;); 
//	} 
//	catch(java.lang.ClassNotFoundException ex) { 
//	    System.err.print(&quot;Problemas al cargar el driver&quot;); 
//	    System.err.println(ex.getMessage()); 
//	} 
//	try { 
//	    //Creando la conexion a la BD 
//	    Connection conexion = DriverManager.getConnection(url, usuario, password); 
//	    //Lanzando consultas 
//	    stmt = conexion.createStatement(); 
//	    ResultSet cursor = stmt.executeQuery(&quot;SELECT * FROM persona&quot;); 
//	} 
//	catch(SQLException exc) { 
//	System.err.println(exc.getMessage()); 
//	}
			/**********************************
	 *                                *
	 * Usando una Conección Tipo JDBC *
	 *                                *
	 **********************************/
			 
	 // La diferencia, es que cambiamos el Protocolo, en ves de ser ODBC es SqlServer. y agregamos
	 //el nombre del Servidor de nuestra maquina, en mi caso es asi.
	String url = &quot;jdbc:sqlserver://NEOBONES-NOTE\\SQLEXPRESS:1433;DatabaseName=Ejemplo;integratedSecurity=true;&quot;;
	//Si usaremos una conexion de tipo validacion llenar los compos y sacar el integratedSecurity del URL
	//String usuario = &quot;NeoBones&quot;; 
	//String password = &quot;&quot;;  
	Statement stmt = null;
	//Carga del driver 
	try { 
	    Class.forName(&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;); 
	} 
	catch(java.lang.ClassNotFoundException ex) { 
	    System.err.print(&quot;Problemas al cargar el driver &quot;); 
	    System.err.println(ex.getMessage()); 
	} 
	try { 
	    //Creando la conexion a la BD 
	    Connection conexion = DriverManager.getConnection(url); 
// Conexion con validacion: getConnection(url,usuario,password);
	    //Lanzando consultas 
	    stmt = conexion.createStatement(); 
	    ResultSet cursor = stmt.executeQuery(&quot;SELECT * FROM persona&quot;); 
	} 
	catch(SQLException exc) { 
	System.err.println(exc.getMessage()); 
	}
      }
}

+-------------------+
&#124;                   &#124;
&#124;  Aporte NeoBones  &#124;
&#124;                   &#124;
+-------------------+</description>
		<content:encoded><![CDATA[<p>Otra Forma de Realizar la conexion de dos forma: JDBC y OBDC</p>
<p>import java.sql.*;<br />
public class abrirConexion<br />
{<br />
//Conectandose a SqlServer Usando JDBC y ODBC<br />
public static void main(String[] args)<br />
{<br />
	/**********************************<br />
	 *                                *<br />
	 * Usando una Conección tipo ODBC *<br />
	 *                                *<br />
	 **********************************/</p>
<p>//	//Se entiende que usamos el Protocolo ODBC, que usaremos una ves que allamos agregado<br />
//	//en la Directiva de ODBC de Windows la conección correspondiendo a la base de datos.<br />
// 	String url = &#8220;jdbc:odbc:Ejemplo&#8221;;<br />
//	String usuario = &#8220;NeoBones&#8221;;<br />
//	String password = &#8220;&#8221;;<br />
//	Statement stmt = null;<br />
//	//Carga del driver<br />
//	try {<br />
//	    Class.forName(&#8220;sun.jdbc.odbc.JdbcOdbcDriver&#8221;);<br />
//	}<br />
//	catch(java.lang.ClassNotFoundException ex) {<br />
//	    System.err.print(&#8220;Problemas al cargar el driver&#8221;);<br />
//	    System.err.println(ex.getMessage());<br />
//	}<br />
//	try {<br />
//	    //Creando la conexion a la BD<br />
//	    Connection conexion = DriverManager.getConnection(url, usuario, password);<br />
//	    //Lanzando consultas<br />
//	    stmt = conexion.createStatement();<br />
//	    ResultSet cursor = stmt.executeQuery(&#8220;SELECT * FROM persona&#8221;);<br />
//	}<br />
//	catch(SQLException exc) {<br />
//	System.err.println(exc.getMessage());<br />
//	}<br />
			/**********************************<br />
	 *                                *<br />
	 * Usando una Conección Tipo JDBC *<br />
	 *                                *<br />
	 **********************************/</p>
<p>	 // La diferencia, es que cambiamos el Protocolo, en ves de ser ODBC es SqlServer. y agregamos<br />
	 //el nombre del Servidor de nuestra maquina, en mi caso es asi.<br />
	String url = &#8220;jdbc:sqlserver://NEOBONES-NOTE\\SQLEXPRESS:1433;DatabaseName=Ejemplo;integratedSecurity=true;&#8221;;<br />
	//Si usaremos una conexion de tipo validacion llenar los compos y sacar el integratedSecurity del URL<br />
	//String usuario = &#8220;NeoBones&#8221;;<br />
	//String password = &#8220;&#8221;;<br />
	Statement stmt = null;<br />
	//Carga del driver<br />
	try {<br />
	    Class.forName(&#8220;sun.jdbc.odbc.JdbcOdbcDriver&#8221;);<br />
	}<br />
	catch(java.lang.ClassNotFoundException ex) {<br />
	    System.err.print(&#8220;Problemas al cargar el driver &#8220;);<br />
	    System.err.println(ex.getMessage());<br />
	}<br />
	try {<br />
	    //Creando la conexion a la BD<br />
	    Connection conexion = DriverManager.getConnection(url);<br />
// Conexion con validacion: getConnection(url,usuario,password);<br />
	    //Lanzando consultas<br />
	    stmt = conexion.createStatement();<br />
	    ResultSet cursor = stmt.executeQuery(&#8220;SELECT * FROM persona&#8221;);<br />
	}<br />
	catch(SQLException exc) {<br />
	System.err.println(exc.getMessage());<br />
	}<br />
      }<br />
}</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
|                   |<br />
|  Aporte NeoBones  |<br />
|                   |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jthan_col</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4902</link>
		<dc:creator>jthan_col</dc:creator>
		<pubDate>Sat, 21 Nov 2009 16:44:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4902</guid>
		<description>Hello, I&#039;m try in with this code and was successful!!

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.microsoft.sqlserver.jdbc.SQLServerDriver;

public class ConnectorMDB{

    public static void main(String arg[]){
        try {
            Connection connection = null;
//            Class.forName(&quot;com.microsoft.jdbc.sqlserver.SQLServerDriver&quot;);
            Class.forName(&quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;);

//            String url = &quot;jdbc:microsoft:sqlserver://192.168.0.103:1433/&quot;;//;DatabaseName=GPL
            String url = &quot;jdbc:sqlserver://192.168.0.103:1433&quot;;//;DatabaseName=GPL

            connection = DriverManager.getConnection(url,&quot;userbd&quot;, &quot;userbd&quot;);

            System.out.println(&quot;Conexion establecida con el server&quot;);

            connection.close();


        } catch (SQLException ex) {
            Logger.getLogger(ConnectorMDB.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ConnectorMDB.class.getName()).log(Level.SEVERE, null, ex);
        }


    }

}</description>
		<content:encoded><![CDATA[<p>Hello, I&#8217;m try in with this code and was successful!!</p>
<p>import java.sql.Connection;<br />
import java.sql.DriverManager;<br />
import java.sql.SQLException;<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;<br />
import com.microsoft.sqlserver.jdbc.SQLServerDriver;</p>
<p>public class ConnectorMDB{</p>
<p>    public static void main(String arg[]){<br />
        try {<br />
            Connection connection = null;<br />
//            Class.forName(&#8220;com.microsoft.jdbc.sqlserver.SQLServerDriver&#8221;);<br />
            Class.forName(&#8220;com.microsoft.sqlserver.jdbc.SQLServerDriver&#8221;);</p>
<p>//            String url = &#8220;jdbc:microsoft:sqlserver://192.168.0.103:1433/&#8221;;//;DatabaseName=GPL<br />
            String url = &#8220;jdbc:sqlserver://192.168.0.103:1433&#8243;;//;DatabaseName=GPL</p>
<p>            connection = DriverManager.getConnection(url,&#8221;userbd&#8221;, &#8220;userbd&#8221;);</p>
<p>            System.out.println(&#8220;Conexion establecida con el server&#8221;);</p>
<p>            connection.close();</p>
<p>        } catch (SQLException ex) {<br />
            Logger.getLogger(ConnectorMDB.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (ClassNotFoundException ex) {<br />
            Logger.getLogger(ConnectorMDB.class.getName()).log(Level.SEVERE, null, ex);<br />
        }</p>
<p>    }</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4896</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Thu, 19 Nov 2009 10:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4896</guid>
		<description>Thanks a Lot....
Please keep it up for us...</description>
		<content:encoded><![CDATA[<p>Thanks a Lot&#8230;.<br />
Please keep it up for us&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linglom</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4748</link>
		<dc:creator>linglom</dc:creator>
		<pubDate>Thu, 15 Oct 2009 01:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4748</guid>
		<description>Hi, Sharry
Verify that SQL Server is running and accepting requests on port 1433. You can check if SQL Server is accepting requests on port 1433 by using telnet command, eg. telnet localhost 1433. If you see a blank screen, it means that you can connect to the SQL Server.  

If the problem still persists, can you show the connection string?</description>
		<content:encoded><![CDATA[<p>Hi, Sharry<br />
Verify that SQL Server is running and accepting requests on port 1433. You can check if SQL Server is accepting requests on port 1433 by using telnet command, eg. telnet localhost 1433. If you see a blank screen, it means that you can connect to the SQL Server.  </p>
<p>If the problem still persists, can you show the connection string?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sharry</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4745</link>
		<dc:creator>Sharry</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:06:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4745</guid>
		<description>My previous problem is solved but i get this Exception.

SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: &quot;Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.&quot;.

I tried all d soln ,i found on net.

Pls help.</description>
		<content:encoded><![CDATA[<p>My previous problem is solved but i get this Exception.</p>
<p>SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: &#8220;Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.&#8221;.</p>
<p>I tried all d soln ,i found on net.</p>
<p>Pls help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sharry</title>
		<link>http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/comment-page-3/#comment-4743</link>
		<dc:creator>Sharry</dc:creator>
		<pubDate>Tue, 13 Oct 2009 07:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/#comment-4743</guid>
		<description>I tried your code But it gives this error.
SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user &#039;sa&#039;. Reason: Not associated with a trusted SQL Server connection.

can u pls tell me wat shd b d name n password.

Authentication is Windows only.
and my windows user name is Sharry But thier is no password</description>
		<content:encoded><![CDATA[<p>I tried your code But it gives this error.<br />
SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user &#8217;sa&#8217;. Reason: Not associated with a trusted SQL Server connection.</p>
<p>can u pls tell me wat shd b d name n password.</p>
<p>Authentication is Windows only.<br />
and my windows user name is Sharry But thier is no password</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.304 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-12 09:16:31 -->
