Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2005, 08:40 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to connect to sql server using jsp

Hi guys i be happy if some one show me how i can connect to sql 2000 db using jsp page.Thanks

 
Old March 23rd, 2005, 08:25 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

package test;

import javax.servlet.jsp.tagext.*;

public class ConnectionTagInfo extends TagExtraInfo {
  public VariableInfo []getVariableInfo(TagData data)
  {
    VariableInfo []info = new VariableInfo[1];
    info[0] = new VariableInfo("conn", "java.sql.Connection",
                               true, VariableInfo.NESTED);

    return info;
  }
}
This maybe useful to start with,



Gokulan Ethiraj
 
Old March 23rd, 2005, 08:44 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by gokul_blr
 package test;

import javax.servlet.jsp.tagext.*;

public class ConnectionTagInfo extends TagExtraInfo {
public VariableInfo []getVariableInfo(TagData data)
{
    VariableInfo []info = new VariableInfo[1];
    info[0] = new VariableInfo("conn", "java.sql.Connection",
                             true, VariableInfo.NESTED);

    return info;
}
}
This maybe useful to start with,



Gokulan Ethiraj
Many thanks to u . But before i compile this package could u tell me how i can call this class from within jsp page.Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
connect sql-server with c# technorakesh C# 1 April 22nd, 2006 08:09 AM
Connect Jsp Page To Sql Server Database jayul_p3nt JSP Basics 1 January 22nd, 2006 10:17 AM
Cannot Connect to SQL Server JoshCBR28 BOOK: Beginning ASP 3.0 2 October 25th, 2005 10:27 AM
How to connect to SQL SERVER Wizard VB Databases Basics 1 February 5th, 2005 11:29 AM
[000] Unable to connect to server 'SERVER\SQL'; SQ ctanchan SQL Server 2000 1 August 15th, 2003 07:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.