Applet connecting to MS SQL Database (Remote DataSourse)

Hello,
I started by building my interface to a Database within an Application. I am not to the point where I am ready to make it an applet but want to get some tips when the time comes very soon.
First of all what security issues do I have to deal with to let the applet connect to the database?
Second I currently created a local Datasource via ODBC call JavaDB and linked it to my MS SQL Database.
QUESTION
How do I link to the with a remote Datasource so that the local machine does not have to worry about the datasource.
Lastly can I use the "sun.jdbc.odbc.JdbcOdbcDriver" in an applet. I sure hope so...
Then the part of my code that connected to the database was this:
private void initDB(){
String url = "jdbc:ODBC:JavaDB";
Connection con;
String query = "select * from COFFEES";
Statement stmt;
try {
//Class.forName("myDriver.ClassName");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
con = DriverManager.getConnection(url, DBADM, DBPWD);
stmt = con.createStatement();                                   
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
System.out.println("");
int numberOfColumns = rsmd.getColumnCount();
for (int i = 1; i <= numberOfColumns; i++) {
     if (i > 1) System.out.print(", ");
     String columnName = rsmd.getColumnName(i);
     System.out.print(columnName);
System.out.println("");
while (rs.next()) {
     for (int i = 1; i <= numberOfColumns; i++) {
     if (i > 1) System.out.print(", ");
     String columnValue = rs.getString(i);
     System.out.print(columnValue);
     System.out.println("");     
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.print("SQLException: ");
System.err.println(ex.getMessage());
Thanks,
Kenny

Kenny,
As no one has replied, I've managed to implement a database that uses applets.
Firstly, one needs to obtain a JSP server (apache tomcat is free and can be configured into a IIS 4 server).
Secondly, write all the DB connection stuff within a jsp page (ex.) "builders.jsp"
<%@ page import="java.sql.*" %>
<%!
protected String driver="sun.jdbc.odbc.JdbcOdbcDriver";
protected String url="jdbc:odbc:PhotoDBase";
protected String userid=null;
protected String passwd=null;
%>
<html><head><title>Builder Example</title></head><body>
<%!
public static String GET_BUILDER_QUERY =
"SELECT * FROM BuilderInfo WHERE BuilderID =?";
%>
<%
String bID = "24"; //normally this would use
//request.Parameter("bID");
//in order to pull up a specific
//record. In this test case it is
//hard coded to pull only builder #24
%>
<%
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, userid, passwd);
PreparedStatement stmt = conn.prepareStatement(GET_BUILDER_QUERY);
stmt.setString(1, bID);
ResultSet rs = stmt.executeQuery();
rs.next();
     String buildID = rs.getString("BuilderID");
     String bName = rs.getString("BuilderName");
     String bAddress = rs.getString("Address");
     String bCity = rs.getString("City");
     String bState = rs.getString("State");
     String bZip = rs.getString("Zip");
     String bCName = rs.getString("ContactName");
     String bCLast = rs.getString("ContactLast");
     String bPhone = rs.getString("Phone");
     String bFax = rs.getString("Fax");
     String bMobile = rs.getString("Pager/Cell");
rs.close();
stmt.close();
if (bName == null)
     bName = "No Builder";
if (bAddress == null)
     bAddress = "N/A";
if (bCity == null)
     bCity = "N/A";
if (bState == null)
     bState = "N/A";
if (bZip == null)
     bZip = "N/A";
if (bCName == null)
bCName = "N/A";
if (bCLast == null)
     bCLast = "N/A";
if (bPhone == null)
     bPhone = "N/A";
if (bFax == null)
bFax = "N/A";
if (bMobile == null)
bMobile = "N/A";
%>
<p>Builder: <%= bName%> BuilderID #: <%= buildID%>
<br>Contact: <%= bCName%> <%= bCLast%>
<br>Address: <%= bAddress%>
<br><%= bCity%>, <%= bState%> <%= bZip%>
<br>Phone: <%= bPhone%>
<br>Fax: <%= bFax%>
<br>Mobile: <%= bMobile%>
<p><applet code="Build.class" width="600" height="300">
<param name=buildID value=<%= buildID%>>
<param name=bName value="<%= bName%>">
<param name=bAddress value="<%= bAddress%>">
<param name=bCity value="<%= bCity%>">
<param name=bState value="<%= bState%>">
<param name=bZip value="<%= bZip%>">
<param name=bCName value="<%= bCName%>">
<param name=bCLast value="<%= bCLast%>">
<param name=bPhone value="<%= bPhone%>">
<param name=bFax value="<%= bFax%>">
<param name=bMobile value="<%= bMobile%>">
</applet>
</body>
</html>
The jsp gets the data from the DB based on the parameter bID which would be passed to it via a search or input page with various error checking included.
The applet then recieves its data via parameters. (Build.class has been shortened here to show you the meat and potatoes of the whole deal)
//<applet code="Build.class" width="600" height="300"></applet>
import java.awt.*;
import java.awt.Event;
import java.applet.Applet;
import java.io.*;
public class Build extends java.applet.Applet {
protected Panel search ;
protected TextField Nametxt ;
protected TextField Loctxt ;
protected TextField Citytxt ;
protected TextField Statetxt ;
protected TextField Ziptxt ;
protected TextField CNametxt ;
protected TextField CLasttxt ;
protected TextField Phonetxt ;
protected TextField Faxtxt ;
protected TextField Celltxt ;
public Build(){
super();
search = new Panel();
Nametxt = new TextField();
Loctxt = new TextField();
Citytxt = new TextField();
Statetxt = new TextField();
Ziptxt = new TextField();
CNametxt = new TextField();
CLasttxt = new TextField();
Phonetxt = new TextField();
Faxtxt = new TextField();
Celltxt = new TextField();}
public void init(){
     BorderLayout bl = new BorderLayout();
     setLayout(bl);
     add(search, "Center");
     setBackground(Color.white);
     String buildID = getParameter("buildID");
     String bName = getParameter("bName");
     String bAddress = getParameter("bAddress");
     String bCity = getParameter("bCity");
     String bState = getParameter("bState");
     String bZip = getParameter("bZip");
     String bCName = getParameter("bCName");
     String bCLast = getParameter("bCLast");
     String bPhone = getParameter("bPhone");
     String bFax = getParameter("bFax");
     String bMobile = getParameter("bMobile");
Nametxt.setText(bName);
Loctxt.setText(bAddress);
Citytxt.setText(bCity);
Statetxt.setText(bState);
Ziptxt.setText(bZip);
CNametxt.setText(bCName);
CLasttxt.setText(bCLast);
Phonetxt.setText(bPhone);
Faxtxt.setText(bFax);
Celltxt.setText(bMobile);
Hope this will aid you in yours and anyone elses endevours.
James <[email protected]>

Similar Messages

  • How to connect to Azure SQL database remotely (SharePoint 2013 BI)

    Hi,
    I am new to using Azure VM's and I am looking for advice. I have created and can connect to an Azure VM with a SQL Server 2012 installed on it (includes SSAS and SSRS). I connect to the VM using Microsoft Remote Desktop Connection.
    The problem I am having is connecting to the Azure database from a SharePoint BI site. Are there any good videos or websites that demonstrate how to setup an Azure VM so a user can access a database remotely.
    I hope you can help. 
    ATaylor

    Hello,
    To connect to the SQL Server Database from another computer, you must know the Domain Name System (DNS) name of the Azure virtual machine. For example: DNSName,portnumber such as SQLVM.cloudapp.net,57500.
    (Note: The port number is the public endpoint port which you can configure in the management portal for TCP communication with SQL Server on Azure VM.)
    As for datasource credentials, you can use a SQL Server authentication login: create a SQL Server login with password on the SQL Server instance.
    Reference:
    Complete Configuration steps to connect to the virtual machine Using SQL Server Management Studio on another computer
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • What's a better connection to an SQL database? ODBC or OLE DB

    NEw user here, but what would be a preferred way of connecting to my SQL database?  So far I have option of using ODBC (RDO) connection or OLE DB(ADO) connection. I'm not sure what the differences or when to use one or the other.
    Thanks

    I like OLE DB for the simply because it's "portable". With OLE DB the connection info is stored in the report. With ODBC, the report is using a system dsn connection. It means that if you want to send it to another user / computer, you also have to make sure the other computer has the same ODBC connection.
    In terms of performance... I've used both and have never seen a difference.
    Jason

  • Query regarding connecting dashboards with SQL DATABASE using WSDT

    Hello Sir,
    I am trying to connect dashboards with Sql database via WSDT, but i have encountered the same problem as described in your SAP community blog (SAP Web Service Design Tool: From web service creation to Xcelsius consumption).
    when i tried connecting CR server with WSDT ,it still shows that total number of available licenses is 0.
    What can be done to solve this issue.
    for your detail reference, we are using CRS NUL version's 60 days Evaluation keys and same with Xcelsius Departmental edition.
    I would really appreciate, if you revert back to my mail as soon as possible

    Which version of Crystal Reports are you using? The regular ReportDocument SDK probably isn't robust enough to handle this, unless you create a connection using that connection string at design-time which you don't change at runtime. You might be able to add those properties using the in-proc RAS SDK, though. This is available with CRXI R2 as of SP2, and CR2008.

  • Connecting to local SQL database

    I have tried everything to connect to a SQL database which is
    located on the same machine I'm using for development. Is there any
    special way of doing this. I tried to create a new connection in
    every way possible and I can't seem to be able to establish a
    connection. i would appreciate your input with this problem.
    Thank you,
    Marequi

    And posting your connection string would be helpful.
    Nancy Gill
    Adobe Community Expert
    BLOG:
    http://www.dmxwishes.com/blog.asp
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "David Alcala - Adobe" <[email protected]>
    wrote in message
    news:efe94f$cia$[email protected]..
    > Are you using MS SQL Server? If so, what version?
    >
    > What server model are you using (ASP, ColdFusion, PHP,
    etc.)?
    >
    > How have you filled out the DW database connection
    dialog box so far?
    >
    > What error(s) are you seeing? Is the error in DW or in
    the browser?
    >
    > --
    > David Alcala
    > Adobe Product Support
    >

  • Connecting to a SQL database on my website.

    Hello,
    I'm trying to create a login form that connects to a SQL database that's placed on my website. My problem is that I don't know how to connect to the database. Let's take these for an example:
    Server the database is on: 10.246.16.159:3306
    Database name: rhythmcheaters_
    Database section: phpbb_users
    Database password : 1A2b3C4d

    Following Example will May  help You..
    Try to design userinterface as like this..
    Double on Login button a new method will be generated write the following code under that method..
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Security.Cryptography;
    namespace windowsloginapp
        public partial class login : Form
            public string userName, Password;
            public int usercount;
            public login()
                InitializeComponent();
            private void button1_Click(object sender, EventArgs e)
                userName = textBox1.Text;
                Password = textBox2.Text;
                if (userName == "" && Password == "")
                    MessageBox.Show("Please Enter User Name and Password");
                else
                    string scn = ConfigurationManager.ConnectionStrings["Myconn"].ConnectionString.ToString();
                    SqlConnection cn = new SqlConnection(scn);
                     cn.Open();
                     SqlCommand cmd = new SqlCommand("SP_logapp", cn);
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.AddWithValue("@Username", userName);
                        cmd.Parameters.AddWithValue("@Password", Password);
                        int usercount =(Int32) cmd.ExecuteScalar();
                            if (usercount == 1)
                                this.Hide();
                                Welcome w1 = new Welcome(userName);
                                w1.Show();
                            else
                                //login lg = new login();
                                //lg.Show();
                                MessageBox.Show("Not a Valid UserName and Password");
                            cn.Close();
    APP.Config 
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <connectionStrings>
        <add name="Myconn" connectionString="Data Source=10.246.16.159:3306;Initial
    Catalog=rhythmcheaters_; user ID=phpbb_users;Password=1A2b3C4d;Integrated
    security=sspi" providerName="system.data.sqlclient" />
      </connectionStrings>
    </configuration>
    Create database with the same name of(rhythmcheaters_) and declare 2 variables as username and password....
    Insert some into that table...Do the same web application also..........It
    will work...
    Thanks & Regards RAJENDRAN M

  • Cannot Connect to Azure SQL Database in Visual Studio 2013

    Beyond Frustrated here.
    I am trying to connect to an Azure SQL database - it has been created, has tables etc. I am trying to create a new Data Connection from within Visual Studio 2013, latest release for VS and Azure. I continue to receive the following error:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
    I have ensured that TCP is allowed and above Named Pipes in the Configuration Manager. The associated IP address is allowed on Azure Firewall. Certificate has been added to VS etc. But still no connection. I can see the database in the Azure section in Server
    Explorer, but cannot add a Data Connection. What is equally as frustrating is I have a MacBook Pro running Win 7 sitting right next to my office computer and it can access Azure fine, not problems.
    If anyone has any other ideas on how I might be able to solve this I would love to hear them. Thanks in advance.
    Jeff

    Hi,
     The Error message "   A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is
    configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53) "
    The issue comes up mainly because the application is not able to connect to the server.
    To resolve this issue, try the following steps (in that order):
     Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
     2.  Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this, see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
    Try increasing the connection timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
          If these  steps do not resolve your problem, follow the below steps to collect more data and contact support:              
       If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing ID.
    Microsoft Customer Support Services can use this information.                   
       For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.                
      Check out
    the list of best practices for Connecting to Windows Azure SQL Database.
    Regards,
    Shirisha Paderu.

  • Question on InfoView  Multiple Connections opening on SQL Database

    Hi, we are using Business Objects XI Release 2 and I am having an ODBC issue to a SQL 2005 database.  I have a Crystal XI report that contains 2 parameters and selects roughly 100,000 rows of data and summarizes the data to 1 page.  In Crystal Developer it runs fine in several seconds.  Within Infoview it runs fine if I do a schedule now and select the parameters.  The Issue is if I click on the published report, update the parameters, it then starts to run and run.  Looking at the database it opens roughly 32 connections and just keeps opening and closing connections.  Since I am invoking infoview through a url it is running on the same server that I can schedule on.  I am not sure where or what the problem is, why so many connections open and the report never finishes.  Also the connections are bogging down the SQL Database due to high CPU utilization.  Any help/insight/explanations would be appreciated.
    Thank You

    Thanks for the response, see my responses in Italics,
    If you try to run the report with multiple connections are you facing this problem, or else is it for all reports.
    I am not trying to run for multiple connections intentionally?  Is there a setting in the report itself or on the console that could be doing this?
    Have tried to run the report other than the same machine where you have sever installed.
    I have run the report from 2 different viewers which reside on different machines, both separate from the
    database.  If I run from Crystal Developer on a desktop it is fine.  Also if I schedule in the viewer it is fine.  It seems like when I run on demand (not sure if my terminology is correct).
    Also try with remote connection to logon to your server and try to run the report and observe if there is any specific error. 
    I am executing a url that is on the server where Business Objects is installed.
    Regards,
    Naveen.
    I

  • Can No Longer Connect to Azure SQL Databases

    As of this morning, I am no longer to connect to any of my Azure SQL databases by any (apparent) means. I checked the configuration in the azure portal and my IP address is listed as an allowed IP, however:
    I am unable to connect via SQL Server Management Studio
    My request times out when attempting to visit https://{server_name}.database.windows.net
    What might have caused this?

    Hi ,
    Thanks for posting here.
    To resolve the issue you can try the following steps (in that order):
                    Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port
    (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
                    Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
                    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this,
    see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
                    Try increasing the connection
    timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
                    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
                  If the previous steps do not resolve your problem, follow these steps to collect more data and contact support:              
                      If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing
    ID.
    Microsoft Customer Support Services can use this information.                
                      For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.
    Please write back with the exact Error message/ Error Code if this doesn't help.
    Regards,
    Shirisha Paderu.

  • Consistently getting "The wait operation timed out" when connecting to Azure SQL Database from a virtual instance...

    I have a web app that is backed by a an Azure SQL Database. The problem is that I had multiple issues when connecting to the database mainly when trying to establish a connection, or timeouts. This is the log I just encountered when trying to use the web
    app.
    [Win32Exception (0x80004005): The wait operation timed out]
    [SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21970; handshake=1; ]
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +671
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1012
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6712291
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +152
    System.Data.SqlClient.SqlConnection.Open() +229
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +102

    Hi Affar2k,
    According to your description, we need to verify if there is no network issue and the Sqlclient version is older than .NET 4.5.  You can try to connect to the Windows Azure SQL database via SSMS and check if it can run well. When you
    connect to the SQL Azure database via ADO.NET, you need to verify that the server name and passwords are right in the connection string.
    For more information, you can review the following article about how to connect to Windows Azure SQL Database using ADO.NET.
    http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Connecting to Azure SQL database in Access 2010

    I've recently purchased a new computer and I had an OBDC connection set up to link to a sql database in azure through access. I am trying to set it up on my new computer but I'm unable to define the specific database. I'm able to make the connection but
    it only allows me into the master database. I've added my IP address in the configure servers but still can't get things to work. Any help would be greatly appreciated.
    thanks
    Lynn

    Hi,
    The following guidelines apply to SQL Database connections using ODBC:
    • When using SQL Server Native Client from SQL Server 2008 R2 or SQL Server 2008, the connection string must include the server name as part of the user name (user@server).
    • You must use TCP/IP as the protocol when connecting to an Azure SQL Database.
    • You cannot create a table in the master database, so therefore you must create a user database to create a table.
    • You cannot execute a use database command to switch to your user database. You must disconnect and connect directly to the user database.
    • You must have a primary key or clustered index on your table to be able to insert data.
    Ref:
    https://msdn.microsoft.com/en-us/library/azure/hh974312.aspx?f=255&MSPPError=-2147217396
    http://blogs.office.com/2010/06/07/access-2010-and-sql-azure/
    https://support.microsoft.com/en-us/kb/2028911/
    Hope this helps you.
    Girish Prajwal

  • Need help connecting a MS Sql Database in CF Administrator

    Good morning,
    I`m hoping someone out there can help me.
    I simply want to add a MS SQL datasource within Coldfusion Administrator.
    I have connected to it successfully with Sql Server Management Studio, using Windows Authentication.
    I`m assuming I need to use Windows Authentication to connect within Coldfusion Administrator
    How do I fill out these fields then:
    because I am getting this error:
    Connection verification failed for data source: test
    java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer  JDBC Driver]Error establishing socket. Unknown host: local
    The root cause was that:  java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC  Driver]Error establishing socket. Unknown host: local
    I have also tried it with localhost as opposed to local.
    Please help?
    Thanks;
    Rhonda

    I believe you DON'T.
    ColdFusion, by default, does not run as any type of user that would work with Windows Authentication.  It can be set up to do so, through the windows services panel.  You configure the ColdFusion service(s) to "Log On As" some windows domain account with the desired permissions.  This is normally done to allow CFML code to access network resources for file operations and the like.
    But, I don't know if that is good enough for a connection to a SQL server.  I've never had to deal with it myself (I have operations and database administrators types who deal with this for me).  But I have read many many times on forums like this that the default security configuration of SQL server does not work with ColdFusion.  That one has to set up an alternate configuration in SQL, TCP/IP I think?

  • How can I connect to an oracle database remotely using telnet in DIAdem?

    I need to query an oracle database on a remote server and store the result back in DIAdem. Does anyone know how to telnet through diadem and return the result?

    DIAdem provides you with tools to connect to databases using SQL. Specifically, you can use SQL_Connect to open a connection to a database through a DSN (Data Source Name). The DSN has to be configured on the local machine (Control Panel -> Administrative Tools - > Data Sources) and has to point to the remote Database. You can map a network drive in the local machine so you can browse to your remote Database. The DSN will provide the link between DIAdem and the remote Database.
    If your communication has to be throught telnet, then I suggest you try to use an ActiveX control. VBScript doesn't support Telnet natively, but it does support ActiveX controls. You can create one from Visual Basic or try to find a telnet client that has one already.
    Best Re
    gards,

  • Applet / SQL Database communication

    I am developing an applet that needs to connect to a SQL Database to keep track of a variety of information. I am running into some errors when I try to connect to the database.
    Can anyone tell me the best way for an applet to connect to a SQL database without editing the client's policy file to give permission?
    Any help with this matter would be much appreciated.
    Thanks.

    I am developing an applet that needs to connect to a
    SQL Database to keep track of a variety of
    information. I am running into some errors when I
    try to connect to the database.
    Can anyone tell me the best way for an applet to
    connect to a SQL database without editing the
    client's policy file to give permission?
    Any help with this matter would be much appreciated.
    Thanks.The best way to communicate to the database from an applet is through a servlet. But if you seriously want anybody to decompile your applet code and really fry your db its upto you. I wouldnot communicate directly from an applet to a db its not worthwhile

  • Can't connect to SQL Database using new login

    I can connect to Azure SQL Database using the admin ID created when I set up the Azure account.  Now I want to set up a different login that has only regular read/write privileges.  I have followed the instructions on several web posts, to create
    a login at the server level, then create a user at the database level from the login.  When I try to connect, though, the connection fails.  I get an error message, and a GUID that I am supposed to supply to MS tech support, except that all I have
    is a standard Azure subscription, which does not include tech support.
    Here is what I have done so far:
    Logging in to the server with the admin account with SQL Mgmt Studio, I go to the master database on my Azure server, and create the login:
    CREATE LOGIN clouduser@gxw8x04nlb with PASSWORD = 'xoxoxoxo';
    This appears to work (password supplied is a "strong" password), or at least it doesn't show any error response.
    Then, connecting to the production database in Azure, I set up a user and set permissions as follow:
    CREATE USER clouduser1 FROM LOGIN clouduser@gxw8x04nlb;
    EXEC sp_addrolemember 'db_datareader', 'clouduser1'
    EXEC sp_addrolemember 'db_datawriter', 'clouduser1'
    When I attempt to connect to Azure using the new login, however, I get an error message (from SQL Mgmt Studio as well as from MS Access).  I am using the SQL Server Native Client 10.0.
    The message is:
    Connection failed:
    SQLState '28000'
    SQL Server Error 18456
    [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'clouduser'.
    Connection failed:
    SQLState: '01000'
    SQL Server Error: 40608
    [Microsoft][SQL Server Native Client 10.0][SQL Server]This session has been assigned a tracing ID of
    '271851d5-8e94-497c-a332-d9d40682bb7a'.  Provide this tracing ID to customer support when you need assistance.
    Is there some missing step I need to do, to permit the login to see the database?  I have looked for such in the various discussions about connection problems, but have not been able to find such a thing.   Or extend more permissions to the new
    user? Or specify a default user ID for a given login ?  (as they do not have the same names, in the examples I have seen).  I tried making the user ID the same as the login (w/o the server name), but that didn't seem to help, either.
    I have done numerous web searches, and tried about every variation of login or user ID, password, etc. that I can think of, and all of them encounter the same error.  It's got to be something very simple - clearly Azure supports more than one login
    per database.  But's that's all I have at the moment.  That login connects just fine, but others won't, using the same PC, middleware, IP address, etc.
    Any help would be much appreciated -
    Thanks,
         Doug

    Olaf -
    I noticed that, but all of the examples I have seen have Users named slightly differently from the Logins.  I did try logging in with the Login name instead.  No good.  I tried making the Login and the User name the same (clouduser).  Also
    no good - same symptoms.
    I think the problem is that the initial creation of the Login needs to be done WITHOUT the server name on the end.  
    Logged in to the master DB, I tried:  Create LOGIN clouduser@gxw8x04nlb with PASSWORD = 'xoxoxoxo';
    That didn't give me an error message, but I think it created a LOGIN of 'clouduser@gxw8x04nlb'.  When
    referenced from the outside world, I would need to specify 'clouduser@gxw8x04nlb@gxw8x04nlb'.
    I tried deleting the logins, and then creating the login 'clouduser' in the Master DB.  Then in
    the application DB, I created User clouduser from LOGIN clouduser, and then assigned a role.  That seems to work!
    In my connection string, File DSN, etc. I still need to supply the login as 'clouduser@gxw8x04nlb'.
     But when I am logged in to the server, and working in the Master DB or the application DB, I just refer to the Login as 'clouduser'.  
    Seems a little more complicated than it really should be, but at least I now have something that works.
    Doug
    Doug Hudson

Maybe you are looking for

  • DB connection is doing a DNS lookup

    I have an application coded in Java which checks the oracle database if any new record is added. so the line of code for eastablishing the conection is : java.sql.Connection conn = � DriverManager.getConnection ( "jdbc:oracle:thin:@10.3.7.197:1521:DE

  • Anyone successfully used mirrormount on Solaris 10 5/08?

    Hi All, Sun claimed that Solaris 10 5/08 support mirrormounts on nfs4 client. However, I cannot make it work. I tried the same think on Redhat Linux 4 and it works fine. Can anybody tell me how to enable mirrormount support on Solaris 10? Thanks, cm

  • Partners not defaulting in UB doc type STO

    Hi Gurus, Can anybody please explain why the partners do not default in the partners tab of the PO with doc type UB when i enter the supplying plant. But the partners default in NB doc type when i enter the vendor. Why is this so? Thanks Anusha

  • AbstractTableModel.isCellEditable() vs. copy/paste operations

    Say I have a JTable with 2 columns (strings), the 1st with a default cell renderer, and the 2nd one with a renderer extended from JPasswordField. So far so good. But I don't want the 1st column to be editable. So I modify the model to return false fo

  • Error:   [Error ORABPEL-10903]: failed to read wsdl

    Can any one please explain this error, When ever I used to change the XSD file of the process I am getting this error. Dont know why?? Please suggest me Error: [Error ORABPEL-10903]: failed to read wsdl [Description]: in "bpel.xml", Global Type decla