Can JSP connect to Microsoft SQL server?

Hi, i'm having problem of looking for a tutorial or any information about how to link jsp to microsoft sql server. I hope that i can get some information on can i do this and how to do it. If possible, please to give some guide on where i can find the tutorial or some example.
Thank you

Ideally if you are connecting to the database to pull data out for display, you should be using a servlet to do this. The servlet can be loaded via the JSP page to display the dynamic data.
You should really remove the Java from the JSP page as much as possible, by using a servlet to do the DB lookup etc you are achieving this quite effectively. The returned information an be in a HTML Table format that can be diplayed by the JSP page.
At the coreservlets site (http://archive.coreservlets.com/) chapter 18 has a few good examples withrespect to connection to a database and even provides a connection pooling discussion with examples. The book is pretty good for beginners looking to get a leg up in servlet/JSP development.
Here is a Servlet course that has DB connection included
http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/contents.html
Here is a JSP course
http://developer.java.sun.com/developer/onlineTraining/JSPIntro/contents.html

Similar Messages

  • Failure - Cannot connect to Microsoft SQL Server on localhost

    Hi!
    I have a sqlserver installation on localhost and I want to connect with sqldeveloper.
    I fill connection name, username, password, hostname: localhost port: 1433
    and then click on retrieve database.
    I get the following error message: "Status: Failure - Cannot connect to Microsoft
    SQL Server on localhost"
    I don't know the reason. I can use another connection to another ms sql server
    and it's no problem, but can't connect to localhost.
    I have special signs in my computername, for example a "-". Is this the problem?
    How can I solve it?
    Thank you
    Andreas

    I am able to successfully connect to my local SQLEXPRESS instance using the following settings:
    Hostname: localhost
    Port: 1433/DBName;instance=SQLEXPRESS
    Even though I use this to connect, I cannot open a tcp connection to port 1433 via telnet. I believe this goes hand in hand with specifying the instance. As I understand it, there are two ways to specify the port, one is directly, the other is through a named instance (another port is used as a service to look up the correct port). SQL Server 2005 appears to prefer named instances instead of specific ports. When "instance" is specified, the port can actually be any number, the driver apparently ignores it.
    The Retrieve database (list) appears to be only for informational purposes. I have to specify the database in the Port field (DBName) regardless of what I have selected in this list.
    Hope this helps!
    PS: Retrieve database will give that error until instance is specified in my case.
    Edited by: flszen on Feb 4, 2009 1:29 PM

  • JDBC connection to Microsoft SQL Server

    How connect to MS SQL 2000 using JDBC from Oracle(java stored procedure) ?
    I can connect to Oracle jdbc:
    create or replace and compile java source named Hello as
    import oracle.jdbc.driver.OracleDriver;
    (C:\oracle\bise1\db\jdbc\lib\classes12.zip\oracle\jdbc\driver)
    But I don't know how to connect to
    Microsoft sql server?
    sorry answer in
    Re: Querying MS SQL Server from PL/SQL with JDBC
    1)download
    Microsoft SQL Server 2005 JDBC Driver 1.2
    2)C:\oracle9i\bin>loadjava -user scott/tiger sqljdbc.jar
    import com.microsoft.sqlserver.jdbc.SQLServerDriver;

    Hello,
    SQL Server Express will go to sleep if idle, this behavior is not configurable.
    When SQL Express transitions from idle to active some of the memory that was released needs to be reclaimed; this results is a slight lag during "startup time" when you're first connecting to SQL Express.
    The other sort of sleep occurs when a database with AUTO_CLOSE unloading itself after a period of inactivity. This can be resolved by setting AUTO_CLOSE to false.
    You can refer to the following blog about more details about this:
    http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx
    You can try to upgrade the SQL Server Express to a non-free version to get rid of this.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Connect to Microsoft SQL server 2012

    HI,
    Currently My OSB connects to MS SQL server to get some data and then construct the request to submit to another web service. But recently the SQL server that I connect to has upgraded(previously was MS SQL 2005) to MS SQL to 2012. There are certain properties that needs to be changed in the connection property(for example : ApplicationIntent=ReadOnly) and I am not sure where to change this connection property. I am using sqljdbc4.jar for connectivity. Please advice. This is a bit urgent and appreciate if someone can help me out ASAP.
    After the upgrade I am not able to connect to the SQL server DB as well. This is the error
    Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/SGH/LabResults/SCMLabService [ SCMLabService_ptt::SCMLabService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SCMLabService' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    ; nested exception is:
    BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server.  This exception is considered not retriable, likely due to a modelling mistake.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/SGH/LabResults/SCMLabService [ SCMLabService_ptt::SCMLabService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SCMLabService' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    ; nested exception is:
    BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server.  This exception is considered not retriable, likely due to a modelling mistake.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:155)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:571)
    at sun.reflect.GeneratedMethodAccessor1269.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy143.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:377)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_1033_WLStub.invoke(Unknown Source)
    at com.bea.alsb.console.test.TestServiceClient.invoke(TestServiceClient.java:174)
    at com.bea.alsb.console.test.actions.DefaultRequestAction.invoke(DefaultRequestAction.java:117)
    at com.bea.alsb.console.test.actions.DefaultRequestAction.execute(DefaultRequestAction.java:70)
    at com.bea.alsb.console.test.actions.ServiceRequestAction.execute(ServiceRequestAction.java:143)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:91)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
    at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.processActionPerform(SBConsoleRequestProcessor.java:91)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
    at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.process(SBConsoleRequestProcessor.java:191)
    at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
    at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
    at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)
    at com.bea.alsb.console.common.base.SBConsoleActionServlet.doGet(SBConsoleActionServlet.java:49)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:687)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
    at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.processAction(StrutsStubImpl.java:76)
    at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/SGH/LabResults/SCMLabService [ SCMLabService_ptt::SCMLabService(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SCMLabService' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    ; nested exception is:
    BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/myAPPConn].
    Internal Exception: javax.naming.NameNotFoundException: Unable to resolve 'jdbc.myAPPConn'. Resolved 'jdbc'; remaining name 'myAPPConn'.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server.  This exception is considered not retriable, likely due to a modelling mistake.
    Thanks in advance
    Sridhar

    Hi All,
    I really appreciate your valuable inputs. My hair about to fall because of this problem
    L
    Tom, thanks, I have gone through that article weeks ago, but no luck
    J
    The Summary:
    I have made a work around to resolve my problem. I have created a new virtual server on the second physical DELL server (with SQL Express 2012).
    The problem seems to be a network issue on the hyper-V virtual switch!!
    More details:
    As described previously, VS connects to SQL service within the same Hyper-V only, although all configuration are right. From any PC within my domain, I can connect to the SQL server on the first Hyper-V service using the ODBC or the connection string file
    (.UDL), BUT not through the “visual studio express 2012 web” !!!!!!!!!
    Now, I can connect from any PC (using visual studio express 2012 web) to any SQL server Express 2012 on the second Hyper-V .
    I have made 4 virtual service on the first hyperV and 4 on the second HyperV. All with the same result:
    VS on PC’s can connect normally to any SQL server on the second HyperV
    VS on PC’s can NOT connect to any SQL server on the first HyperV
    VS on virtual servers on first HyperV can connect normally to any SQL server on the same physical machine/Same hyperV .
    VS on virtual servers on first HyperV can connect normally to any SQL server on the second physical machine/Second hyperV .
    VS on virtual servers on the second HyperV can connect to any SQL server on PC’s or on the second HyperV/Same physical machine.
    VS on virtual servers on the second HyperV can NOT connect SQL servers on the first HyperV
    Long story that last more than one month
    L

  • Connect a Microsoft SQL Server Database with eclipse

    Hi all,
    I am having problem to connect a Microsoft SQL Server Database with eclipse. Is it possible to do it? And could someone explain me how, please? When I want to create a connection from the data source explorer, I have in the list of connection only derby and jdbc. Is anything else that I have to download?
    Thank you in advance for your help.

    Just choose generic JDBC and locate/specify the driver yourself. Exactly the same as you would use when you wrote JDBC code yourself.

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • Database Connectivity to Microsoft SQL Server

    Hi,
    Does anyone of you know how to make JDBC ODBC Connectivityto Microsoft SQL Server?
    Thank you.

    The easiest (and cheapest) way is to use the JDBC/ODBC bridge that ships with the JDK.
    To register the driver within your application you just load the class into memory like this:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    You now need to create an ODBC datasource for the database connection. Go into the control panel and ODBC control panel program to create a datasource (most people create a system DSN). Make a note of the name you give it (say MYDSN for example).
    Now, to get a connection you use the following line:
    Connection c=DriverManager.getConnection("jdbc:odbc:MYDSN",username,password);
    If you've set the username and password for the DSN in the control panel (as you can for SQL Server) then you can use just say:
    Connection c=DriverManager.getConnection("jdbc:odbc:MYDSN");

  • Connecting to Microsoft SQL Server from Linux

    Hi,
    I am currently trying to migrate an OBIEE deployment from Windows to Linux, I have found much information about connection to Oracle DBs but I cannot find out how to connect to a Microsoft SQL Server DB. I have my webcat and RPD transferred but see ODBC errors for all of the reports, can anyone help?
    Thanks in advance.

    I eventually solved this using UnixODBC and FreeTDS, I have yet to complete my own write-up of the solution but I found that someone else had solved the problem at more-or-less the same time and has written up the solution here:
    http://iadvise.blogspot.com/2008/02/connect-from-rhel5-to-mssqlserver.html
    If anyone finds this in the future and has questions please feel free to get in touch, I get email when this thread is updated so that should be enough. Thanks to Damon for putting me on the right track.

  • Connection with Microsoft SQL Server version 7/2000

    Hello,
    I am a VB expert, but new in Oracle forms by starting from 6i.
    I am trying to get connected from oracle forms to Microsoft SQL server to get some data as batch job.
    Is some body can help me connecting to MS SQL Server, please.

    Hi,
    Create the odbc data source of SQL Server database and then while connecting through the Forms in the connection string write UserName/Password and host string as odbc:<odbc_Name>.
    Hope this will work.
    Regards
    gaurav

  • Can't connect to remote SQL Server 2014 Standard with VS 2012

    Hi all,
    I am trying to create a development environment using SQL Server 2014 (not Express).  The SQL server instance is on a Windows 8.1 Pro machine in a non-domain environment.  I have Visual Studio 2012 installed on the same machine which can connect
    to the SQL server instance without problems.  I have another machine with VS 2012 that cannot connect.  SQL server is configured for mixed authentication.  The SSDT on the remote machine can see the SQL server networked instance, but will not
    connect with SQL authentication. 
    I have rounded up all the usual suspects;
    - The SQL server service is running
    - Remote connections are enabled on SQL server and the relevant firewall ports are open.
    - TCP/IP and named pipes are enabled
    - Remote connections are enabled in Management Studio
    - SQL Server Browser service in enabled and running
    What am I missing?  I have been out of developer mode for a few years and all of the tools have changed, but I seem to be missing something obvious.
    Many thanks in advance,
    Tim
    Tim in Dublin

    Hello,
    Have you configured the Windows Firewall on the Visual Studio computer too? Is there any other security software on those
    2 computers?
    Can you ping between both computers by computer name? If not, try connecting using the IP address. For example:
    10.0.0.10,1433
    1433 is the default SQL Server port number.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • I cannot connect to Microsoft SQL Server 2008

    I am getting a cannot load when I am trying to download SQL Server 2008.

    Hi,
    >>1)Can you look into the application log in the eventvwr for a detailed error message and post it here
    Where should I look into?
    Go to All programs-->Microsoft SQL Server-->configuration Tools-->Sql Server configuration manager-->SQL Server services in the left pane-->right click SQL Server -->
    start..you can also see properties where in you can see Log on as tab.
    In my machine i have only default instance..Based on the instances running in your machine you can see services running accordingly in here
    You already told your SQL Server service is not starting..now you have tried again to start the services and the error would have been logged in the eventvwr.
    Start-->cmd-->eventvwr-->Windows Logs-->application-->You can see the errors logged at the time when you tried to start SQL Server on why SQl Server was not able to start on the right side pane.
    Please go through that and post those error messages in here. Since you are using it after long time there might be chances you moved your master DB's mdf and ldf files to someother location. Without master DB coming up, your instance will not come up.
    Thanks
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • BC4J connect to Microsoft SQL*Server via Allaire Jrun JDBC

    This post is in answer to Matteo Tamburini's questions about
    connecting to SQL*Server using the allaire jdbc drivers.
    see Re: Version 10.1.0.3.03 of Oracle Data Provider for .NET
    These drivers are available for download from Macromedia at:
    http://www.macromedia.com/v1/Handlers/index.cfm?ID=22399&Method=Full
    They are shipped as one jar file: jrun_drivers.jar
    I installed it into <jdev_home>\lib
    To make a connection from designtime, follow (roughly)
    the steps in the HowTo walkthrough:
    Notice that the JDBC driver class is:
    allaire.jrun.jdbc.JRunDriver
    and the URL is something like:
    jdbc:jrun:sqlserver://machinenane:1433;Selectmethod=cursor
    There are two gotchas:
    1. the Selectmethod=cursor is important
    2. you will get an error saying that the class
    allaire/jrun/servlet/JRunSE
    can't be found.
    Indeed - that package is not to be found inside the .jar
    file; I suspect it is a rogue import in the source.
    The workaround is to ask the VM not to verify classes - do this
    by specifying -Xverify:none in the Java Options box of the
    "Runner" tab of project properties.
    I did successfully test a project deployed as a JSP inside OC4J:
    the caveats are that you have to enter the jar file location
    in j2ee\home\config\application.xml (as in Matteo's thread)
    and that the -Xverify:none switch needs to go on the CLIENT
    project, because it launches the embedded OC4J
    hope all this helps, Karl McHorton (BC4J Development)

    Well, you must have tested to make sure that the socket value is indeed the correct value. But with that error, and you are certain that the socket value is correct, then it becomes difficult.

  • How can you connect to MS SQL Server through Oracle 9i?

    i.e. we want to connect through a stored procedure and NOT a form. Our live DB is still in 9i.

    CKPT wrote:
    user12240205 wrote:
    i.e. we want to connect through a stored procedure and NOT a form. Our live DB is still in 9i.we want to connect through a stored procedure -- connect through stored procedire? i never heard. can you please post your views this information is not enough.CREATE PROCEDURE proc1 (p_sqlsever_credentials varchar2, p_status OUT boolean) IS
    BEGIN
    -- Connect to SQL Server using p_sqlsever_credentials
    -- Execute Stored Procedure (SP) in the SQL Server DB passing paras to it.
    -- If SP in SQL Server is successful then SP will COMMIT in SQL Server
    -- If failure it will be rolled back there.
    -- SP will return status
    -- Pass the status to the calling program
    END;
    /

  • Connect to Microsoft SQL Server

    How can I create new system in System Landscape for connection to SQL Server ? Thank you.

    Hi,
       Check these links..
    http://help.sap.com/saphelp_crm50/helpdata/en/42/11e43d19734b5ae10000000a11405a/frameset.htm
    Creating JDBC System in SAP EP For SQL Server 2005
        Consider reward points if helpful.
    Regards,
    Uday.

  • Can I connect Oracle with SQL-Server

    Hi,
    Is it possible to do Oracle hetrogeneous connectivity with Sql Server??
    Regards,
    Darshan

    Hi,
    I wanted to know whether Transparent Gateway for SQL Server is installed or not?
    In my $ORACLE_HOME I found following folders
    tg4ifmx, tg4ingr, tg4sybs, tg4tera.
    =========================
    If I want to install Gateway for SQL Server, From where do I install it???
    JAI HIND
    Darshan

Maybe you are looking for

  • Linked images in eps files

    I was playing with CS5 over the last several days and noticed somethng odd. - Place an image in a new Illustrator file. Your layers palette shows Layer 1 > Linked File. - Save a copy of that file as an eps. - Open the eps and look at the layers palet

  • Notes on I-pod, I-phone and I-pad disappeared.  Any way to get them back?

    The yellow "notes" application on all 3 of my mobile devices lost all of my entries except five.  I thought all Apple devices were safe from viruses etc. so I had important entries on there going back to 2010.  I also have the I-Cloud and its not on

  • Renaming files in iBooks

    I hope Apple will read this and add a feature to allow users the ability to rename files in iBooks!

  • Seach table like tmsbuffer where I can find all date of transaction order

         Hi I seach table where I can find all transaction order 'TRKORR' with all system 'SYSNAM' like this table and all date of creation of the order. The problem is I should use RFC connection for that and search this in table E070 and I don't want u

  • Safari 5.1 on Snow Leopard

    After an update to Safari 5.1 on Snow Leopard 10.6.8, I experience a lot of trouble with Safari. So far I've discovered this; 1. Links that should open a new window does not work. 2. Any new window whether it is from a link or cmd+n is hidden. You ha