Ms ODBC driver error -- How to solve

when I run a java code that has JDBC-ODBC link sometimes is sucessful but sometimes failed. Please give some advise!!!! Thanks
error msg :
SQLException: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
source code :
import java.sql.*;
import java.util.*;
     public class CreateCustomer {
     public static void main(String args[]) {
          String url = "jdbc:odbc:rd";
     Connection con;
     String createString;
     createString = "create table CUSTOMER " +
     "(CUST_CODE VARCHAR(10), " +
               "CUST_NAME VARCHAR(40), " +
               "CUST_ADD VARCHAR(40))";
          Statement stmt;
     try {
          Class driverClass = Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
DriverManager.registerDriver((Driver)driverClass.newInstance());
          catch (Exception t) {
                    t.printStackTrace(System.out);
     try {
     con = DriverManager.getConnection(url, info);
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
          catch(SQLException ex)
     {  System.err.println("SQLException: " + ex.getMessage());
}

DriverManager.registerDriver((Driver)driverClass.newInstance());Have you tried it without this line?
Kind regards,
  Levi

Similar Messages

  • Informix ODBC driver error while creating a view in Designer

    I nedd to ceate a view in a universe (Business Objects XI R2) that is connected to an Informix database. I use the 3.34 ODBC Informix driver.
    When I write the select statement (select column from table) and check the syntax I have the following error:
    "Exception: DBD, [Informix][Informix ODBC Driver][Informix]A syntax error has occurred.State: 42000"
    Is there anybody who has solved this problem??
    Thanks in advance to anyone who can give me hints on how to solve problem.
    Fabrizio

    Hi Fabrizio,
    The error state 42000 indicates that there is a syntax error or access violation. If you are using an Informix native client connection then add the following parameter <Parameter Name>"Force SQLExecute">Always</Parameter> in the informix.sbo file. Restart Designer and then try to create a derived table with a simple select statement.
    If you are using an ODBC connection, then add the above mentioned parameter in the Generic section of odbc.sbo file.
    Regards
    Arun Sasi

  • Odbc driver error while OBIEE instal on LINUX tries to access Datawarehouse

    Hi All,
    I have installed OBI Apps on a LINUX machine.The ETL too ran successfully.As we can't install BI tool on LINUX I modified the OracleBIAnalyticsApps.rpd file on a Windows machine and copied it back to the LINUX machine.After modifying the NSQConfig.ini file I could see all the OBI Apps answers and Dashboards ie OBI Apps was installed on LINUX.But whwnever I try to access some data from OLAP i get the following error:
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down. (HY000)
    SQL Issued: SELECT Time."Year" FROM "Human Resources - Workforce Profile" ORDER BY 1
    Probably this is because all the DSN specified in the rpd file were present on the Windows machine.I don't know how to modify these values for LINUX.Please help.Nothing is mentioned in the install docc as far as LINUX installation is concerned.
    regards,
    Soumya.

    I think when your BI Server is running on linux, you would use native drivers to connect to your data warehouse database and not ODBC. If your data warehouse is on a oracle db server, change the call interfact in the RPD connection pool to OCI and give the tnsname for the db server connection in the connection pool.

  • Odbc driver error while connecting with Oracle BI in Linux

    I have Oracle BI Server, Presentation Service and Oracle 11g Client installed in RHEL 5. Oracle BI client is installed in Windows so that I can use Admin tool.
    I have created a repository in Windows for sh schema(by creating ODBC). After that I transferred this repository to the ..server/repository in the linux server.
    I have installed Oracle ODBC Driver from EASYSOFT and added one odbc data source for sh schema in the ../setup/odbc.ini.
    My ODBC setting is as follows.
    [ODBC Data Sources]
    sh=Oracle in OraDb11g_home1
    [sh]
    Driver=/usr/local/easysoft/oracle/libesoracle.so
    Database=//ipaddress_of_ORACLE_SERVER:port/database_service_name
    UID=sh
    PWD=sh
    When I am trying to query through Oracle Answers I am getting the following error.
    Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down. (HY000)
    SQL Issued: SELECT Customers."Cust First Name" saw_0 FROM SH ORDER BY saw_0
    I have enabled tracing, but I am not getting any clue from trace output.
    Can anybody please help.
    If it is because of wrong driver, can anybody suggest a proper ODBC Driver for Oracle and how to configure it. If the driver is OK and configuration is wrong, can anybody tell me how to create system dsn in linux?
    Thanking you in advance.

    don't use ODBC for Oracle, use OCI
    search on the forum, there's plenty of information about it.

  • I have a Pavillion dv7 error message HARD DRIVE ERROR How do I correct this?

    My computer is a Pavillion dv7  model WW181AV  running Windows 7
    no changes have been made for quite some time (over a year) 
    During startup- the HARD DISK ERROR comes on.  Iran the diagnostics as listed in the HP Diagnostic screen and no error found.  Cannot get rid of this error how can I fix this?

    If the hard disk diagnotics report no problem then the issue is with your operating system.
    A windows 7 startup repair disk should resolve the issue.  Windows 7 Startup repair disks are not freely downloadable. You will need to have acces to a PC or notebook that is running the same version and type (32 or 64-bit) as your installed OS. When you have access to such a PC and a blank DVD, then you can make a repair disk of your own.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Oracle 10G DB + 9.2 odbc driver error 12154

    I installed on a Windows 2003 Server the Oracle 10G XE database.
    then I installed the oracle client Version 9.2.0.1.0 where I only Installed the client and the windows services.
    Why I installed the client in Version 9.2.0.1.0: I need the ODBC Driver in Version 9.2.0.0.0 for another software.
    The Problem: When i try to connect via the Oracle odbc driver 9.2.0.0.0 (test connection),
    I always get Error 12154 . On my Windows 2000 machine where I tested it, it works fine.
    It also works fine when I use the odbc driver 10.2 from the XE installation.
    Thanks in advance

    Solved!

  • Odbc Driver error when using specific date column

    I am receiving the this error:
    Odbc driver returned an error (SQLExecDirectW).
    Error DetailsError Codes: OPR4ONWY:U9IM8TAC:OI2DL65P State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46036] Internal Assertion: Condition len <= desc->objectLength_, file ..\Oci8\Src\SQXDGOci8.cpp, line 614. (HY000)
    It happens when I try to to set criteria on a specific date column or I do not set criteria at all. If I set date column 1 to greater than 4 or so months back the report returns, along with all the dates from date column 2. But if I then try to set date column 2 as the criteria, no matter if I just ask for data from a week until today, I receive this error. I tried changing the Server Stack size to 512, but that did not help. Anyone have an idea on this???

    You seem to be using an ODBC connection with an Oracle database, is that correct? If so you should install the Oracle client and use the OCI driver instead and it is much faster and stable than ODBC.

  • Oracle in instantclient_11_2 ODBC driver error 14001

    Hi there,
    I've tried to set up an Oracle ODBC Instant Client driver and I get this error:
    "The setup routines for the Oracle in instantclient_11_2 ODBC driver could not be loaded to system error code 14001
    "Errors found
    "Could not load the setup or translator library
    My Configuration is :
    - ESX 5.0
    - Virtual machine Windows 2008 64 bits (created originally under ESX 4.1)
    - VMTools activated
    - Oracle 11gR2 64 bits (11.2.0.1.0)
    - Instant Client: instantclient-basic-nt-11.2.0.2.0.zip + instantclient-odbc-nt-11.2.0.2.0.zip
    Path is :
    C:\Oracle\instantclient\instantclient_11_2;C:\Oracle\product\11.2.0\dbhome_1;C:\Oracle\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%systemroot%\system32\inetsrv;%systemroot%\system32\inetsrv
    What can be done to rectify this?

    Hi,
    I had exactly the same problem with a comparable system configuration, but with the x86-64 packages (you tried to use the 32bit instant client due to the file names you mentioned).
    Somewhere in the depths of the WWW I got the hint that the solution is to use the instant client V 11.2.0.1.0.
    So I downloaded the older version and everything worked fine...
    Also rememeber to set the TNS_ADMIN environment variable to the path of your "instantclient_11_2" directory and edit a tnsnames.ora file in that directory or else you won't be able to open a connection...
    Good luck and best regards
    Sebastian

  • ODBC Driver Error

    Using 8i oracle client and NT workstation, and the ODBC Driver is 3.52. After installing the 8i, the client logs in to the WBOE application,
    and the error is cannot load resource file sqresus.dll, but it is residing on his HD?
    Is it a permission problem or sharing or something else?
    HELP PLEASE?
    Thanks,
    Lori
    email is [email protected]

    Kam,
    We recommend that you post your inquiry to the ODBC Discussion Forum- http://forums.oracle.com/forums/forum.jsp?id=763957
    The OTN Suggestions/Feedback Forum answers questions relating to the OTN site and other customer support issues.
    Regards, Marilyn Schmidt

  • My safari dont open and give a libroos error how to solve thanks

    My safari dont open and give a error message  "libroosksbas.dylib plug-in."
    what to do to solve
    thanks

    That is Rapport  bank security software.
    Uninstall Trusteer software
    http://www.trusteer.com/support/uninstalling-rapport-mac-os-x

  • A compiler error, how to solve?

    Such a hint, find definition, fl. Controls. The Label, how to solve

    You should include the complete error message in your posting.  If you are having a problem trying to dynamically add a Label component, be sure that you have a Label component placed in your library.

  • ODBC driver error when attempting to add Region to a new Analysis

    With MMASTERS login, attempting to do the demo script. When I try to add the Region from Accounts, get error code:
    OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code:10058 General error Session variable has no value.
    I would like to know how to fix this, so I can present the demo to clients.l

    Hi,
    From your description, it seems that the address
    sales@[domain].com has been used in another mailbox. I recommend you use the following cmdlet to find out which mailbox is using this address.
    Get-recipient | Where {$_.EmailAddresses -match "[email protected]"} | select Identity, DisplayName, RecipientType. The mailbox which is using this address will show up in the result.
    Hope this can be helpful to you.
    Best regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Amy Wang
    TechNet Community Support

  • A run-time-error ,how to solve it

    I write a function to return a float64 type pointer and  assign the pointer to my defined Pionter "newdata" in  my StartCallBack,there's no error,but when I USE  "
    DAQmxWriteAnalogF64 (gtaskhandle0, leng[0]<=leng[1]?2*leng[0]:2*leng[1], 0, 10.0, DAQmx_Val_GroupByScanNumber, newdata, &written, NULL);",
    I get a run-time-error like this : "work.c", line 231, col 121, thread id 0x00007FB4:   Array argument too small (40000000 bytes).  Argument must contain at least 80000000 bytes (10000000 elements).Why this happen?
    My part code:
       DAQmxCreateTask ("", &gtaskhandle0);
       DAQmxCreateAOVoltageChan (gtaskhandle0, "Dev1/ao0:1", "", -10.0, 10.0, DAQmx_Val_Volts, "");
       DAQmxSetTimingAttribute(gtaskhandle0,DAQmx_SampClk_Rate,1000/looptime);
       DAQmxCfgSampClkTiming(gtaskhandle0,"",1000/looptime,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,leng[0]+leng[1]);
       DAQmxRegisterDoneEvent(gtaskhandle0,0,DoneCallback,NULL);
       DAQmxWriteAnalogF64 (gtaskhandle0, leng[0]<=leng[1]?2*leng[0]:2*leng[1], 0, 10.0, DAQmx_Val_GroupByChannel, newdata, &written, NULL);
       SetCtrlAttribute (panelHandle, PANEL_REALWRITE, ATTR_CTRL_VAL, (double)written);
       DAQmxStartTask(gtaskhandle0);
    Solved!
    Go to Solution.

    I do not think so ,when  I modificate the channel from "Dev1/ao0:1" to "Dev1/ao0",it works normally ,but I can output only in one AO channel by this way ,rather than in two AO channels.
    float64 * volarray(double ti[],double vi[],int num,int len,double looptime)
      int k=0,sum=0,m=0;
      float64 *p=NULL;
      p=(float64 *) malloc(sizeof(double)*len);
      for(k=0;k<num-1
       if(ti[k]<ti[k+1])
        {for(m=0;m<(int) (ti[k+1]-ti[k])/looptime;m++)
         p[m+sum]= vi[k]+m*(vi[k+1]-vi[k])/((ti[k+1]-ti[k])/looptime);
           sum+= (int) (ti[k+1]-ti[k])/looptime ;
        k+=1;
       else
        {for(m=0;m<(int) (ti[k+2]-ti[k+1])/looptime;m++) 
         p[m+sum]= vi[k+1]+m*(vi[k+2]-vi[k+1])/((ti[k+2]-ti[k+1])/looptime);
        sum+= (int) (ti[k+2]-ti[k+1])/looptime ;
        k+=2;
       return p;}
    float64 * JointVol( float64 *data0, float64 *data1, int len0, int len1 )
    {  int i=0;
       int totalLen=0;
       float64 * P=NULL;
       if(len0<=len1)
        totalLen=2*len0;
       else
           totalLen=2*len1;
       //totalLen=((len0<=len1)?len0:len1)*2;
       P=(float64*)malloc(sizeof(double)*totalLen);
       for(i=0;i<(totalLen/2);++i) 
       P[2*i]=*(data0+i);
       P[2*i+1]=*(data1+i);
    return P; 

  • Serialization Error.How to solve?

    Hi All,
    I have actived the serialization in my inbound system.Now i am getting an Error
    ' Serialization error for object 01,P,00058634 . Expected counter 000001 <
    000002 in IDoc'. It is saying  The expected serialization counter has the value 000001. However, the serialization counter in the IDoc has the value 000002 and is therefore too big'
    I am not understanding how should i find which is the counter 000001 IDOC.
    How to find the cause of the error?Please guide.
    Regards,
    Prajakta

    Hi narayanan,
    I got the solution.I will tell you if it helps you.
    I checked the IDOC with same oject &with SERIAL_COUNTER = 1.
    so i found the previous unposted IDOC having same atributes.
    Thanks,
    Prajakta

  • Mail SMTP configuration error: how to solve?

    I have two problems with configuring SMTP accounts on my iPhone (4s, with IOS7):
    1) the SMTP is configured, but iOS puts the wrong username together, so login fails. Here is, how:
    SMTP server: smtp.myprovider.com (this is the SMTP of my provider)
    username: [email protected] (mydomain.com is the domain I host there, and the EMAIL is my username!)
    All other settings are trivial and correct.
    ... And now my iPhone connects (correctly) to the SMTP smtp.somewhere.com, but logs in with the username "[email protected]@smtp.myprovider.com" which obviously must fail.
    Any suggestions?
    2) I have several accounts (POP and IMAP), all of which need THEIR SPECIFIC SMTP account. Why?
    Because an increasing number of providers have their SPAM filters configured so as they throw away (they don't even reject sometimes) all mail which is not sent by the SMTP of the provider where the domain is hosted (quite sensibly, though).
    iOS lets me configure a primary SMTP and other SMTP, but does not let me configure ONE SMTP per ACCOUNT each. Or did I miss something?
    The result: All mail is sent via the primary SMTP (which accepts mails from any email to any email as long as I am authentified), and some mails get thrown away by SPAM filters because the SMTP does not match the mail address.
    Any suggestions would be deeply appreciated!
    These things just threw my iPhone useless for mail for any mail account with is (what a shame!) not a MS Exchange account ... Steve would rotate in his grave if he heared that.

    watch on sun forum.

Maybe you are looking for

  • How can I use my ipod on a different computer

    The original computer I set my ipod up on no longer has internet access. How can i set up my ipod on another computer so I can download from itunes without having to delete all my songs?

  • Can't open PSD files after saving them

    I haven't ever had this issue before and now have had it twice in the last week or so. I scrap all the time and now after saving the file as a PSE, when I go to reopen from inside Photoshop Elements 7, it's telling me it can't be opened because it's

  • Save & Send PDF Form

    Hi all, I'm trying to program a function in my PDF form that will automaticly save the PDF form in a folder and then sends the (just saved) PDF form attached in an e-mail. I've got the mail function working with my submit button. The only question is

  • ABAP Runtime Error CONVT_NO_NUMBER

    Dear all, I am calling transaction F-02 for posting G/L Account from an FM. I tried with the Header Data and Account and Cost Centre but it says ABAP Runtime Error CONVT_NO_NUMBER. I undersood that its because of the Number interpretation and coded a

  • Binding a schema to a form that contains a dynamic subform

    I just posted this thread below, but it would not allow me to add the attachments, so I will mail them to livecycle8. Hope that's ok.  Here's the original post Hi, I have a schema bound to a form that utilizes a dynamic subform (min=1, max= unlimited