Connection problem odbc socket

I made a odbc socket connection through a dsn to a foxpro
database (tables), cf made the connection. Dreamweaver sees all of
the tables, but cannot read the fields or data. Received this error
message:
[1]java.sql.SQLException: [Macromedia][SequeLink JDBC
Driver][ODBC Socket][Microsoft][ODBC Visual FoxPro Driver]File
'ccdllc.actrec' does not exist.
even tho actrec was a listed table in the database panel.
Any ideas?
David

Thanks for spending your time on this. I'm brand new on CF,
have always used asp for database work, thought this would be a
breeze. Clearly there's some simple thing I'm not doing correctly.
I made the connection to the database in CF with the ODBC socket
driver, then verified the connection. Went into Dreamweaver, set up
the database connection, and read the table list in the database
panel. But Dreamweaver wasn't able to read the contents of the
tables (columns and data), nor was it able to make bindings. I
inserted the query into the html page and tried running the code
with the following results:
-1:[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Visual FoxPro Driver]File 'ccdllc.actrec'
does not exist.
java.sql.SQLException: [Macromedia][SequeLink JDBC
Driver][ODBC Socket][Microsoft][ODBC Visual FoxPro Driver]File
'ccdllc.actrec' does not exist.
at
macromedia.sequelink.ssp.Diagnostic.toSQLException(Unknown Source)
at macromedia.sequelink.ssp.Chain.cnvDiagnostics(Unknown
Source)
at macromedia.sequelink.ssp.Chain.decodeDiagnostic(Unknown
Source)
at macromedia.sequelink.ssp.Chain.decodeBody(Unknown Source)
at macromedia.sequelink.ssp.Chain.decode(Unknown Source)
at macromedia.sequelink.ssp.Chain.send(Unknown Source)
at
macromedia.sequelink.ctxt.stmt.StatementContext.execDirect(Unknown
Source)
at
macromedia.jdbc.sequelink.SequeLinkImplStatement.execute(Unknown
Source)
at
macromedia.jdbc.slbase.BaseStatement.commonExecute(Unknown Source)
at
macromedia.jdbc.slbase.BaseStatement.executeQueryInternal(Unknown
Source)
at macromedia.jdbc.slbase.BaseStatement.executeQuery(Unknown
Source)
at
coldfusion.server.j2ee.sql.JRunStatement.executeQuery(JRunStatement.java:111)
at
coldfusion.rds.DbFuncsServlet$DbSqlStatementOperator.processCmd(DbFuncsServlet.java:409)
at
coldfusion.rds.DbFuncsServlet.processCmd(DbFuncsServlet.java:78)
at coldfusion.rds.RdsServlet.doPost(RdsServlet.java:57)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
coldfusion.rds.RdsFrontEndServlet.doPost(RdsFrontEndServlet.java:102)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Again, thanks for your help, looking forward to any ideas you
might have.
David

Similar Messages

  • Connection problem in sockets

    hi,
    i am developing a client application in j2me on mobile..which needs to connect remote java server running on port 5000.so i initially tried a NetworkDemo client in suns WTK2.5 to connect to my remote server.
    I am using gprs as berarer.In this socketconnection is used to establish connectio. But i am not getting any request on server...
    they have used code
    SocketConnection sc;
    sc = (SocketConnection)Connector.open("socket://59.95.17.115:5000");
    here i have provided my own ip address of server where java server is listning on port 5000.
    My Client is running on N-72 having gprs settings from Vodafone.
    So can we use this kind of socket to connect to remote server??
    Or only httpconnection is possible???
    please help me as this is My final year project..if this doesn't work.
    I have to switch to another way...

    Are you sure port 5000 is open on that IP? I'm guessing it's not (since i can't telnet to it)..
    Read the manual of your Buffalo WBMR-G54 Wireless ADSL2+ Router router and set it to open the port and let it forward the the computer where your server is running.

  • Data source connection problem

    Hi, im starting to get into Coldfusion and im trying to
    connect to a database but when i make the data source and submit it
    it times out.
    I tried going to the data sources main page and the database
    does showup but when i click the little verify button it tells me
    there'es been an error. it says:
    "Connection verification failed for data source: Teacloud
    java.sql.SQLException: [Macromedia][SequeLink JDBC
    Driver][SequeLink Server]The specified data source is not defined.
    The root cause was that: java.sql.SQLException:
    [Macromedia][SequeLink JDBC Driver][SequeLink Server]The specified
    data source is not defined."
    not sure what it means. Can anyone help?
    Thanks
    -kaco

    If you are trying to connect using ODBC Socket, this Tech
    Note should help:
    http://www.adobe.com/go/tn_18644
    Make sure you are using the correct driver and have all the
    required information correctly entered under Advanced
    Settings.

  • Odbc connectivity problem

    Hi all,
    when i am installing ECC 5.0 i got below error.
    "odbc connectivity problem, error executing sql command"
    what may be the reason.
    plz give me some solution.
    vinnu.

    Hi Vinay
    Check if your database is up and running.

  • Problem with socket connections through a proxy server.

    People,
    I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
    System.setProperty("socksProxyPort", port);
    System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
    s = new Socket(this.getHost(), port);It hangs.
    I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.

    Is the proxy on another machine? Try it's IP. If
    not, replace 'proxy' with 'localhost'.
    - SaishYes, it is another machine.
                byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
                s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
                s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung.

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

  • Unending connectivity problems -- and Desktop Help...

    I'm wasting so much time on connectivity problems that it's positively wearying. Prior to the installation of BT Infinity here in April, I had a low quality broadband service because of the length of the line from the exchange: if I could get a download speed of 1.2Mbps and an upload of a quarter of that, I was doing well. 
    BT advised that thanks to fibre optic, my Internet should run much faster. So we had Infinity installed. I'm registered with Speedtest.net so am able to see my performance record.
    The average download speed is now aroun d 6Mbps and the average upload, more than that at 7Mbps. How an upload speed can consistently be faster than a download escapes me.
    But I'm not familiar with the ways of Internet connectivity and try as a I might, can't get my head around it.
    This desktop computer runs Vista OS. Vista was **bleep** when it came out and is renowned for its botched handling of Internet connections. So I'm not blaming BT for the literally unending connectivity problems that are occurring now, with line drops, speeds slowing to a crawl, and no guarantee that any connection will last. But it would be good to actually use BT software to help fathom out what's going wrong here, and today's typical morning which looks like this:
    1) Boot up computer. Automatic connection to hub via Netgear USB wireless adapter. Hub is on ground floor of this 3-storey property but signal strength from hub  is excellent, as confirmed by inSSIDer monitoring, currently showing 54 with no other networks anywhere near that figure.
    2) Perhaps 5 minutes after connection established, it's then lost. 'Local Only' is displayed. This is, apparently, a known Vista problem. But Microsoft has issued a fix for it. I know this, because it took 100 hours of ploughin g the Net to find out that MS had finally admitted to one more Vista screw-up. I've used the Microsoft router "fix it" before and it didn't work ("failed to process") so uninstalled it and have DL'd it again now and run it. This time it says it has fixed everything.
    3) Computer is re-booted to make the fix effective. Computer connects to Internet. Speedtest.net check yet again confirms that upload speed is faster than download speed.
    4) Connection dies. So much for Microsoft Fix It.
    5) Windows diagnostics reports that it can re-set the IP profile (or something.) I click yes. The re-set goes through. Connectivity is restored. 10 minutes later, connectivity is lost. Just a red X in the tray. No connection of any kind, not even that daft 'Local Connection' only alert.
    6) Reboot. Yet again. BT Desktop Help was installed here and ran OK when we were using our Netgear DSG34 router. But since the change to the BT Hub, the BT program has never run at all. So-oo. . . It has been uninstalled. And then re-DL'd and re-installed. And though the installation  has been completed, clicking on 'launch' has failed to launch anything. But anyway. An hour ago, in one of the brief periods today when the Internet connection was holding up, I Revo-ed out the earlier install, DL'd BT desktop Help and re-installed it. . . and I'm still at the same stage as always, with a  Firefox browser page that's open and completely blank and has been for the past 30 minutes. The URL is:
    file:///C:/Program%20Files/BT%20Broadband%20Desktop%20Help/btbb/Start.html
     Repeated page re-loading gets nowhere. Malwarebytes PRO is turned OFF to prevent any possibility of blocking and the antivirus is termporaily SUSPENDED. This PC runs on Windows standard firewall but even turning that OFF doesn't get the page to load. Copying the address into Internet Explorer in case there's a Firefox problem merely results in Firefox being opened and the same blank page running there.
    7) After all that. . . Connection lost yet again and this time, Windows cannot connect at all. It reports that the "wireless network security key is not correct". I happen to know that it is, because this is maybe the 20th time it has reported this in the past 10 days and every time I have to key in the "correct" key all over again. . . at which point Windows still says it isn't correct and cannot repair.
    Turning off the computer completely, unplugging from the wall, holding in the power switch for a full minute to clear the circuits, traipsing up and dowen three flights of stairs to turn off the hub, then wait, then turn the power back onm again. . . Ah, wot fun times I'm having here with my particular versioin of Infinity (as in, an infinity of connectivcity problems.)
    Summary: I seem to be being simultaneously hit with one issue after another.
    I'm bewildered as to why ever since Infinity was installed here, my upload speed is generally faster than my download speed. I'm not happy with endless Internet connection failures though am thinking that Vista is playing a large part here with its "wrong security key" and unending 'Local Only / Limited Connection' failures. I do miss my Netgear router and the ability to access a fantastic help menu and re-boot directly from the desktop without having to keep going up and down three flights of sdtairs to do so (I haven't been able to find out how toe access the BT Hub remotely.)
    Above all though: I'm  really tired of repeatedly trying to run freshly downloaded and installed BT Desktop Help software but getting no further than a blank page because the program has stalled.
    If anyone has any advice / suggestions, other than to buy a carrier pigeon, that'd be much appreciated.
    Thanks.

    Thanks again to John and gg30340. Here's an update:
    1) BT Desktop Help removed completely from this computer. The uninstaller itself mopped up everything, which surprised me. But anyway.
    2) Bt Home Hub manager set up and working. Had to input serial number and create new password. All of this sounds fairly easy and would be if one had the device near the desk. But the idiots who built this property shoved the BT master socket inside the garage next to the door. Our two home computers are on the third floor. To ensure the wireless signal strength is OK, the Hub and Infinity module/device/whatever it's called are on a high shelf. It's a major job to even reach the darn things, never mind read the labels seeing as how the BT Infinity engineer was good enough to tidy up the cabling and make a very tight connection to the wall socket.
    3) I had hoped to be able to back up the Hub's settings, seeing as the software provides for Advanced Settings / System / Backup. But not on mine (Hub 3.0). All that System allows is choosing which internet clock to define the accurate time. Everything else in System is just a pattern of short lines as if trying to indicate that there's some text there but it's invisible.This is now my second encounter with BT software which, for whatever reason, isn't functioning as it should on this PC.
    4) Hub reset to factory fresh, according to BT guide.
    5) Reset appears to have achieved nothing apart from requiring the password to be popped in again. After reset, it wasn't even possible to connect to the hub manager. Internet connectivity was eventually established for all of 30 seconds and then, gone.
    6) Computer was shut down and then booted anew. Internet connectivity is still. . . dreadful. One minute everything's fine and then, literally,. the next minute a webpage won't load. Even opening the Hub Manager has taken three attempts, i.e., disconnecting from the Internet, re-connecting, failing, and trying twice more until success. Yet all the time these failures are occurring, the tray icon is showing a steady, unwavering green icon for Local and Internet access -- despite the fact, there manifestly isn't any.
    7) Speedtest. net tests are actually showing upload and download 'trajectories' going slower and slower and finally halting at some point on the arc, then after a period of up to 30 seconds, suddenly becoming animated again. Speed test results with broadband speed checker UK and Think Broadband's checker are so at variance with one another, and with Speedtest, net, that it seems all three are using different technologies in pursuit of the same thing. Either way, upload speeds continue to be much, much faster than download speeds, a state of affairs I certainly have never encountered before.
    8) Speedtest net tests taken in the past 10 minutes, with one test following on from its predecessor, begin at 8.24 down/8.88 up, followed by 5.24 down / 6.40 up, followed by a mind-numbingly lonnnnng 0.62 down / 8.70 up -- in other words, a continuous yo-yoin g of Internet connectivity to the pooint that it actually might as well not even be here (I've had to make five attempts just to get on to this forum. . .)
    9) BT Speedtest will necessitate disconnection of everything downstairs and all boxes being lugged up here. This is actually going to require uncoililng tied-off cabling and hanging off a stepladder to do so -- though I surely can't be the only person in Britain who doesn't have a nice, handy BT master socket in their study or lounge. That said though: until we switched to Infinity, we *never* experienced these kinds of horrendous connectivity problems and never had need to unplug the Netgear router downstairs and bring it upstairs to connect directly to tjhe desktop PC so BT's own test could be run.
    I'll just have to get to work dismantling stuff tomorrow. However, I have to say that after a factory re-set which has changed nothing at all, I'm beginning to think there's a problem with the BT line itself (hence why I'm happy to follow the advice here, though less than happy at the prospect of the messing about involved.)
    Thanks, you two, for your patient help, and also for clarifying the situation re the three signal paths being shown on inSSIDer. At least I know that's usual now! And now, hopefully, when I press 'Post', I won't be faced with an endlessly spinning Firefox circle culminating in  what may well be, or seem to be, the 57,938th time today of seeing "Page Not Found". . .

  • Problem with socket communications

    I am trying to put together a client server socket communication pair.
    I have one application that runs in the background acting as a server and another that can be started and stopped that acts as a client.
    I can start the server and create a server socket with no problem.
    I can start the client and it connects to the server.
    The server acknowledges the connection and appears to go into a blocking state waiting for the client to send another message.
    The server blocks at the line
    parent.logit("Waiting for message from EVR..... ");
    The problem is that when the client sends another message, the server doesn't hear it.
    I am not sure if the problem is with the client or server communication code.
    If anyone out there is a socket communication guru, I would appreciate it if you could tell me what I am doing wrong.
    Thanks
    Server code:
    import java.io.*;
    import java.net.*;
    public class EVRServer
        extends Thread
      EVRDataLoader parent = null;
      ServerSocket serverSock = null;
      Socket clientSock = null;
      BufferedReader reader = null;
      BufferedWriter writer = null;
      int evrPort = 0;
      int retryLimit = 10;
      int retryCount = 0;
      boolean alive = false;
      boolean killSocket = false;
      boolean evrConnected = false;
      boolean retry = true;
      EVRListener evrListener = null;
    //=============================================================================
    // Full constructor
    //=============================================================================
       * Full constructor.
       * @param dl DataLoader - Parent application
       * @param port int Socket port
      public EVRServer(EVRDataLoader dl, int port)
        parent = dl;
        evrPort = port;
    //=============================================================================
    //  Run method - Main thread executed by start() method
    //=============================================================================
       * Main thread executed by start() method
      public void run()
        while (retry)
          if (retryCount > retryLimit)
            retry = false;
          parent.logit("Retry count = " + retryCount);
          // Create new server socket connection
          if (serverSock == null)
            try
              serverSock = new ServerSocket(evrPort);
              parent.logit("Created Server Socket for EVR on port " + evrPort);
              alive = true;
              killSocket = false;
              evrConnected = false;
            catch (Exception e)
              parent.logit(
                  "ERROR - Could not create Server socket connection for EVR: " +
                  e.toString());
              killSocket = true;
              alive = false;
          // Create new client socket connection
          if (clientSock == null)
            try
              parent.logit("Waiting for EVR to connect");
              clientSock = null;
              clientSock = serverSock.accept();
              retryCount = 0;
              evrConnected = true;
              killSocket = false;
              parent.logit("EVR connected on server Socket Port " + evrPort);
            catch (Exception e)
              parent.logit("ERROR - Error accepting EVR connection: " + e.toString());
              killSocket = true;
            try
              reader = new BufferedReader(new InputStreamReader(
                  clientSock.getInputStream()));
              writer = new BufferedWriter(new OutputStreamWriter(
                  clientSock.getOutputStream()));
              parent.logit( "Created reader "+reader);
              parent.logit( "Created writer "+writer);
            catch (Exception e)
              parent.logit(
                  "ERROR - creating reader or writer to EVR: " + e.toString());
              killSocket = true;
          int nullCount = 0;
          while (killSocket == false)
            try
              parent.logit("Waiting for message from EVR..... ");
    //          sendMessage("Data Controller connected on port " + evrPort);
              String s = reader.readLine();
              parent.logit("EVR - Received message: " + s);
              if (s != null)
                parent.processEvrMessage( s);
              else
                sleep(1000);
                nullCount++;
                if (nullCount > 10)
                  parent.logit("Exceeded retry limit: ");
                  killSocket = true;
            catch (Exception ex)
              parent.logit("Error Reading from EVR: " + ex.toString());
              killSocket = true;
          parent.logit( "After while loop");
          evrConnected = false;
          try
            retryCount++;
            parent.logit("Closing EVR connection. ");
            reader.close();
            writer.close();
            clientSock.close();
            writer = null;
            reader = null;
            clientSock = null;
            try
              sleep(1000);
            catch (Exception ee)
              parent.logit("Error after sleep " + ee.toString());
          catch (Exception e)
            parent.logit("Error closing EVR server socket");
    //=============================================================================
    // Call this method to kill the client socket connection.
    //=============================================================================
       * Call this method to kill the client socket connection.
      public void killConnection()
        killSocket = true;
    //=============================================================================
    // Return RTM connected state
    //=============================================================================
       * Return RTM connected state
       * @return boolean - Returns true if RTM is connected to server, false if not.
      public boolean isRtmConnected()
        return evrConnected;
    //=============================================================================
    // Returns state of server socket.
    //=============================================================================
       * Returns state of server socket.
       * @return boolean - Returns true if server socket is enabled, false if not.
      public boolean isServerSocketAlive()
        return alive;
    //=============================================================================
    // Send a message to the client socket.
    //=============================================================================
         * Send a message to the client socket.
         * @param msg String - Message to send.
         * @return boolean - Returns true if message sent OK, false if not.
      public boolean sendMessage(String msg)
        parent.logit(" In EVR Server - Send Message - got message: " + msg);
        if (evrConnected)
          try
            parent.logit("Sending message to EVR: " + msg);
            writer.write(msg + "\n");
            writer.flush();
            return true;
          catch (Exception e)
            parent.logit("ERROR - Error sending message to EVR: " + e.toString());
            return false;
        else
          parent.logit("EVR not connected, cannot send message: " + msg);
          return false;
    }Client code:
    package evrsimulator;
    import java.net.*;
    import java.io.*;
    class PortConnector
          extends Thread
       ServerSocket serverSock = null;
       boolean isIP = false;
       InetAddress addr = null;
       Frame1 parent = null;
       byte[] rawIP;
        //   String initialMsg = "";
       public PortConnector( Frame1 f )
         parent = f;
       // This method is called when the thread runs
       public void run()
          if ( parent.hostName.indexOf( "." ) > 0 )
             isIP = true;
             byte[] rawIP = parent.getRawIP( parent.hostName );
          try
             System.out.println( "Connecting to host " +
                                            parent.hostName + " on port " +
                                            parent.socketPort );
             if ( isIP )
                addr = InetAddress.getByAddress( rawIP );
             else
                addr = InetAddress.getByName( parent.hostName );
             System.out.println( "Inet address = " + addr );
             SocketAddress sockaddr =
                   new InetSocketAddress( addr, parent.socketPort );
             // Create an unbound socket
             parent.client = new Socket();
             // This method will block no more than timeoutMs.
             // If the timeout occurs, SocketTimeoutException is thrown.
             parent.client.connect( sockaddr, parent.socketTimeOut );
             parent.socketOut =
                   new BufferedWriter( new OutputStreamWriter(
                   parent.client.getOutputStream() ) );
             parent.socketIn = new BufferedReader( new InputStreamReader(
                   parent.client.getInputStream() ) );
             parent.localName = parent.localName +
                   parent.client;
             System.out.println( "Parent socketOut = "+parent.socketOut);
             System.out.println( "Parent socketIn = "+parent.socketIn);
          catch ( UnknownHostException uhe )
             System.out.println( "Unknown Host - " + uhe.getMessage() );
          catch ( SocketTimeoutException ste )
             System.out.println( "Socket time out - " + ste.getMessage());
          catch ( IOException ioe )
             System.out.println( "IO exception - " + ioe.getMessage() );
          // Listen on socket for message from host - thread should block.
          parent.portConnected = true;
          while ( parent.portConnected )
             try
                String msg = parent.socketIn.readLine();
                System.out.println( "Message from Host: " + msg );
                System.out.println( "Message from Host: |" + msg + "|" );
                if( msg.length() > 2)parent.processMessage( msg );
             catch ( IOException ioe )
                System.out.println( "Exception creating server socket." );
          try
             System.out.println(
                   "PortConnection - Closing socket and IO connections" );
             parent.socketIn.close();
             parent.socketOut.close();
             parent.client.close();
             parent.clockRunning = false;
             if( parent.heartBeating) heartBeat.interrupt();
          catch ( IOException ioex )
             System.out.println( "Exception closing socket." );
    }

    Your first problem is that you keep closing and recreating the ServerSocket. Do this once only in the lifetime of the server.
    This is such a basic error that I haven't read the rest of the code. Before you go any further I suggest you read the Custom Networking trail of the Java Tutorial.

  • Problem with socket in java and c++

    I am connecting to a server developed in java that use sys/socket.h, this server use DataInputStream
    class and readUTF so:
    in = new DataInputStream(socket.getInputStream());
    inputString = in.readUTF()
    My application in C++ it use winsock2.h and I utilize the method "send" in order to send the plots to the server
    java got hold of:
    #define MAXLONGITUD 10000
    char     bufEnviados[MAXLONGITUD + 1];
    bufEnviados[0] = (0xff & (longitud >> 8));
    bufEnviados[1] = (0xff & longitud);
    send(sock, bufEnviados,strlen(bufEnviados), 0 );
    I send the two first characters with UTF format so that the server in java could recognize them.
    The application operated correctly it until received an old plot of 6.236 characters later
    from which it close the connection with the socket and it fall my application!
    I have carried out several tests and I don't succeed in sending more than those 6.236 characters, however it achievement receibing whatever quantity of characters without problems!
    Could somebody help me to resolve this problem? I am attempting of everything and I don't achieve it!
    Ahead of time thank you!

    alfaximena wrote:
    #define MAXLONGITUD 10000
    char     bufEnviados[MAXLONGITUD + 1];
    bufEnviados[0] = (0xff & (longitud >> 8));
    bufEnviados[1] = (0xff & longitud);
    send(sock, bufEnviados,strlen(bufEnviados), 0 );
    Are you sending characters or binary data? You mention "plot" which sounds like binary data. You cannot send binary data via character encoding. Characters in java are not just bits, they are mapped values. If you encode it with something like base64 then that should be ok.
    I can only suppose that your testing was with data sets greater than 255, because strlen() would not have worked otherwise.
    Since you have the size then use it rather than using strlen().
    I send the two first characters with UTF format so that the server in java could recognize them.
    The application operated correctly it until received an old plot of 6.236 characters later
    from which it close the connection with the socket and it fall my application!
    There is nothing special about that particular number. So I would guess that the data in that set is the problem. Probably because you are in fact sending binary data. If, for example, a byte with a value of zero showed up in the sequence then strlen() would return an incorrect value compared to the size that you told java you are sending.

  • MS Visual Studio 2005 + Oracle 10g = Cannot connect to ODBC error: 12154

    Hi there!
    I've read so many threads of same kind of problems but always some key elements seems to be missing so I cannot solve my problem with the solutions in those threads. So, I'll do my own.
    Our environment is...
    We have Oracle 8 database with all the data that we have. Now we have our new server, SQL Server 2005 installed and I am trying to transfer data from Oracle to SQL using MS Visual Studio 2005 using available ODBC drivers. System is Windows 2003 64Bit on intel based hardware.
    Current installations and settings
    I have installed Oracle 10g 32bit and 64bit to separate foldes. Then I made tnsnames and sqlnet files with right settings to specified folders and tested connection with tnsping <servername> command.
    Both, 64bit and 32bit connections are working. (Used 32bit CMD for 32bit connection test)
    ODBC
    I added Microsoft ODBC for Oracle as 32bit driver and Oracle 10g driver for 64bit environment as ODBC driver.
    Both environments uses same ODBC names: Myserver and Mytestserver
    Debug
    First, when I only had 64bit version of ODBC, I had a warning which said that I am using incompatible version of ODBC driver. Then I read from here that I can install 32bit client also and use drivers from that on 32bit ODBC environment and get rid of that message.
    Tried to connect Oracle DB with SQL-Plus and it works.
    Visual studio 2005 SP2
    I have tried to use .Net Providers/Oracle Client dataprovider and .Net Providers for OleDB/Microsoft Old DB for Oracle and also .Net Providers for OldDB/Oracle provider for OldDB
    Frist two gives me an error: ORA-12154 TNS: Could not resolve the connect identifier specified
    Last one says that OraOldDB.oracle.1 is not registered on local machine
    I have absolutily no idea what I can try next?
    Anyone who has more ideas? Suggest anything. I might have tried that already, but give a shot anyway. :)
    Message was edited by:
    user640570

    Hi,
    From where you got Oracle 10g driver for 64bit environment as ODBC driver. I am searching for the same.
    Are you got solution. I am facing same problem.
    Thanks,
    Vijay
    Edited by: user3976154 on Sep 6, 2008 5:12 PM

  • Dg4odbc, unixODBC, freeTDS - connection problems to MS SQL 2008

    I am trying to set up a database link between my 64bit Oracle 11g running on CentOS 6.2 and my MS SQL 2008 server running on MS Windows server 2003. I have installed the following -
    freeTDS - version 0.91 (64 bit)
    unixODBC - version 2.3.1 (64 bit)
    I have successfully configured ODBC and freeTDS so that I can connect using isql and query my MSSQL database. The problem I am having is connecting Oracle to MSSQL, I am sure it is a simple configuration error but I have been going round in circles with this and hope someone can help!
    freetds.conf
    [global]
    timeout = 10
    connect timeout = 10
    text size = 64512
    [CERM]
    host = 192.168.xxx.xxx
    port = 1101
    tds version = 7.2
    instance = SSLSQLDB
    dump file = /tmp/dump.log
    odbc.ini
    [ODBC Data Sources]
    CERM=TDS connection
    [CERM]
    Servername = CERM
    Description = TDS connection
    Driver = /usr/local/lib/libtdsodbc.so
    UsageCount = 1
    FileUsage = 1
    [ODBC]
    Trace=255
    odbcinst.ini
    [TDS]
    Description = FreeTDS driver for MS SQL
    Driver = /usr/local/lib/libtdsodbc.so
    Setup = /usr/lib64/libtdsS.so
    Trace = Yes
    TraceFile = /tmp/freetd.log
    FileUsage = 1
    [FreeTDS]
    Description = FreeTDS driver for MS SQL
    Driver = /usr/local/lib/libtdsodbc.so
    Setup = /usr/lib64/libtdsS.so
    Trace = Yes
    TraceFile = /tmp/freetd.log
    FileUsage = 1
    (Because I have put the actual path to the driver in the odbc.ini file I don;t believe the odbcinst.ini file is actually used)
    inithscerm.ora
    # This is a sample agent init file containing the HS parameters that
    # are needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=CERM
    HS_FDS_TRACE_LEVEL=255
    #HS_FDS_TRACE_FILE_NAME = /tmp/hsodbcsql.trc
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    set ODBCINI=/usr/local/etc/odbc.ini
    (my odbc.ini file is located in /usr/local/etc)
    listener.ora
    # listener.ora Network Configuration File: /usr/oracle/product/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ssl-oracle.domain)(PORT = 1521))
    ADR_BASE_LISTENER = /usr/oracle
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=hscerm)
    (ORACLE_HOME=/usr/oracle/product)
    (PROGRAM=dg4odbc)
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:$ORACLE_HOME/lib)
    (SID_DESC=
    (SID_NAME=PROD)
    (ORACLE_HOME=/usr/oracle/product)
    tnsnames.ora
    # tnsnames.ora Network Configuration File: /usr/oracle/product/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    PROD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ssl-oracle.domain)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = PROD.DOMAIN)
    hscerm=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=ssl-oracle.domain)(PORT=1521))
    (CONNECT_DATA= (SID=hscerm))
    (HS=OK)
    right - I can tnsping my hscerm instance and that returns ok so I'm fairly sure the configuration is fine for both tnsnames.ora and listener.ora. I can isql connect to the ODBC defined name for the the MSSQL database. but when I create a database link in Oracle and then test it I get the following trace output :-
    [ODBC][14030][1339512618.356535][SQLSetConnectAttrW.c][332]
    Entry:
    Connection = 0x2054640
    Attribute = SQL_ATTR_AUTOCOMMIT
    Value = (nil)
    StrLen = -5
    [ODBC][14030][1339512618.356616][SQLSetConnectAttrW.c][616]
    Exit:[SQL_SUCCESS]
    [ODBC][14030][1339512618.356984][SQLDriverConnectW.c][290]
    Entry:
    Connection = 0x2054640
    Window Hdl = (nil)
    Str In = [DNCR;I=APDagj20][length = 30]
    Str Out = 0x2053408
    Str Out Max = 1024
    Str Out Ptr = 0x7fff6d305770
    Completion = 0
    [ODBC][14030][1339512618.357030][SQLDriverConnectW.c][500]Error: IM002
    [ODBC][14030][1339512618.357115][SQLGetDiagRecW.c][508]
    Entry:
    Connection = 0x2054640
    Rec Number = 1
    SQLState = 0x7fff6d3053d0
    Native = 0x7fff6d3051c4
    Message Text = 0x7fff6d3051d0
    Buffer Length = 510
    Text Len Ptr = 0x7fff6d305420
    [ODBC][14030][1339512618.357153][SQLGetDiagRecW.c][550]
    Exit:[SQL_SUCCESS]
    SQLState = IM002
    Native = 0x7fff6d3051c4 -> 0
    Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
    [ODBC][14030][1339512618.357197][SQLGetDiagRecW.c][508]
    Entry:
    Connection = 0x2054640
    Rec Number = 2
    SQLState = 0x7fff6d3053d0
    Native = 0x7fff6d3051c4
    Message Text = 0x7fff6d3051d0
    Buffer Length = 510
    Text Len Ptr = 0x7fff6d305420
    [ODBC][14030][1339512618.357228][SQLGetDiagRecW.c][550]
    Exit:[SQL_NO_DATA]
    [ODBC][14030][1339512618.357291][SQLDisconnect.c][208]
    Entry:
    Connection = 0x2054640
    [ODBC][14030][1339512618.357321][SQLDisconnect.c][237]Error: 08003
    [ODBC][14030][1339512618.357387][SQLFreeHandle.c][284]
    Entry:
    Handle Type = 2
    Input Handle = 0x2054640
    Now I can clearly see the error "Data source name not found, and no default driver specified" which according to all the documentation means that the entry HS_FDS_CONNECT_INFO=CERM does not match the entry in my odbc.ini file ([CERM]) but for the life of me I can;t see why they don;t match ??
    Any help greatly received.

    Yeah I verified with isql but I have changed the odbc.ini file as you suggested -
    [root@ssl-oracle ~]# more /usr/local/etc/odbc.ini
    [ODBC Data Sources]
    CERM=TDS connection
    [CERM]
    Server = 192.168.xxx.xxx
    Driver = /usr/local/lib/libtdsodbc.so
    Database = sqlb00
    Port = 1101
    TDS_Version = 8.0
    QuotedId = YES
    [ODBC]
    Trace=255
    [root@ssl-oracle admin]# more inithscerm.ora
    # This is a sample agent init file containing the HS parameters that
    # are needed for an ODBC Agent.
    # HS init parameters
    HS_FDS_CONNECT_INFO=CERM
    HS_FDS_TRACE_LEVEL=255
    #HS_FDS_TRACE_FILE_NAME = /tmp/hsodbcsql.trc
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    HS_LANGUAGE=american_america.we8mswin1252
    HS_NLS_NCHAR=UCS2
    set ODBCINI=/usr/local/etc/odbc.ini
    [root@ssl-oracle admin]# osql -S CERM -U sa -P supersecretpassword
    checking shared odbc libraries linked to isql for default directories...
    trying /tmp/sql ... no
    trying /tmp/sql ... no
    trying /usr/loc ... no
    trying /tmp/sql.log ... no
    trying /home ... no
    trying /.odbc.ini ... no
    trying /usr/local/etc ... OK
    checking odbc.ini files
    cannot read "/root/.odbc.ini"
    reading /usr/local/etc/odbc.ini
    [CERM] found in /usr/local/etc/odbc.ini
    found this section:
    [CERM]
    Server = 192.168.xxx.xxx
    Driver = /usr/local/lib/libtdsodbc.so
    Database = sqlb00
    Port = 1101
    TDS_Version = 8.0
    QuotedId = YES
    looking for driver for DSN [CERM] in /usr/local/etc/odbc.ini
    found driver line: " Driver = /usr/local/lib/libtdsodbc.so"
    driver "/usr/local/lib/libtdsodbc.so" found for [CERM] in odbc.ini
    found driver named "/usr/local/lib/libtdsodbc.so"
    /usr/local/lib/libtdsodbc.so is an executable file
    "Server" found, not using freetds.conf
    Server is "192.168.xxx.xxx"
    looking up hostname for ip address 192.168.xxx.xxx
    Configuration looks OK. Connection details:
    DSN: CERM
    odbc.ini: /usr/local/etc/odbc.ini
    Driver: /usr/local/lib/libtdsodbc.so
    Server hostname: ssl-database.domain
    Address: 192.168.xxx.xxx
    Attempting connection as sa ...
    + isql CERM sa supersecretpassword -v
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    SQL>
    sql.log
    [ODBC][31473][1339581606.488571][SQLSetConnectAttr.c][396]
    Entry:
    Connection = 0x26c2a30
    Attribute = SQL_ATTR_AUTOCOMMIT
    Value = (nil)
    StrLen = -5
    [ODBC][31473][1339581606.488638][SQLSetConnectAttr.c][681]
    Exit:[SQL_SUCCESS]
    [ODBC][31473][1339581606.488924][SQLDriverConnect.c][726]
    Entry:
    Connection = 0x26c2a30
    Window Hdl = (nil)
    Str In = [DSN=CERM;UID=SA;PWD=**********][length = 30]
    Str Out = 0x26c4b18
    Str Out Max = 1024
    Str Out Ptr = 0x7fff12846560
    Completion = 0
    UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
    DIAG [01000] [FreeTDS][SQL Server]Unknown host machine name.
    DIAG [08001] [FreeTDS][SQL Server]Unable to connect to data source
    [ODBC][31473][1339581606.491276][SQLDriverConnect.c][1353]
    Exit:[SQL_ERROR]
    [ODBC][31473][1339581606.491358][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 1
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491395][SQLGetDiagRec.c][717]
    Exit:[SQL_SUCCESS]
    SQLState = 08001
    Native = 0x7fff12845fb4 -> 0
    Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]
    [ODBC][31473][1339581606.491442][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 2
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491493][SQLGetDiagRec.c][717]
    Exit:[SQL_SUCCESS]
    SQLState = 01000
    Native = 0x7fff12845fb4 -> 20013
    Message Text = [[unixODBC][FreeTDS][SQL Server]Unknown host machine name.]
    [ODBC][31473][1339581606.491528][SQLGetDiagRec.c][680]
    Entry:
    Connection = 0x26c2a30
    Rec Number = 3
    SQLState = 0x7fff128461c0
    Native = 0x7fff12845fb4
    Message Text = 0x7fff12845fc0
    Buffer Length = 510
    Text Len Ptr = 0x7fff12846210
    [ODBC][31473][1339581606.491558][SQLGetDiagRec.c][717]
    Exit:[SQL_NO_DATA]
    [ODBC][31473][1339581606.491623][SQLDisconnect.c][208]
    Entry:
    Connection = 0x26c2a30
    [ODBC][31473][1339581606.491652][SQLDisconnect.c][237]Error: 08003
    [ODBC][31473][1339581606.491719][SQLFreeHandle.c][284]
    Entry:
    Handle Type = 2
    Input Handle = 0x26c2a30
    [ODBC][31473][1339581606.491750][SQLFreeHandle.c][333]
    Exit:[SQL_SUCCESS]
    [ODBC][31473][1339581606.493083][SQLFreeHandle.c][219]
    Entry:
    Handle Type = 1
    Input Handle = 0x26abfe0
    I can also ping both the hostname and ip address of the MSSQL server.

  • Content Server connection problems

    SAP Content Server connection problems
    I have installed the SAP Content Server on a Windows 2003 server. I connected to the Max DB on the remote server from Database Manager on my PC. I created repositories in R/3 in OAC0 and CSADMIN and saved documents to the Content Server. This all took a few hours from O/S install to saving a document in the repository, so I do understand the basics of the Content Server and Max DB.
    Unfortunately we are not going to use Windows; we will be running this on UNIX. Therefore I'm trying it out on a Linux system while I wait for the AIX system to be available. It's been a long road but I have finally gotten the install to finish 'successfully' however I can't connect from R/3.
    When I run the check http://10.XXX.YYY.ZZZ:1090/ContentServer/ContentServer.dll?serverInfo from the browser on the Linux host I get back a good status as shown below:
    serverType="SAP HTTP Content Server";serverVendorId="SAP AG";serverVersion="640";serverPatch="0";serverBuild="16";pVersion="0046";serverStatus="running";serverDate="2008-03-25";serverTime="22:39:45";startUpDate="2008-03-25";startUpTime="22:32:21";lastAccessDate="2008-03-25";lastAccessTime="22:38:33";
    However when I do this from any my PC it won't connect. (Of course the real problem is I can't connect from R/3.)
    If I try the same URL from a different user session on the same Content Server Linux host I get the same good status.
    I thought maybe the httpd.conf file was wrong so I tried:
    Listen 0.0.0.0:1090
    In cs.conf I tried commenting out AdminSecurity & AdminSecurityGroup.
    I also changed StorageDriver from SAPDBStorage to FSStorage.
    I don't know if this is related or just another problem to tackle once I can get through this one. I was not able to add the new system to the Database Manager. I get the error "-4 could not connect to socket [10060]".
    Thanks to all for any help. Points will dutifully be rewarded.
    David

    Hi Henk,
    It looks like I am dumber than a rock. The firewall was indeed active on the Linux host. I turned it off and can now do the http connection test to the Content Server. (I awarded very helpful points.)
    I still can't connect to the database with the Database Manager however the message has changed; it now says "-4 XSERVER might be inactive". I just turned off the firewall so I have a few things to try, like figure out how to start MaxDB without the DB Manager. I'll post my progress. Thanks Henk.
    David
    Edited by: Dave Hill on Mar 28, 2008 12:00 AM
    Now I have installed the Database Studion on my PC. No I'm getting this message when I try to connect to the host/database on the Linux system: "Cannot connect to host 10.XXX.XXX.XXX:7210 [Connection refused: connect], -813."
    Does MaxDB need to be started to connect? Any idea how to start it manually? Thanks,
    David
    Edited by: Dave Hill on Mar 28, 2008 1:06 AM
    Ah, at long last. There's this tiny yet very important little program called x_server that SAP didn't include in the SAP Content Server install guide. This needs to be running in order for anything to connect. I'm sure most of you know about it but for the rest you can find it in:
    /sapdb/programs/bin
    Then type
    ./x_server start
    I'm not sure what user it should run under but I started it as the sdb user.
    You could automate the database startup with a script. See http://maxdb.sap.com/doc/7_7/e9/005dac1592496783e26133eb7fad0b/frameset.htm
    Thank you Henk, I'll call this problem solved and award points.
    Edited by: Dave Hill on Mar 28, 2008 2:10 AM

  • Connecting on ODBC to an old installation of 7.1 running on DEC Unix 4.0f

    We are attempting to connect on ODBC to an existing installation of Oracle 7.1.6.2 running on DEC Unix 4.0f, and are facing a problem.
    The TCP/IP adaptor is installed (using CD of Oracle 7.2) and the listener service is running.
    We are unable to connect to the server from our client (client is a PC in windows).
    The error reported is ORA 12500
    Any input will be helpful
    Tx

    The newer technology stacks (e.g. .NET data access) requires higher versions of Oracle, which in turn is not compatible with that old server.
    The long gone Microsoft ODBC for Oracle driver, was built with Oracle7 in mind (but 7.3), but I can't remember ever seeing it with Sql*net v1. In any case you would need to get your hands on a 7.x Client for Windows, which may not be easy, and then you need to get it to install, which probably means you need an old version of Window.
    Even if some combination do exist, you will be far off from supported (or supportable) territory. Why can't you upgrade? Developing a new app for such an old environment seems ver far fetched. Are there no other options available to you?
    Message was edited by:
    orafad

  • MS SQL Server 2K JDBC Connection Problem

    Hi,
    I have installed Sql Server 2000 with mixed mode authentication. I am able to connect to connect through ODBC with both Windows and server authentication.
    The same when i try with JDBC, i am not able to connect. I have added the driver jars to the classpath also.
    Heres the Code :
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=pubs","sa","");
    if(con!=null) System.out.println("Connection Successful!");
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error Trace in getConnection() : " + e.getMessage());
    Here is the error :
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:115)
    at Connect.main(Connect.java:31)
    Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Kindly help.
    Thanks in Advance

    Thanks for the reply.
    I am not using any IDE, but the problem exists if i
    add the jar files into my classpath. I extracted the
    required files as suggested and tried, this time it
    works fine.
    If anyone could let me know why this problem is
    occuring it would be helpful.
    Thanks once againIt occured because MS didn't package their jar properly. You could try to re-jar the files or use a driver from another vendor.

  • Database connection problem when i try store the values in JTable

    Hi Sir,
    I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
    Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
    "Invalid Cursor State".I need to solve this problem.pls. do help me.
    I will provide u with the code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.sql.*;
    public class DataBaseVector extends JPanel
    //Container contentPane=getContentPane();
    JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
    Image i1;
    String url="jdbc:odbc:Ananth";
    Vector col=new Vector();
    Vector rows=new Vector();
    Vector rdata=new Vector();
    Connection conn;
    public DataBaseVector()
    //super("JTable With ScrollBars");
    this.setLayout(new BorderLayout());
    UIManager.put("ScrollBar.track",Color.red);
    UIManager.put("ScrollBar.thumb",Color.blue);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn=DriverManager.getConnection(url); // Is there any problem here?
    Statement st=conn.createStatement();
    ResultSet rs=st.executeQuery("Select * from AccountMaster");
    // rs is the result set obtained
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
    for(int i=1;i<=cols;i++)
    col.addElement(rsmd.getColumnName(i));
    rdata.addElement(rs.getString(i));
    rows.addElement(rdata);
    }catch(Exception e)
         System.out.println("The Error Message was:"+e.getMessage());
    JTable jt=new JTable(rows,col);
    int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
    int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    JScrollPane jsp=new JScrollPane(jt,v,h);
    this.add(jsp,BorderLayout.CENTER);
    this.add(jsb, BorderLayout.SOUTH);
    this.add(jsb1, BorderLayout.EAST);
    public static void main(String args[])
    JFrame jf=new JFrame();
    JPanel frame=new DataBaseVector();
    jf.getContentPane().add(frame);
    jf.setSize(800,600);
    jf.setVisible(true);
    Thanx,
    m.ananthu

    The problem is ResultSet.next() is not called.
    Try this and modify the table creation as you need.
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
         while(rs.next()) {
              for(int i=1;i<=cols;i++)
                        col.addElement(rsmd.getColumnName(i));
                        rdata.addElement(rs.getString(i));
              rows.addElement(rdata);
    Hope this helps

Maybe you are looking for

  • Print Preview and Export not working FROM ALV Report

    Hi I have this ALV report which is working fine. But when I try to do a print preview it doesn't show the columns which r sorted. The columns r there but the data starts from the one which is not sorted so the layout is all messed up. In the ALV repo

  • HT202724 When I send a message in a group with non-iPhone users it appears as a mms, how do I change the settings so it's a sms?

    When I send a message in a group with non-iPhone users it appears as "New Multimedia Message." One of my friends in the group also has an iPhone and his doesn't appear this way, how do I change my settings so it appears as a normal text message and n

  • Opening a PDF document from an exe file

    How can I open a PDF document from a executable file?? A friend has told me to use this: fscommand ("exec", "anexo01.bat") but it opens a black pop up window before opening the program..... and it don´t seems to be a good solution..... can someone he

  • How do I sort by artist, by album, by year

    In iTunes 10, I sorted everything by artist, by album, by year (release date). I can't do that in iTunes 11 or I can't figure out how to do it. Grrrrrrrr Why do they break things?

  • Select Query Between two dates...

    Hi Guru's, I need a Select Query between two dates, also if the record not found for any in between date then it should return NULL or 0 ... for Example 1. I am having two records in DB for date 2-10-2008 & 4-10-2008 2. Now suppose I have given Query