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.

Similar Messages

  • 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

  • Database link Oracle to MySql Error [Microsoft][ODBC Driver Manager]

    Dear all:
    I need your help, I want to access mysql database from oracle 11g r2. When I try to connect mysql database from oracle database I'm getting the error shown below, kindly help your help will be appreciated, thanks in advance
    When I excute:
    select * from test1@mysqltest;
    [ERROR]
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}
    ORA-02063: preceding 2 lines from THAONT1.MYSQL
    28500. 00000 -  "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded message.
    My config
    oracle db:11.2.0.3 enterprise edition
    os:win 7 64 bits
    mysql connector odbc:64 bit
    mysql db:5.1.19
    ODBC Config
    LISTENER.ORA:
    =============
    # listener.ora Network Configuration File: D:\app\THAONTSE90151\product\11.2.0\dbhome_3\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = D:\app\THAONTSE90151\product\11.2.0\dbhome_3)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:D:\app\THAONTSE90151\product\11.2.0\dbhome_3\bin\oraclr11.dll")
        (SID_DESC =
          (SID_NAME = tst)
          (ORACLE_HOME = D:\app\THAONTSE90151\product\11.2.0\dbhome_3)
          (PROGRAM = dg4odbc)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.1.58)(PORT = 1521))
    ADR_BASE_LISTENER = D:\app\THAONTSE90151
    TNSNAMES.ORA:
    ================
    TSTLINK =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.1.58)(PORT = 1521))
        (CONNECT_DATA =
          (SID = tst)
        (HS = OK)
    inittst.ora($ORACLE_HOME/hs/admin)
    ========================
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = testmysql
    HS_FDS_TRACE_LEVEL = off
    # Environment variables required for the non-Oracle system
    #set ODBCINI=D:\ODBC.INI
    dblink created from oracle to mysql:
    ==========================
    SQL> create public database link mysqltest
    connect to thaont identified by abc123 using 'TSTLINK';
    SQL>select * from test1@mysqltest;
    [ERROR]
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}
    ORA-02063: preceding 2 lines from THAONT1.MYSQL
    28500. 00000 -  "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded message.
    kindly help.
    thanks & regards.

    The error message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified {IM002}" is self explainind - DG4ODBC is not able to find the ODBC DSN you created.
    In your gateway init file you configured the DSN: HS_FDS_CONNECT_INFO = testmysql
    And according to the Windows ODBC Admin screenshot you created a DSN called testmysql - unfortunately you created it as a USER DSN. But DG4ODBC needs a SYSTEM DSN. The reasin why it needs a system DSN is that by default the Oracle listener is running in the local system account. So when you create an ODBC USER DSN it can be access by the user who created it, but nobody else can use it - also not the local system account which is serving the Oracle listener. So you need to create a system DSN that every user on this machine can use the DSN (including the local system account) .
    - Klaus

  • ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2

    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2.I made a application in asp.net c#.I am using ODBC connection.When I deployed my application in windows server2008 r2.There
    is no Microsoft ODBC driver shown in ODBC Data source administrator.Then I go to the C:\Windows\SysWOW64 and open  Odbcad32.exe and add Microsoft ODBC2 driver for Oracle and when I run my application I got following error
    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    I am using follwoing string
     <connectionStrings>
    <add name="theconnetion" connectionString="DSN=abdb;UID=abc;PWD=xyz"/>
     </connectionStrings>
    Guide me What I do?

    Did you add a System DSN or a User DSN? If you added a User DSN from your own login, the asp.net application will not be able to use it unless its application Pool in IIS is configured to run under the same credentials that you used for creating
    the DSN. It's better if you add a System DSN.
    Also, be careful to ensure that you are using a 64 bit DSN, unless you configure the application to run in 32 bits. If the 64 bit application attempts to use the 32 bit driver you get the same error message "Data source name not found and no default
    driver specified". See this KB article:
    http://support.microsoft.com/kb/942976/en-us

  • SQL Server Reporting Services: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Hey everyone, So I am trying to get a report onto the server, and in BIDS I kept getting a login screen repeating over and over when I tried to deploy my report, so I tried to upload the file at http://<servername>/Reports This worked, but then trying
    to run this report from http://<servername>/Reports did not work either because "An error has occurred during report processing. (rsProcessingAborted) Cannot create a connection to data source 'FTYDataSource'. (rsErrorOpeningConnection) For more information
    about this error navigate to the report server on the local server machine, or enable remote errors" Anyways I tried to add a New Data Source (which I would use in the report) at http://<servername>/Reports, type ODBC, with the connection string Dsn=blah_blahblah.
    I try to test the connection here and get the error ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified This is really getting old fast, everything I try, a new error comes up. Granted I am new at this,
    but this still should not be this troublesome. Does anyone have any ideas on what could FINALLY allow me to just put a report out onto the server?!? THANK YOU in advance for ANY help.

    Hi,
    Please try setting the credentials of the datasource.
    1. Double click and open the datasource in your project.
    2. Click on the credentials tab, and click on option button 'Use this username and password'
    3. Enter the username and password to connect to the datasource
    4. Deploy or upload the datasource to the report server and try accessing the reports.
    Hope this helps.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • [Microsoft][ODBC Driver Manager]

    I am using IBM Websphere Application Server V3.5 & IBM DB2 V7
    I am getting this error in creating reports.
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
    how can i solve this ? pls help me.

    Double-post
    http://forum.java.sun.com/thread.jspa?threadID=631806

  • Problem with connecting [Microsoft][ODBC Driver Manager]

    I am employing the Apache Tomcat 5.5.During the time of execution one Exception occur which implies [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    In ordinary way of execution of DataBase connectivity(without Apache Tomcat 5.5),it can successfully done.I dont know how to connect with database with tomcat 5.5.
    Could anyone please steer me to find out the solution.

    Need to configure the server.xml file in tomcat .
    <Resource name="jdbc/myoracle" auth="Container"
    type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:@127.0.0.1:1521:mysid"
    username="scott" password="tiger" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    More Info here
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

  • Linked Server [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Hi  I have SQL2012 installed on my local machine and have also installed MySQL 5.6.23 installed with a test database.
    I also have my SQL connector installed and MYSQL ODBC Driver 3.51.   
    Which happily connects to the Mysqldb.
    The Datasource Name : mySQL conn
    TCP/IP Server : localhost and Port :3306
    User root
    with pwd
    On the SQL side I have used the following
    EXEC master.dbo.sp_addlinkedserver
      @server = N'MYSQLSRV',
      @srvproduct=N'mySQL conn',
      @provider=N'MSDASQL',
      @datasrc=N'mySQL conn'
    However when I try to selet using open query
    SELECT * FROM OPENQUERY ( [MYSQLSRV], 'SELECT * FROM students' )
    it comes back with
    OLE DB provider "MSDASQL" for linked server "MYSQLSRV" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MYSQLSRV".
    I cant understand what I have done wrong .   Any help in this would be great as Ive hit a bit of a brick wall

    Hi Robert3975,
    In addition to other post, please also note the following things.
    1. If you use the 32-bit driver on a 64-bit machine, please run the 32bit version of "odbcad32.exe" by running "c:\Windows\SysWOW64\odbcad32.exe"
     from Start/Run menu and
    create your ODBC DSN. However, for the 64-bit driver, use c:\windows\system32\odbcad32.exe to create your ODBC DSN. For more details, please review this similar
    thread.
    2. Expand the folder Providers under Linked server directory in SSMS and go to properties of MSDASQL provider and configure it properly as described in this blog:
    Creating Linked server to MYSQL from SQL Server.
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • Crystal Reports Ver 11 Logon Failed  IM014 [Microsoft] [ODBC Driver manager

    Please help. I am using Crystal Reports Version 11. I have Windows 7 and 64-bit browser. I am receiving the following error message: Details: IM014: [Microcsoft] [ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.

    Hello,
    Two issues, CR XI is not support on Windows 7. To get this working upgrade to Cr XI R2 SP 6 for free, use your XI keycode.
    https://smpdl.sap-ag.de/~sapidp/012002523100011802732008E/crxir2_sp4_full_build.exe
    and then
    https://smpdl.sap-ag.de/~sapidp/012002523100013876392008E/crxir2win_sp5.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe
    Do not run CR between patches, When SP 6 is installed then CR should work.
    Next issue is CR is a 32 bit application only and it will run on 64 bit OS's but it will not support any 64 bit third party applications including IE. To connect to your database you must use the 32 bit client.
    Run the ODBC Administrator from the \syswow64 folder to create your DSN.
    Thank you
    Don
    Edited by: Don Williams on Nov 4, 2010 10:06 AM

  • SSRS 2012 ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

    I have a SSRS installation, I have deployed my connections to, but they fail with title message.  The drivers and ODBC on the box are setup and work fine with 32 bit ODBC conn manager. 
    When I run or configure my connections on the site, via the browser, I get errors connecting.
    I tried to find which app pool http://server/ReportServer application used, but I am not finding that, so my first ?
    How do I find in IIS what app pool SSRS application is using?
    I have 2008 server, running SQL 2012 V.S. 2010 and I think I need to enable my app pool to use 32 bit, but cannot figure out which one it uses?  I see default set to 32 bit = true, which I thought would be it.
    Can I set my SSRS project to use x86, platform? Like I did with SSIS? 
    If so, how?  SSRS and SQL 2012 somewhat new for me. Thanks
    Developer MS Reporting Services

    Hi DCady,
    To manage a data source that connects to a 32-bit driver under 64-bit platform, we use C:\Windows\SysWOW64\odbcad32.exe. To manage a data source that connects to a 64-bit driver, we use C:\Windows\System32\odbcad32.exe.
    Generally, if we use the 64-bit odbcad32.exe (C:\Windows\System32\odbcad32.exe) to configure or remove a DSN that connects to a 32-bit driver, for example, Driver do Microsoft Access (*.mdb), we will receive the following error message:
    The specified DSN contains an architecture mismatch between the Driver and Application
    To resolve this error, we need to use the 32-bit odbcad32.exe (C:\Windows\SysWOW64\odbacad32.exe) to configure or remove the DSN.
    Besides, please make sure there are no DSN using the same name in both 64-bit and 32-bit ODBC Data Source Administrator.
    Reference:
    Managing Data Sources
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • 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...

  • Java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name no

    Hi,
    I am working with the following program. The same program is working with JBOSS but not with Tomcat-5. I am using MS-Access. Working with this program is very essential now. Please Help me.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class MDBGetData extends HttpServlet{
         Connection con=null;
         Statement st=null;
         ResultSet rs=null;
         public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{
              PrintWriter out=res.getWriter();
              out.println("Connecting To data Base");
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:cmpny","sa","");
                   st=con.createStatement();
                   out.println("Connected to database");
                   rs=st.executeQuery("select * from cmpny");
                   while(rs.next()){
                        out.println(rs.getString(1));
              catch(Exception e){
                   System.out.println("Error While Creating The connection : " +e);
    }

    This is code for connect mySQL database:
    Connection con=null;
         Statement stmt=null;
         ResultSet rs=null;
         // Set up the JDBC connection
         try {     
              // Create
              InitialContext ctx=new InitialContext();
              ds=(DataSource)ctx.lookup("java:comp/env/jdbc/mysql");
              con=ds.getConnection();
              stmt=con.createStatement();
              rs=stmt.executeQuery(sqlQuery);
    catch(SQLException e){
    Note: before you use these code you have to set datasource in tomcat
    I will show you how to do it next post.

  • [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

  • Microsoft ODBC data manager not found

    I created a Universe using Information Design Tool and published it to the repository. My data source was MS SQL server 2008. At this point I am able to view the result values in query in IDT.
    Now when I try to preview the query in SAP Dashboard Design, I am getting the below error while using Query Builder in SAP Bo XI4 Dashboard designer.
    Request processing failed. (XLS 000009)
    Request processing failed. (XLS 000009) []&lt;com.businessobjects.dsl.commons.exception.NestedException: [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified&gt
    My Specifications are :
    MS SQL Server 2008 in 64 bit OS
    BO 4.0
    I tried creating system DSN in odbcad32.exe in the PC but it didn't work. I still get the error.
    Any suggestion on how to resolve it.

    Forget the Federation server.  You need the Connection Servers up.
    This is a DSN problem.
    For this 1 SQL server connection, you need BOTH 32-bit and 64-bit DSN defined on the BI Processing Server,  with the same name.
    Good info here: https://websmp204.sap-ag.de/~sapidb/011000358700000018202011E/index.htm
    Regards,
    H
    p.s. lots of notes about this :
    1495318 - Error: Data source name not found and no default driver specified
    1543358 - Error: "A database error text is [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
       1396736 - " : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" error when testing connection in Universe Designer on 64-bit Windows OS

  • [ODBC Driver Manager] Driver does not support this function

    HI every body
    In Win Server 2008 R2 , I tried to retrieve data from my ODBC Driver
     by Report Builder , my connection test is successful , but after any retrieve data by SQL Statement I encounter with this Error :
    IM0001: [Microsoft] [ODBC Driver Manager] Driver does not support this function
    I use Win Server 2008 R2 , and my ODBC Driver installed on :
    %SystemRoot%\SysWOW64\odbcad32.exe
    Can anyone help me to solve this problem, its realy urgent for me ,
    PLEASE HELP ………………..

    ODBC Driver name is PMSDK (32 bit) and installed by Primavera software
    I use SQL Report Builder to connect the driver and try SQL Statement in it
    Report Builder may be executing an ODBC function to retrieve meta data, and that function is not supported by the PMSDK driver.  Are you using the latest version of the PMSDK driver?  You might try turning on ODBC tracing to find out the problem
    function. 
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

Maybe you are looking for

  • Report Builder 6i Data Model

    Report Builder 6i is ending in error if we try to add additional column in the data model query select rpad('a',50,'-') cust_name_inv, rpad('a',30,'-') cust_no_inv, rpad('a',30,'-') sal_name, ---added column rpad('a',4000,'-') sort_field1_inv, rpad('

  • ORA-22922: nonexistent LOB value in outer join in XMLDB parsing query

    Hi, We are in a situation where i must use outer join with the address type fragment in the XML reader query, Here is the oracle installation details Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3

  • Quiz Results Screen

    Is there a way to modify what fields appear in the quiz result screen?  I have a project built from 4 other projects.  At the end of each project I have review questions.  I marked these as survey because I didn't want the results reported to an LMS.

  • Record Centre - Sent to Corporate Record centre new location link

    Background: We are using SharePoint 2010 to declare record from a team site using "Send to" link to move the record and leave a link behind. The record is moved to the 'Record Site" hub and routing rules are set up in here to move the record to corre

  • Which function creates an activity in CRM?

    Hi, We would like to create activities in CRM through a BAPI-like function but we can't seem to find a suitable one. Do you know which function / class method is used to create new activities in CRM ? Thanks in advance, George