Error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-00917: missing comma

hi
i dont no why this error is coming. error may b while storing chaacter array in database
program is
//TCPClient.java
import java.io.*;
import java.net.*;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.sql.*;
import javax.swing.*;
class Client
     protected DataInputStream in;
protected DataOutputStream out;
//Jframe frame;
public static final String DATE_FORMAT_NOW = "yyyy/MM/dd HH:mm:ss";
public static String now() {
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
return sdf.format(cal.getTime());
public static void main(String argv[]) throws Exception
String FromServer;
String ToServer;
int i=0;
// frame = new JFrame("Show Message Dialog");
Socket clientSocket = new Socket("localhost", 5000);
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
PrintWriter outToServer = new PrintWriter(
clientSocket.getOutputStream(),true);
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(
clientSocket.getInputStream()));
String d=(Client.now());
try{
String cmd = "reg query \"HKEY_LOCAL_MACHINE\\SOFTWARE\"";
     Process p = Runtime.getRuntime().exec(cmd);
Thread.sleep(200l); //terrible, the right way is p.waitFor
InputStream in = p.getInputStream();
byte[] bytes = new byte[16384];
StringBuffer buf = new StringBuffer();
while(true) {
int num = in.read(bytes);
if(num == -1) break;
buf.append(new String(bytes,0,num,"UTF-8"));
//output stored in a string
System.out.println(buf.toString());
String str=new String();
str=(buf.toString());
//formating output
String newtext=str.replaceAll("HKEY_LOCAL_MACHINE","");
String newtext1=newtext.replaceAll("SOFTWARE","*");
System.out.println(newtext1);
//getting local ip
InetAddress thisIp =InetAddress.getLocalHost();
String ip=(thisIp.getHostAddress());
System.out.println("IP:"+thisIp.getHostAddress());
// printing date and time
System.out.println(d);
// connection
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:cat","system","root");     
          PreparedStatement ps=conn.prepareStatement("select ip,dates,software from ipdet");
ResultSet r=ps.executeQuery();
char softlist[]=newtext1.toCharArray();
     for(i=0;i<softlist.length;i++)
if(softlist=='*')
System.out.println("\n");
     System.out.print(softlist[i]);
          Statement s=conn.createStatement();
          String ins="insert into ipdet(ip,dates,software) values(ip,d,softlist[i])";
          s.executeUpdate(ins);
// s.setString(1,ip);
          //s.setString(2,d);
               // s.setString(3,softlist[i]);
               // s.executeUpdate();
System.out.println("record inserted succcessfully") ;
          r.close();
          conn.close();
          clientSocket.close();
catch (Exception e)
System.err.println("Error: " + e.getMessage());

i don't think its your connection. You must be hitting the DB otherwise you would not be getting an ORA error returned wrapped in an SQLException. I think its your pseudo-SQL, it simply says that you are missing a comma in an update string. Realistically, it could be that it is being misled into looking for a comma, probably because you have put a ';' at the end of your update string...

Similar Messages

  • [Microsoft][ODBC driver for Oracle]Syntax error or access violation

    Hi,
    When I am trying to connect to Oracle 8.1.6 database using Microsoft ODBC driver for Oracle. The connection is established.
    But while creating CallableStatement, I am getting error "[Microsoft][ODBC driver for Oracle]Syntax error or access violation".
    What I need to do to resolve this problem.
    Raj

    Hi Satish
    It could be an issue with the driver.
    You can try with the OLEDB n Oracle native connection to test if the issue persists.
    Also you can refer to the [Troubleshooting Database Connectivity for Crystal Reports|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d05b3bb7-0f28-2c10-4ea3-84dbdc4e414e&overridelayout=true]
    Hope this helps!!
    Regards
    Sourashree

  • Database Connection Error 42000:[Microsoft][ODBC driver for oracle] Syntax

    Hi,
      This is Sathish, I am trying to create a report and retrieve data through stored procedure using ODBC Connection. When connecting to the Stored Procedure it is showing Database Connection Error 42000:[Microsoft][ODBC driver for oracle] Syntax error or access violation' Error.
    CRXI R2, Oracle 9i.
    What do i do to solve this issue.
    Regards,
    Sathish

    Hi Satish
    It could be an issue with the driver.
    You can try with the OLEDB n Oracle native connection to test if the issue persists.
    Also you can refer to the [Troubleshooting Database Connectivity for Crystal Reports|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d05b3bb7-0f28-2c10-4ea3-84dbdc4e414e&overridelayout=true]
    Hope this helps!!
    Regards
    Sourashree

  • App failed due to java.sql.SQLException: [Microsoft][ODBC driver for Oracl

    Hello I developed a small applicaion for insert data into database.but i am getting exception in the server like this.
    app failed due to java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-01401: inserted value too large for column
    And the code is given below..
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Jdbc1 extends HttpServlet
    public void service(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
    PrintWriter out=response.getWriter();
    String no=request.getParameter("no");
    String name=request.getParameter("name");
    String age=request.getParameter("age");
    try
    System.out.println("1");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("2");
    Connection con=DriverManager.getConnection("jdbc:odbc:rakesh","scott","tiger");
    System.out.println("3");
    Statement st=con.createStatement();
    System.out.println("4");
    st.executeUpdate("INSERT INTO ind VALUES('+no+','+name+','+age+')" );
    con.commit();
    con.close();
    catch(Exception e)
    System.out.println(" app failed due to "+e);
    }Please give solution for this....

    Hello sir..
    thanks for ur reply...
    for oracle 10g -----> we use XE as datasourse
    name..What?
    now i am using oracle 8i...Not so from the code you posted. Didn't I see "jdbc:odbc:..." in your first post?
    so what should i
    write...in the datasourse name...that means.......
    Connection
    con=DriverManager.getConnection("jdbc:oracle:thin:@loc
    alhost:1521:????????","scott","tiger");Do you really use the default username and password?
    What should i write in place of ?????????..The name of the database you wish to connect to, of course.
    Do you have your tnsnames.ora set up properly? Did you install this database?
    None of this has ANYTHING to do with the error you posted, of course. Fix that first and then worry about the thin driver. At least it appears that the code you posted managed to connect to the database.
    %

  • SQLException:java.sql.SQLException:[Microsoft][Odbc driver for Oracle]

    hi all..im tryin to connect to Oracle db from java application.. i can complile the code but when it comes to executing d cod im gettin d followin error.. pls help me out.. here is d error
    SQLException:java.sql.SQLException:[Microsoft][Odbc driver for Oracle][Oracle]

    henrymania wrote:
    This is d driver im loadin..
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    and this is URL im assiging....
    "jdbc:oracle:thin:@192.168.32.68:1521:test";
    Here test is my sid name....highly unlikely, as that's not an ODBC driver nor is it an ODBC DSN.

  • Result Sets with the Microsoft ODBC Driver for Oracle

    Howdy all.
    I have an Oracle database that I have migrated from MSSQL2K. My front end is mostly VB, and I have many (hundreds) DLL's that use ADO to access the database and execute stored procedures in the database. I cannot seem to get result sets from the Oracle procedures. I have tried passing a SYS_REFCURSOR as an IN OUT parameter, and I have tried returning a SYS_REFCURSOR in a function. The Microsoft ODBC Driver for Oracle does not seem to handle the ref cursors. If I use the Oracle ODBC driver, then ref cursors are handled sort of magically. Just like the result sets are in MSSQL with the SQL Server ODBC Driver.
    The question that I would like to pose to anybody willing to answer is this: Is there any way to use the Microsoft ODBC Driver for Oracle without changing the way I do the database access (using ADO connection/command/recordset objects)? I need the same DLL's to work on top of both MSSQL and Oracle.
    I know that what I want to do is possible using the Oracle ODBC driver, but this will take some major changes to some of my DB components. I am trying to stay away from this, but it looks like I am going to have to go that route - that is unless somebody wows me with a good answer to this post.
    wally

    As you are using Microsoft driver which works in XP and does not on Win 2003 you should post this on microsoft forum.

  • 64 bit Microsoft ODBC Driver for Oracle

    Hi,
    Does Microsoft provide a 64 bit ODBC Driver for Oracle and where we can get it?

    GQ wrote:
    Hello,
    I am trying to create ODBC connection to Oracle 9i Database on remote server. I am using Windows 2008 64-bit but it is not showing Microsoft ODBC Driver for Oracle. Could any one suggest what to do?\\
    ThanksInstall the Oracle client and use the Oracle driver. You're going to need it whether you use the MS driver or Oracles. ODBC drivers do not work apart from the client of the underlying database product.
    When you do the install, you will need to do a custom install and specifically select for the Windows components.

  • Java.sql.SQLException[Microsoft][ODBC Driver for Oracle][Oracle]

    I have just installed Oracle8i and i m trying to connect a project to d database using ODBC. I gave
    Driver class name as sun.jdbc.odbc.JdbcOdbcDriver
    Connection Info as jdbc:odbc:dbgen dbgen is my project name
    Database name as Oracle
    Username as scott
    Password as Tiger
    i am getting this exception
    java.sql.SQLException[Microsoft][ODBC Driver for Oracle][Oracle]
    can ne one help me out plz???

    hi
    dbgen is your project name? it should be the dsn name that has to be mentioned. Go to control panel->administrative tools>data sources and add the type of driver required.
    import java.sql.*;
    import oracle.jdbc.pool.*;
    public class TestThinDSApp {
      public static void main(String args[]) throws ClassNotFoundException,
          SQLException {
        // These settings are typically configured in JNDI
        // so they a implementation specific
        OracleDataSource ds = new OracleDataSource();
        ds.setDriverType("thin");
        ds.setServerName("dssw2k01");
        ds.setPortNumber(1521);
        ds.setDatabaseName("orcl"); // sid
        ds.setUser("scott");
        ds.setPassword("tiger");
        Connection conn = ds.getConnection();
        Statement stmt = conn.createStatement();
        ResultSet rset = stmt
            .executeQuery("select 'Hello Thin driver data source tester '||"
                + "initcap(USER)||'!' result from dual");
        if (rset.next())
          System.out.println(rset.getString(1));
        rset.close();
        stmt.close();
        conn.close();
    }Hope this helps to some extent..
    Edited by: S.Manikandan on Jun 21, 2008 10:07 AM

  • Re: 32 Bit ODBC Driver for Oracle 11g 11.2.0.1.0

    Hi,
    Were you able to resolve the problem with these troubleshooting measures ?
    Please let me know since i am facing similar issues like yours.
    I am using a Windows 7 64 bit and from QTP installed on this machine ,  i am trying to connect to Oracle database.
    Now initially i installed a 64 bit ODBC for Oracle . But when i did that and ran the Script below :
    Set objDatabase = CreateObject("ADODB.Connection")
    Set rs=createobject("adodb.recordset")
    objDatabase.open "DRIVER={Oracle in OraClient11g_home1} ; DATA SOURCE=Oracle; SERVER= xyz ; DATABASE=abc1; UID=abc ; PASSWORD= abc123;"       
    rs.Open "select * from tablename", objDatabase
    'result1 = objDatabase.Execute("select * from tablename")
    'msgbox result1
    Do while not rs.eof
    print rs.fields("columnname")
    rs.movenext
    Loop
    print rs.fields("columnname")
    it gives me an error
    “[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application”
    So i am assuming that i need to install the 32 bit ODBC drivers for Oracle as well in addition to the already installed 64 bit drivers ..
    Any thoughts on this ?

    64 bit apps need 64 bit Oracle client software.
    32 bit apps need 32 bit Oracle client software.
    You should be able to tell the bit-ness of the app by checking the Process tab in task manager to see if it has *32 next to it.
    You can install both 32 bit and 64 bit Oracle client software on the same box, but you need to do it into different homes, and different oracle_base should also be used.
    There isnt an Oracle client install bundle that installs both, you'll need to do each separately.
    Hope it helps,
    Greg

  • Where can I download the ODBC driver for Oracle 10g XE?

    where can I download the ODBC driver for Oracle 10g XE?
    I need the ODBC drivers for windows 7 x64, I installed Oracle Database 10g Express Edition, the use and connects with RazorSQL well, I just want to make a connection THROUGH ConnectionString language using the ODBC driver

    already checked these http://www.connectionstrings.com/oracle, I need Help Please.

  • ODBC driver for Oracle 8.1.5 in Unix

    Can anybody tell me , how will I make sure that ODBC driver for Oracle 8.1.5 installed in Unix ?.

    The Oracle ODBC driver is a Windows-only product. It won't install on a UNIX machine.
    Justin

  • Where can I find the ODBC driver for ORACLE XE

    Hi,
    Please help me in urgent. Where can I download the ODBC driver for Oracle XE?
    The OTN site I had visited but cannot find the suitable ODBC drive for Oracle XE, or (but, I am not sure) the ODBC 10g is suitable I had downloaded it but require Oracle Universal Installer to install.
    Message was edited by:
    user505611

    Have you checked the OTN site?
    http://www.oracle.com/technology/software/tech/windows/odbc/index.html
    Update: Drivers for 10g should work with XE. Can't say anything about the installation procedure, since I don't use/install ODBC.
    C.

  • ERROR reports.reportdefinition : com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

    I have developed Java web application which uses Crystal Report 2013 , java 1.6 , Windows 32 bit System, All the reports are loading fine in the Following environment
    Development Environment
    Windows7 Professional Service pack 1 -32 bit
    Java - 1.6
    Internet Explorer 11
    Oracle Client 10g 32 bit ODBC driver
    Testing Environment
    Windows Server 2008 R2 Enterprise - 64 bit
    java 1.6
    Internet Explorer 9
    Oracle Client 11g 62 bit ODBC driver
    While loading reports in the 64 bit server the error occurs
    ERROR reports.reportdefinition :  com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
    ERROR dataengine.datasource : Failed to read next recurring database record: database row set error.
    com.crystaldecisions.reports.reportdefinition.datainterface.j: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.reportdefinition.datainterface.q.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.m(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.l(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
        at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.ab(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.if(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.ca.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.void(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.aE(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
        at com.erm.controller.ALMReportsController.queryDll(ALMReportsController.java:1681)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.erm.authentication.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:658)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.l.bN(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.eg(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.e(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.f(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.dy(Unknown Source)
        ... 89 more
    Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getBigDecimal(Unknown Source)

    A few things to note:
    1) Crystal Report 2013 doe snot install any SDK. Thus the assumption is that you are using CR from teh following link:
    SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download
    2) Since you are using a 64 bit connection (Oracle Client 11g 62 bit ODBC driver) you will have to make sure you are using 64 bit JVM. Otherwise, follow Dell's advice and use a 32 bit ODBC datasource.
    3) On one test you are using Oracle Client 10g 32 bit ODBC driver and the other you are using Oracle Client 11g 64 bit ODBC driver. You might want to see if you can run your app using Client 11g 32 bit ODBC driver.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada

  • I am getting an error [Microsoft][ODBC Driver Manager] invalid argument val

    My code is :
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Hashtable.*;
    import java.sql.*;
    public class LoginServlet extends HttpServlet
         Connection con;
         PreparedStatement ps;
         HttpSession session;
    public void init(ServletConfig sc) throws ServletException
    try
         super.init(sc);
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         }catch(ClassNotFoundException e)
    {System.out.println("SQLException"+e.getMessage());}
    try
         con=DriverManager.getConnection("jdbc:odbc:aaa","scott","tiger");
    }catch(SQLException e)
         System.out.println("SQLException caught" +e.getMessage());
    public void service(HttpServletRequest req, HttpServletResponse res)
         res.setContentType("text/html");
         try
         String ulogin=req.getParameter("login").trim();
         String upass=req.getParameter("pass").trim();
         ps=con.prepareStatement("select pass from Userdetails where login='"+ulogin+"'");
         session=req.getSession(true);
         session.putValue("n1",ulogin);
         ps.setString(1,upass);
         ResultSet rs=ps.executeQuery();
         if(rs.next())
              if(upass.equals(rs.getString(1)))
              res.sendRedirect("http://localhost:8080/Welcome.html");
              session.putValue("login",ulogin);
              else
              PrintWriter pw=res.getWriter();
              pw.println("Sorry your password is incorrect,Reenter your password
    <html><center>");
              pw.println(" <form input type=password name=pass>");
              pw.println("<input type=hidden name=login value="+ulogin+">");
              pw.println("<input type=submit value=submit>");
              pw.println("</form></center></html>");
         else
         System.out.println("your are not a registered user,please register");
         res.sendRedirect("http://localhost:8080/Register.html");
         rs.close();
         catch(Exception e)
              System.out.println(e);
    When i compile, it is well but when i run through displaying my html and passing the data to test,then i am getting an error [Microsoft][ODBC Driver Manager]invalid argument value,
    I was set all my DSN correctly,the same pieve of code worked in another program but now i am getting an error.can any one clear this.
    Thanks in advance

    You have created a PreparedStatement with zero parameters in this statement:
    ps=con.prepareStatement("select pass from Userdetails where login='"+ulogin+"'");so "ps.setString(1, ulogin)" fails because there is no place to put parameter 1. Try this instead:
    ps=con.prepareStatement("select pass from Userdetails where login=?");and your program will work better. Better still, create the PreparedStatement in your init() method, there's no reason for creating it more than once.

  • Kindly help ORA-00917: missing comma" ERR-1101 Unable to process function

    HI Experts,
    Since yesterday every thing was fine, i do not know what happened in the evening, we are facing some issue with our production.
    I'm getting the following error ,when i running the report
    ORA-00917: missing comma
         Error      ERR-1101 Unable to process function body returning query.
    Since long time we have even not touched the code , i'm wondering about this error...the same code was working fine just 2 days back.
    Kindly help me with this...
    Code
    DECLARE
       date_from DATE:=:P46_TRANS_DATEFROM;
       date_to DATE:=:P46_TRANS_DATETO;
       --date_from DATE :=TO_DATE('22-Nov-2007','DD-Mon-yyyy');
       --date_to DATE :=TO_DATE('23-Nov-2007','DD-Mon-yyyy');
       date_counter DATE:=date_from;
       v_city varchar2(32):=:P46_CITY;
       str_month1 VARCHAR2(3):=SUBSTR(TO_CHAR(date_from,'DD-MON-YYYY'),4,3);
       str_year1 VARCHAR2(4):=SUBSTR(TO_CHAR(date_from,'DD-MON-YYYY'),8,4);
       str_month2 VARCHAR2(3):=SUBSTR(TO_CHAR(date_to,'DD-MON-YYYY'),4,3);
       str_year2 VARCHAR2(4):=SUBSTR(TO_CHAR(date_to,'DD-MON-YYYY'),8,4);
       day_from VARCHAR2(2):=SUBSTR(date_from,1,2);
       day_to VARCHAR2(2):=SUBSTR(date_to,1,2);
       CURSOR trans_alloc(m VARCHAR2,y NUMBER,email VARCHAR2) IS SELECT * FROM EFT_TRANS_ALLOCATION WHERE LOWER(MONTH)=LOWER(m) AND YEAR=y AND LOWER(email_id)=LOWER(email);
       CURSOR trans_schedules(m1 VARCHAR2,y1 NUMBER,m2 VARCHAR2,y2 NUMBER) IS SELECT * FROM OD_SHIFT_SCHEDULE WHERE (UPPER(MONTH)=m1 OR UPPER(MONTH)=m2) AND (YEAR=y1 OR YEAR=y2);
       CURSOR get_res_id(email VARCHAR2) IS SELECT resource_id,first_name,last_name FROM EFT_RESOURCES WHERE LOWER(email_id)=LOWER(email);
       rec OD_SHIFT_SCHEDULE%ROWTYPE;
       CURSOR get_shifts(id VARCHAR2) IS SELECT * FROM OD_SHIFTS WHERE shift_id=id;
       ta EFT_TRANS_ALLOCATION%ROWTYPE;
       sd OD_SHIFTS%ROWTYPE;
       sql_str VARCHAR2(4000);
       v_res_id NUMBER;
       v_fname VARCHAR2(50);
       v_lname VARCHAR2(50);
       v_shift_id VARCHAR2(32);
       s VARCHAR2(1000);
       d VARCHAR2(32);
       final_sql VARCHAR2(4000);
       v_consent VARCHAR2(3);
       s2 VARCHAR2(1000);
       dn DATE;
    BEGIN
       DELETE FROM EFT_SHIFT_SCHEDULES_RPT;
       OPEN trans_schedules(UPPER(str_month1),TO_NUMBER(str_year1),UPPER(str_month2),TO_NUMBER(str_year2));
       LOOP
          FETCH trans_schedules INTO rec;
           EXIT WHEN trans_schedules%NOTFOUND;
           OPEN get_res_id(rec.name);
           FETCH get_res_id INTO v_res_id,v_fname,v_lname;
              OPEN trans_alloc(TO_CHAR(date_counter,'MON'),TO_NUMBER(TO_CHAR(date_counter,'YYYY')),rec.name);
               FETCH trans_alloc INTO ta;
               IF trans_alloc%FOUND THEN
               dbms_output.put_line (date_counter||'----'||date_to||'Res_id:----'||v_res_id||'-'||ta.slno);
               dbms_output.put_line ('Found Alloc');
               WHILE date_counter<=date_to
               LOOP
                    --d:=d||'-'||str_month||'-'||str_year;
                    d:=SUBSTR(TO_CHAR(date_counter,'DD-MON-YYYY'),1,2);     
                    s:='INSERT INTO temp_2 SELECT "'||d||'" from OD_SHIFT_SCHEDULE where slno='||rec.slno;
                    --dbms_output.put_line (d||'-'||s);
                    DELETE FROM temp_2;
                    EXECUTE IMMEDIATE s;
                    SELECT substr(trim(VAL),1,1) INTO v_shift_id FROM temp_2;
                    s2:='INSERT INTO temp_3 SELECT "'||d||'" from EFT_TRANS_ALLOCATION where slno='||ta.slno;
                    DELETE FROM temp_3;
                    EXECUTE IMMEDIATE s2;
                    SELECT VAL INTO v_consent FROM temp_3;
                    --dbms_output.put_line (v_shift_id||'-'||v_consent);
                    --dbms_output.put_line (date_counter||'-'||date_to);
                    IF v_consent='Y' THEN
                    --dbms_output.put_line ('Im inside consent'||v_consent);
                    IF v_shift_id IS NOT NULL THEN
                    --dbms_output.put_line ('Im inside shift not null'||v_shift_id);
                       OPEN get_shifts(v_shift_id);
                       FETCH get_shifts INTO sd;
                        IF sd.night_shift_indicator='Y' THEN
                           dn:=date_counter+1;
                        sql_str:='INSERT INTO eft_shift_schedules_rpt VALUES ('||v_res_id||','''||v_fname||''','''||v_lname||''','''||rec.name||''','''||sd.shift_name||''','''||date_counter||''','''||sd.start_from||''','''||sd.start_to||''','''||''','''||sd.active_yn||''','''||dn||''')';
                        ELSE
                           sql_str:='INSERT INTO eft_shift_schedules_rpt VALUES ('||v_res_id||','''||v_fname||''','''||v_lname||''','''||rec.name||''','''||sd.shift_name||''','''||date_counter||''','''||sd.start_from||''','''||sd.start_to||''','''||''','''||sd.active_yn||''','''||date_counter||''')';
                        END IF;
                       EXECUTE IMMEDIATE sql_str;
                       CLOSE get_shifts;
                        --dbms_output.put_line (sql_str);
                    END IF;
                    END IF;
                    COMMIT;
                    date_counter:=date_counter+1;     
              END LOOP;
               END IF;
          CLOSE trans_alloc;
           CLOSE get_res_id;
           --dbms_output.put_line (rec.name);
           date_counter:=date_from;
       END LOOP;
       COMMIT;
       CLOSE trans_schedules;
    final_sql:='select a.first_name,a.last_name,a.email_id,a.shift_details,a.arrange_date,a.slot_from,a.slot_to,a.trans_arranged,a.active_yn,b.address1,b.address2,b.city,b.state,b.pin,b.worknumber,b.homenumber,b.mobilenumber,a.to_date from eft_shift_schedules_rpt a,eft_locations b where a.resource_id=b.resource_id and b.city =:P46_CITY';
    --dbms_output.put_line (final_sql);
    RETURN final_sql;
    END;

    Hi Basva,
    my best advice is find out where the error happens, e.g. using DBMS_UTILITY.FORMAT_ERROR_BACKTRACE .
    In the next step you can fix the error and rework the code so that it looks nice and has some comments in it so everyone knows what it SHOULD do.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at and http://www.wirsindapex.at

Maybe you are looking for

  • JSP/EJB compilation:  don't put .java files in EJB jars!

    I was having trouble compiling a JSP that uses an EJB remote interface.           The Weblogic console printed an error like this:           Thu Aug 31 14:13:58 PDT 2000:<E> <ServletContext-General> Compilation of           D:\weblogic\myserver\class

  • Scheduling Mappings and Process Flows

    Can you please tell me how to schedule mappings and process flows in a little detail, if any one has done that. I think OEM can be used for this but dont have any clear cut idea of doing it. Can the mappings/process flows be scheduled without using O

  • Early access J2EE 8

    The J2EE version 8 seems to be so much different that version 7 that we are not sure how to get started. We have figured out how to find the pallet and design a web page, but we go not know how to get it to display. We also are not sure where to loca

  • Dear Apple, Please make Airplay a system audio option!

    If your like me and would like to be able to stream all of your computer audio over the wonderful airplay protocol, please comment and hopefully Apple can add this feature soon. R

  • User font preferences don't hold

    I see that back in September, another Brooklynite posted about this problem that I have always had for iChat (right now v.429, but has always been a problem for me). http://discussions.apple.com/thread.jspa?messageID=1024102&#1024102 Basically, my de