OO4O OpenDatabase problem

I use OO4O in ASP to connect to oracle and the code have ASP script error:507 at the OpenDatabase method.
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
'Create the OraDatabase Object by opening a connection to Oracle.
Set OraDatabase = OraSession.OpenDatabase("HelloDb", "hi/friend", 0)
I have tested the Oracle network service and the user account and found that they are OK. I think it is the OO4O problems.
Has anybody a solution for this problem.
Thanks in advance,
John

This may have to do w/ the RSFs not being loaded.

Similar Messages

  • Problem with OO4O opendatabase() call, migrating the client from 9i to 10g

    I have the following code:
    VARIANT* pvaparams = new VARIANT[3];
    if (pvaparams == NULL)
    return NULL;
    for (int nIndex = 0; nIndex < 3; nIndex++)
    VariantInit(&pvaparams[nIndex]);
    pvaparams[0].vt = VT_I4;
    pvaparams[0].lVal = ORADB_ORAMODE;
    pvaparams[1].vt = VT_BSTR;
    pvaparams[1].bstrVal = bstrConnect; //user and passwd
    pvaparams[2].vt = VT_BSTR;
    pvaparams[2].bstrVal = bstrDBname; //database name
    VARIANT va_out;
    VariantInit(&va_out);
    va_out.vt = VT_DISPATCH; // expect IDispatch* for database
    DISPPARAMS params = {pvaparams, NULL, 3, 0};
    EXCEPINFO eInfo;
    unsigned int uiArgErr;
    //dispid_OpenDatabase OK, previously obtained
    hRes = m_pIOracleSession->Invoke( dispid_OpenDatabase, IID_NULL,1033,
    DISPATCH_PROPERTYGET , &params , &va_out,
    &eInfo, &uiArgErr );
    if ( FAILED( hRes ) )
    throw new COracleDBXception(eInfo);
    This is from an application developped in VC++ 5 which uses COM and OO40 for connecting to a 9i database; and works fine, with a 9.2.0.1.0 client.
    I have updated the server to 10g and kept the client and it's running OK.
    After that, I have installed the 10.2.0.1.0 client and it's not working anymore; the odd thing is that the call to Invoke() has succeded and hRes is 0, but there is no connection to the database!!!
    I set a breakpoint after Invoke() and, from PL/SQL Developer, the "select OSUSER, PROGRAM, TERMINAL from v$session t where username='NORO';" command reports nothing; with the 9i client, it was reporting 1 connection.
    I would like to add that I had uninstalled completely the 9i client and after that I installed the 10g client.
    Can anyone give me a hint?
    Thank you!

    Hi everyone!
    static const CLSID CLSID_Oracle =
    {0x3893b4a0, 0xffd8, 0x101a, {0xad, 0xf2, 0x04, 0x02, 0x1c, 0x00, 0x70, 0x02}};
    const DWORD ORADB_ORAMODE = 0x1 ;
    STDMETHODIMP Test()
         HRESULT     hr;
         IDispatch* pIDefaultSession;
         hr = ::CoCreateInstance( CLSID_Oracle, NULL, CLSCTX_SERVER, IID_IDispatch, (void**)&pIDefaultSession );
         if (hr != S_OK)
              return S_FALSE;
         // CreateNamedSession - DISPID: 0x6001000B
         // OpenDatabase - DISPID: 0x60010001
         // create unique name
         TCHAR strName[256];
         stprintf( strName, T("Session#%d"), 1);
         // call 'CreateNamedSession' method
         VARIANT vaparam;
         VariantInit(&vaparam);
         vaparam.vt = VT_BSTR;
         vaparam.bstrVal = SysAllocTString(strName);
         VARIANT va_out_3nd;
         VariantInit(&va_out_3nd);
         va_out_3nd.vt = VT_DISPATCH;     // expect IDispatch* for named session
         DISPPARAMS params = {&vaparam, NULL, 1, 0};
         EXCEPINFO excepinfo;
         unsigned int uiArgErr;
         // Invoke CreateNamedSession
         hr = pIDefaultSession->Invoke( 0x6001000B, IID_NULL, 1033, DISPATCH_PROPERTYGET, &params, &va_out_3nd, &excepinfo, &uiArgErr );
         ::SysFreeString(vaparam.bstrVal);
         if ( FAILED(hr) )
              return S_FALSE;
         CComPtr<IDispatch> m_pIOracleSession;      // pointer to the session
         m_pIOracleSession.p = va_out_3nd.pdispVal;
         // call "OpenDatabase" method
         HRESULT hRes;
         CSString m_strDbId = _T("databasename");
         CSString m_strUserName = _T("username");
         CSString m_strPswd = _T("password");
         CComBSTR bstrDBName = SysAllocTString(m_strDbId);
         CComBSTR bstrConnect = SysAllocTString(m_strUserName + T("/") + mstrPswd);
         VARIANT* pvaparams = new VARIANT[3];
         if (pvaparams == NULL)
              return S_FALSE;
         for (int nIndex = 0; nIndex < 3; nIndex++)
              VariantInit(&pvaparams[nIndex]);
         pvaparams[0].vt = VT_I4;
         pvaparams[0].lVal = ORADB_ORAMODE;
         pvaparams[1].vt = VT_BSTR;
         pvaparams[1].bstrVal = bstrConnect;
         pvaparams[2].vt = VT_BSTR;
         pvaparams[2].bstrVal = bstrDBName;
         VARIANT va_out_2nd;
         VariantInit(&va_out_2nd);
         va_out_2nd.vt = VT_DISPATCH;      // expect IDispatch* for database
         DISPPARAMS params_2nd = {pvaparams, NULL, 3, 0};
         EXCEPINFO eInfo;
         unsigned int uiArgErr_2nd;
         // invoke OpenDatabase:
         //here is the problem!!!
         hRes = m_pIOracleSession->Invoke(0x60010001, IID_NULL, 1033, DISPATCH_PROPERTYGET , &params_2nd , &va_out_2nd, &eInfo, &uiArgErr_2nd );
         delete pvaparams;
         if ( FAILED( hRes ) )
              return S_FALSE;
         CComPtr<IDispatch> m_pDatabase;
         m_pDatabase.p = va_out_2nd.pdispVal;
         CreateCustomDynaset - DISPID: 0x6001000C
         ExecuteSQL - DISPID: 0x60010006
         LastServerErrText - DISPID: 0x60010009
         Parameters - DISPID: 0x00000000
         LastServerErrReset - DISPID: 0x6001000B
         TCHAR* pAlterNumeric = T("ALTER SESSION SET NLSNUMERIC_CHARACTERS = \".,\"");
         // call "ExecuteSQL" method
         VARIANT va_params;
         VariantInit(&va_params);
         va_params.vt = VT_BSTR;
         va_params.bstrVal = SysAllocTString(pAlterNumeric);
         DISPPARAMS params_3nd = {&va_params, NULL, 1, 0};
         unsigned int uiArgErr_3nd;
         // Invoke ExecuteSQL:
         hr = m_pDatabase->Invoke( 0x60010006, IID_NULL, 1033, DISPATCH_METHOD, &params_3nd, NULL, &eInfo, &uiArgErr_3nd );
         if (FAILED(hr))
              return S_FALSE;
         return S_OK;
    If this function is called from DllMain(), it works. But if we call this function from another method from our .dll, and that method is called via COM from a client, this function doesn't work anymore! We use VC++ 5 and the 10g Oracle client.
    Can anyone give me a explanation?
    PS: The call to opendatabase() is successfull, but we don't see a connection on the database server and we get a SEGV error: "function not mapped to object".
    Noro

  • OO4O: Connection Problem

    I have problems connecting to Oracle with OO4O 2.3 within a ActiveX DLL (Visual Basic 6.0).
    The program execution stops at OraSession.OpenDatabse, but It dosn't stop, if the DLL
    is in debug mode !
    This problem doesn't occure with older versions of oo4o !
    Has anybody a solution for this problems
    Thanks in advance,
    Michael

    This may have to do w/ the RSFs not being loaded.

  • RAW problem with OO4O and VB6.

    Hello!
    Env: W2K3 SBS R2, O11gR2, OO4O, VB6 and problem from a "heritage" project ;-).
    /* Create a small Test table */
    Create Table ORAWTEST
    ( oid Number(10),
    bflags Raw(4)
    ) Tablespace USERDATA Storage(Initial 32K Next 32K);
    ' ** A small VB6 app. **
    Dim osess As OraSessionClass, odb As OraDatabase, ors As OraDynaset
    Private Sub Form_Load()
    Set osess = CreateObject("OracleInProcServer.XOraSession")
    Set odb = osess.OpenDatabase("orcl", "uid/pw", ORADB_ORAMODE)
    End Sub
    Private Sub Form_Unload()
    odb.Close: Set osess = Nothing
    End Sub
    Private Sub Command1_Click()
    ' Insert 3 rows with different values Into Test table using Addnew() method.
    Dim ws As String
    Set ors = odb.CreateDynaset("Select * From ORAWTEST", ORADYN_ORAMODE)
    ws = Chr$(0) & Chr$(0) & Chr$(32) & Chr$(0)
    ors.AddNew: ors("oid") = 1: ors("bflags") = ws: ors.Update
    ws = Chr$(0) & Chr$(0) & Chr$(0) & Chr$(32) ' <-- !!! This is the problem.
    ors.AddNew: ors("oid") = 2: ors("bflags") = ws: ors.Update
    ws = Chr$(0) & Chr$(0) & Chr$(0) & Chr$(64)
    ors.AddNew: ors("oid") = 3: ors("bflags") = ws: ors.Update
    ors.Close
    End Sub
    ... and now the surprise:
    SQL> Select oid, RawToHex(bflags) From ORAWTEST;
    OID RAWTOHEX(BFLAGS)
    1 00002000
    *2 000000*
    3 00000040
    Row 2 bflags column last byte is missing (in case of x'20' value).
    Is it a bug, or whatever? Thanks for any idea in advance.
    Leslie

    OK ... I solved the first question. I'll post the answer as nobody on any of the forums where I've posted this question for the last year or so has known the answer - either that or they weren't willing to share it.
    In the form, CR puts the following boilerplate:
    Private Sub Form_Load()
    Screen.MousePointer = vbHourglass
    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport
    Screen.MousePointer = vbDefault
    End Sub
    I found that if I added Report.DiscardSavedData before the report source is declared, the report is forced to refresh it's data each time it's run. So that solves the first part of my problem.
    Question 2 is still unknown ...
    Ken

  • OO4O 10g and VB6 Bookmark Property Problem

    Hi All,
    I'm facing a problem with the BookMark property. It's throwing OIP-04121 Error.
    Below are the details
    Controls used:
    1) SSDBGrid of v3.11
    2) ORADC of v10g
    Code:
    Private Sub gridMain_RowLoaded(ByVal Bookmark As Variant)
    Dim PubHol As PUBLIC_HOLIDAY
    Dim Rs As Object 'Oracle DynaSet
    Set Rs = datMain.Recordset.dbClone()
    Rs.Bookmark = Bookmark ' Getting OIP-04121 Error here
    If Rs("year") = 0 Then
    gridMain.Columns(1).text = "----"
    Else
    gridMain.ColText(1) = Rs("year")
    End If
    The code is working fine in VB3.0, OO4O 1.0 and Sheridan Data Widgets 1.0e. However it's throwing error with VB6, OO4O latest versions and Sheridan Data Widgets 3.11.
    Please help me I tried many ways but failed. Kindly provide some alternate way to achieve this BookMark.
    Thanks and Regards,

    Hi All,
    I'm facing a problem with the BookMark property. It's throwing OIP-04121 Error.
    Below are the details
    Controls used:
    1) SSDBGrid of v3.11
    2) ORADC of v10g
    Code:
    Private Sub gridMain_RowLoaded(ByVal Bookmark As Variant)
    Dim PubHol As PUBLIC_HOLIDAY
    Dim Rs As Object 'Oracle DynaSet
    Set Rs = datMain.Recordset.dbClone()
    Rs.Bookmark = Bookmark ' Getting OIP-04121 Error here
    If Rs("year") = 0 Then
    gridMain.Columns(1).text = "----"
    Else
    gridMain.ColText(1) = Rs("year")
    End If
    The code is working fine in VB3.0, OO4O 1.0 and Sheridan Data Widgets 1.0e. However it's throwing error with VB6, OO4O latest versions and Sheridan Data Widgets 3.11.
    Please help me I tried many ways but failed. Kindly provide some alternate way to achieve this BookMark.
    Thanks and Regards,

  • Problem call stored procedure from asp using oo4o

    I am having a problem calling a pl/sql stored procedure from ASP.
    Attached is the code. Any help would be appreciated. There are no errors returned on the page as far as I can tell.
    Sub add_cc_rec(p_location_rental_object_num, p_start_date, p_end_date, p_rate_code, p_quantity)
         'On Error Resume Next     
         Dim msg, stat, p_available, p_free_sell, p_cap_level, p_status_code, p_error_code
         Dim OraDatabase, PlSqlStmt
         Response.Write "In Function add_cc_rec<br>"
         msg = ""
         stat = ""
         p_available = "Y"
         p_free_sell = "Y"
         p_cap_level = "0"
         p_status_code = 2
         p_error_code = ""
         Set OraSession = Server.CreateObject("OracleInProcServer.XOraSession")
         Response.Write "Created OraSession<br>"
         Set OraDatabase = OraSession.OpenDatabase(ORADB, RUUID &"/"& RUPWD, 0)
         'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, RUUID &"/"& RUPWD,cint(0))
         'Set OraDatabase = OraSession.DbOpenDatabase(ORADB, UID &"/"& PWD,cint(0))
         Response.Write "Created OraDatabase with the following parameters<br>"
         Response.Write "Database is " & ORADB & "<br>"
         Response.Write "UserId is " & RUUID & "<br><br>"
         OraDatabase.Parameters.Add "p_location_rental_object_num", p_location_rental_object_num, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_available", p_available, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_start_date", p_start_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_end_date", p_end_date, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_free_sell", p_free_sell, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_quantity", p_quantity, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_cap_level", p_cap_level, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_rate_code", p_rate_code, ORAPARM_INPUT, ORATYPE_VARCHAR2
         OraDatabase.Parameters.Add "p_status_code", p_status_code, ORAPARM_OUTPUT, ORATYPE_NUMBER
         OraDatabase.Parameters.Add "p_error_code", p_error_code, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
         Response.Write "Calling PL/SQL procedure cc_insert <br>"
         Set PlSqlStmt = OraDatabase.CreateSQL("Begin RATELINK_CAPACITY_CONTROL.cc_insert(:p_location_rental_object_num, :p_available, :p_start_date, :p_end_date, :p_free_sell, :p_quantity, :p_cap_level, :p_rate_code, :p_status_code, :p_error_code); end;", ORASQL_DEFAULT)
         Response.Write "PL/SQL procedure cc_insert has been called <br>"
         Response.Write "Status code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_status_code").value & ")<br>"
         Response.Write "Error code from PL/SQL procedure cc_insert (" & OraDatabase.Parameters("p_error_code").value & ")<br>"
         'Response.Write "Error code from PL/SQL procedure cc_insert (" & p_error_code & ")<br>"
         OraDatabase.Parameters.Remove "p_location_rental_object_num"
         OraDatabase.Parameters.Remove "p_available"
         OraDatabase.Parameters.Remove "p_start_date"
         OraDatabase.Parameters.Remove "p_end_date"
         OraDatabase.Parameters.Remove "p_free_sell"
         OraDatabase.Parameters.Remove "p_quantity"
         OraDatabase.Parameters.Remove "p_cap_level"
         OraDatabase.Parameters.Remove "p_rate_code"
         OraDatabase.Parameters.Remove "p_status_code"
         OraDatabase.Parameters.Remove "p_error_code"
         Set OraSession = Nothing
         Set OraDatabase = Nothing
    End Sub

    1 - Can I clear errors on the OraDatabase class. How do
    I do that?They store the last error, should clear itself.
    2. Is this a client side or server side error? If this
    is a client side error, how do I resolve it?Server side error only. Make sure the user you connect as can see 'RATELINK_CAPACITY_CONTROL.CC_INSERT' and has execute permissions on it. You may need to qualify it with a schema name if the connected user is not the schema owner.

  • Problem of oo4o insert varray data

    i want to use oracle oo4o to insert the varray type data ,but it occurs error that
    OIP-04149: Invalid input object for field and parameters
    who will tell me what's wrong for this programm
    the table is created by the follow sql:
    drop table Varr_test;
    CREATE TYPE varrayf_9 AS VARRAY(9) OF float;
    CREATE TABLE Varr_test
    NUM_INDEX number NOT NULL,
    TEXT varchar2(128),
    NUMBER_OPT varrayf_9
    programme as follows:
    OStartup();
    oresult oRes ; // oRes is oresult
    OSession m_o_Session; //
    ODatabase m_o_db; //
    oRes = m_o_Session.Open();
    oRes = m_o_db.Open(m_o_Session,"oraDemet","system","myora"); // m_o_db is ODatabase
    oRes = m_o_db.BeginTrans();
    // the insert proccess
    // Add Params
    OParameterCollection oParamCol = m_o_db.GetParameters();
    OParamArray o_NUM_INDEX_Ary = oParamCol.AddTable("B_NUM_INDEX",OPARAMETER_INVAR,OTYPE_NUMBER,10);
    OParamArray o_TEXT_Ary = oParamCol.AddTable("B_TEXT",OPARAMETER_INVAR,OTYPE_VARCHAR2,10,250);
    OParamArray o_NUMBER_OPT_Ary = oParamCol.AddTable("B_NUMBER_OPT",OPARAMETER_INVAR,OTYPE_VARRAY,10);
    OCollection otest;
    for(int i =0;i<10;i++){
    o_NUM_INDEX_Ary.SetValue(i,i);
    o_TEXT_Ary.SetValue("test",i);
    otest.Open(m_o_db,"varrayf_9");
    for(int j=0;j<9;j++)
    otest.SetValue(j+1,j+1);
    if (oRes != OSUCCESS)
    {   // couldn’t create the table
    AfxMessageBox(m_o_db.GetErrorText());
    o_NUMBER_OPT_Ary.SetValue(otest,i);
    oRes = m_o_db.ExecuteSQL("INSERT INTO Varr_test (NUM_INDEX,TEXT,NUMBER_OPT) VALUES (:B_NUM_INDEX,:B_TEXT,:B_NUMBER_OPT)");
    if (oRes != OSUCCESS)
    {   // couldn’t create the table
    AfxMessageBox(m_o_db.GetErrorText());
    oParamCol.Remove("B_NUM_INDEX");
    oParamCol.Remove("B_TEXT");
    oParamCol.Remove("B_NUMBER_OPT");
    oRes = m_o_db.CommitTrans();
    oRes = m_o_db.Close();
    m_o_Session.Close();
    OShutdown();

    Hi,
    I have stored Unicode arabic Data correctly using UNISTR function in SQLPLUS but on select it doesnot display the arabic characters correctly which is ok. Since i can see the arabic data using iSQLPlus.
    Using SQL Plus I tried this
    insert into amc (amc_id,name) values('sqlplus1',unistr('\0642'));
    In SQL Plus
    select amc_id, name, dump(name,1016) from amc;
    AMC_ID NAME DUMP(NAME,1016)
    -sqlplus1 Þ Typ=1 Len=2 CharacterSet=AL16UTF16: 6,42
    Although \u0642 is defined in codepage 1256 as arabic letter "Qaf" but sql plus is showing this Þ which is not define in 1256. Dont know why.
    In iSQLPLus Its showing correctly
    sqlplus1 ق Typ=1 Len=2 CharacterSet=AL16UTF16: 6,42
    My actual problem is storing/retrieving data with JAVA. Java client is displaying above stored value "qaf" as ¿ . why?
    On Storing i apparently losing first byte.Using java i tried to insert the another value using this code.
    String uniname = "\u06A7";
    String qry=
    "insert into fms_save.amc " +
    "(amc_id,element_type_id, amc_short_name, transaction_id, transaction_year, name, last_accessed_date, post_action) " +
    " values " +
    "('client92','A','clinet1',11,2007,UNISTR('" + uniname + "'),sysdate,'NSAVE')";
    PreparedStatement pstmt = c.prepareStatement(qry);
    pstmt.executeUpdate();
    select result in both sql plus and isqlplus is as follow
    AMC_ID NAME DUMP(NAME,1016)
    client92 § Typ=1 Len=2 CharacterSet=AL16UTF16: 0,a7
    Please notice the DUMP. Why first byte 06 is not storing in the db. Its only storing second byte A7.
    I understand that System is displaying A7 as § whose codepage value is 00A7 in windows charset 1256 But i wonder why first byte data 06 is getting lost?
    I am not using OracleStatement setFormOfUse(..) instead i am using Java System Property -Doracle.jdbc.defaultNChar=true also i am using
    -Doracle.jdbc.convertNcharLiterals="true" to avoid NChar String literal data lost.
    Can you please help me to get my Java working with Arabic storage and retrival?
    Thanks in advance.

  • Which driver provides "OraSessionClass.OpenDatabase" method ODBC or OO4O

    I've a windows app built in VB6.0 which is working fine in 32-bit machine and Oracle10g client. When my client tries to use it in a 64-bit machine and connects to Oracle11g 64-bit client the app doesn't work. I'm using "OraSessionClass" to connect to the db. I'm confused about which driver is my app using to connect to db OO4O 0r ODBC. If it is OO4O I read that there is some compatibility issue with oracle 11g 64-bit client. Is OO4O available with 64-bit client? If not, can I install 32-bit oracle11g client on a 64-bit machine get OO4O driver so that my app will work. Please suggest me in resolving this issue. Thanks a lot!!!"

    Hi,
    The code is using OO4O.
    There is no 64 bit version of OO4O.
    VB6 apps are 32 bit so need 32 bit Oracle client software.
    Using 32 bit OO4O on a 64 bit OS is not a supported supported configuration, but should work anyway.
    Hope it helps,
    Greg

  • Raising Run Time Error '440' with  OO4O 2.2.1.0.0

    Hello everybody,
    I do not have much experience with ORACLE, but there is a problem I can not solve by myself:
    Asking my ORACLE DB (Oracle8i Enterprise Ed. Rel. 8.1.7.1.0 - Production with Partitioning option JServer Rel. 8.1.7.1.0) by SQL*Plus Rel. 3.3.4.0.0 with the following SQL-string everything works fine:
    SELECT E.APPROVED_VALUE, A.CI, E.END_DATE, Max(E.START_DATE)
    FROM CPC_FLAT_ANAG A, CPC_PRICES_COSTS_BD E
    WHERE A.CI = E.CI
    GROUP BY E.END_DATE, E.APPROVED_VALUE, A.CI
    HAVING ((E.END_DATE IS NULL) AND ((A.CI Like '3AL78815AB**')))
    ORDER BY Max(E.START_DATE) DESC;
    But when connecting ORACLE with VBA and OO4O, there raises the following error:
    Run Time Error 440: Error in SQL statement, ORA-0911: invalid character
    VBA-Code: (processed within an Excel97-Macro, Windows NT 4.00.1381)
    Option Explicit
    Sub Ask_DB
    Dim objDataBase As Object
    Dim objsession As Object, OraDynaSet As Object
    Dim strSQLAbfrage as String, strZeichen As String
    ' 1. Step: Create a reference to the OO4O dll
    Set objsession = CreateObject("OracleInProcServer.XOraSession")
    ' 2. Step: Create a reference to my database
    Set objDataBase = objsession.OpenDatabase("Oracle-DB", "user/passw", 0&)
    ' 3. Step: create SQL string
    strZeichen = vbCrLf 'vbNewLine <-- maybe I have to use another Char for CrLf?
    strSQLAbfrage = "SELECT E.APPROVED_VALUE, A.CI, E.END_DATE, Max(E.START_DATE)" strSQLAbfrage = strSQLAbfrage & strZeichen & "FROM CPC_FLAT_ANAG A, CPC_PRICES_COSTS_BD E"
    strSQLAbfrage = strSQLAbfrage & strZeichen & "WHERE A.CI = E.CI"
    strSQLAbfrage = strSQLAbfrage & strZeichen & "GROUP BY E.END_DATE, E.APPROVED_VALUE, A.CI"
    strSQLAbfrage = strSQLAbfrage & strZeichen & "HAVING ((E.END_DATE IS NULL) AND "
    strSQLAbfrage = strSQLAbfrage & "((A.CI Like '3AL78815AB**')))"
    ' lateron there might be additional part numbers
    strSQLAbfrage = strSQLAbfrage & strZeichen & "ORDER BY Max(E.START_DATE) DESC;" & strZeichen
    Debug.Print strSQLAbfrage
    Debug.Print Len(strSQLAbfrage)     ' <-- what about max. length of SQL-query?
    ' 4. Step: Retrieve the results from Oracle
    Set OraDynaSet = objDataBase.DBCreateDynaset(strSQLAbfrage, 0&)     ' <-- Error occurs!!!
    ' 5. Step
    ' ............ process results is not possible .....
    Fehler:
    Set OraDynaSet = Nothing
    Set objsession = Nothing
    Set objDataBase = Nothing
    End Sub
    Can anybody help me?
    Thank you
    Rudi

    Try getting rid of the semicolon at the end.

  • OO4O issues with Windows 2008

    I've downloaded 10203_vista_w2k8_x86_production_client.zip and performed a client install. I need to get oo4o up and running but the oo4o test page is failing with the following error:
    Error: Unable to create Ora Session
    [429][ActiveX component can't create object]
    I've setup tests to prove .html pages work, .asp pages, and now attempting to make an oo4o connection to a database through an .asp page and I am unsuccessful.
    Any thoughts regarding this? I started researching whether or not oo4o.dll files needed registering but wasn't sure if I'm getting way off track. I also found that when trying to run regsrvr32 on the oo4o wizard files I get an error that apparently means I'm denied access. Maybe this implies there is also permission issues with oo4o?
    Any help is appreciated.

    What install type did you do?
    Which page are you referring to by "the" oo4o test page?
    I just installed 10203_vista_w2k8_x86_production_client.zip using the 'administrator' option, on x86 win2k8, had to fumble around a bit to get IIS to render ASP pages, but then it worked fine for me with the following. I assume this gives the same problem for you though?
    Greg
    OO4OSYSDATE.ASP
    =============
    <%
    Set objOraSession = Server.CreateObject("OracleInProcServer.XOraSession")
    Set objOraDatabase = objOraSession.OpenDatabase("geoff10204","scott/tiger",cint(0))
    Set objRS = objOraDatabase.CreateDynaset("select sysdate from dual",cint(0))
    response.write "sysdate is " & objRS.fields("sysdate").value
    objRS.close
    objOraDatabase.close
    Set objRS=nothing
    Set objOraDatabase=nothing
    Set objOraSession=nothing
    %>

  • Problem in Creation of Oracle Session in Global.asa

    Dear all,
    I tried to run an ASP example on OO4O and created the following global.asa.
    <OBJECT RUNAT=Server SCOPE=Application ID=OraSession
    PROGID="OracleInProcServer.XOraSession"></OBJECT>
    <SCRIPT LANGUAGE=VBScript RUNAT=Server>
    Sub Application_OnStart
    'Get an instance of the Connection Pooling object and create a pool
    of OraDatabase
    OraSession.CreateDatabasePool 20,40,200,"XXX", "xxx/xxx", 0
    End Sub
    Sub Application_OnEnd
    OraSession.destroyDatabasePool
    End Sub
    </SCRIPT>
    However, the IIS reported the following error when running.
    "An error occurred while creating object 'OraSession'".
    I have used the same connection string on a VB project. The connection works perfectly. Could anyone know why the connection cannot setup on ASP?
    Thank you very much
    Samuel

    I am getting the same problem. If you have found any solution, please let me know.

  • Problem using secondary database, sequence (and custom tuple binding)

    I get an exception when I try to open a Sequence to a database that has a custom tuple binding and a secondary database. I have a guess what the issue is (below), but it boils down to my custom tuple-binding being invoked when opening the sequence. Here is the exception:
    java.lang.IndexOutOfBoundsException
    at com.sleepycat.bind.tuple.TupleInput.readUnsignedInt(TupleInput.java:4
    14)
    at com.sleepycat.bind.tuple.TupleInput.readInt(TupleInput.java:233)
    at COM.shopsidekick.db.community.Shop_URLTupleBinding.entryToObject(Shop
    _URLTupleBinding.java:72)
    at com.sleepycat.bind.tuple.TupleBinding.entryToObject(TupleBinding.java
    :73)
    at COM.tagster.db.community.SecondaryURLKeyCreator.createSecondaryKey(Se
    condaryURLKeyCreator.java:38)
    at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.
    java:546)
    at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.ja
    va:42)
    at com.sleepycat.je.Database.notifyTriggers(Database.java:1343)
    at com.sleepycat.je.Cursor.putInternal(Cursor.java:770)
    at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:352)
    at com.sleepycat.je.Sequence.<init>(Sequence.java:139)
    at com.sleepycat.je.Database.openSequence(Database.java:332)
    Here is my code:
    // URL ID DB
    DatabaseConfig urlDBConfig = new DatabaseConfig();
    urlDBConfig.setAllowCreate(true);
    urlDBConfig.setReadOnly(false);
    urlDBConfig.setTransactional(true);
    urlDBConfig.setSortedDuplicates(false); // No sorted duplicates (can't have them with a secondary DB)
    mURLDatabase = mDBEnv.openDatabase(txn, "URLDatabase", urlDBConfig);
    // Reverse URL lookup DB table
    SecondaryConfig secondaryURLDBConfig = new SecondaryConfig();
    secondaryURLDBConfig.setAllowCreate(true);
    secondaryURLDBConfig.setReadOnly(false);
    secondaryURLDBConfig.setTransactional(true);
    TupleBinding urlTupleBinding = DataHelper.instance().createURLTupleBinding();
    SecondaryURLKeyCreator secondaryURLKeyCreator = new SecondaryURLKeyCreator(urlTupleBinding);
    secondaryURLDBConfig.setKeyCreator(secondaryURLKeyCreator);
    mReverseLookpupURLDatabase = mDBEnv.openSecondaryDatabase(txn, "SecondaryURLDatabase", mURLDatabase, secondaryURLDBConfig);
    // Open the URL ID sequence
    SequenceConfig urlIDSequenceConfig = new SequenceConfig();
    urlIDSequenceConfig.setAllowCreate(true);
    urlIDSequenceConfig.setInitialValue(1);
    mURLSequence = mURLDatabase.openSequence(txn, new DatabaseEntry(URLID_SEQUENCE_NAME.getBytes("UTF-8")), urlIDSequenceConfig);
    My secondary key creator class looks like this:
    public class SecondaryURLKeyCreator implements SecondaryKeyCreator {
    // Member variables
    private TupleBinding mTupleBinding; // The tuple binding
    * Constructor.
    public SecondaryURLKeyCreator(TupleBinding iTupleBinding) {
    mTupleBinding = iTupleBinding;
    * Create the secondary key.
    public boolean createSecondaryKey(SecondaryDatabase iSecDB, DatabaseEntry iKeyEntry, DatabaseEntry iDataEntry, DatabaseEntry oResultEntry) {
    try {
    URLData urlData = (URLData)mTupleBinding.entryToObject(iDataEntry);
    String URL = urlData.getURL();
    oResultEntry.setData(URL.getBytes("UTF-8"));
    catch (IOException willNeverOccur) {
    // Success
    return(true);
    I think I understand what is going on, and I only noticed it now because I added more fields to my custom data (and tuple binding):
    com.sleepycat.je.Sequence.java line 139 (version 3.2.44) does this:
    status = cursor.putNoOverwrite(key, makeData());
    makeData creates a byte array of size MAX_DATA_SIZE (50 bytes) -- which has nothing to do with my custom data.
    The trigger causes an call to SecondaryDatable.updateSecondary(...) to the secondary DB.
    updateSecondary calls createSecondaryKey in my SecondaryKeyCreator, which calls entityToObject() in my tuple-binding, which calls TupleInput.readString(), etc to match my custom data. Since what is being read goes for more than the byte array of size 50, I get the exception.
    I didn't notice before because my custom tuple binding used to read fewer that 50 bytes.
    I think the problem is that my tuple binding is being invoked at all at this point -- opening a sequence -- since there is no data on which it can act.

    Hi,
    It looks like you're making a common mistake with sequences which is to store the sequence itself in a database that is also used for application data. The sequence should normally be stored in separate database to prevent configuration conflicts and actual data conflicts between the sequence record and the application records.
    I suggest that you create another database whose only purpose is to hold the sequence record. This database will contain only a single record -- the sequence. If you have more than one sequence, storing all sequences in the same database makes sense and is safe.
    The database used for storing sequences should not normally have any associated secondary databases and should not be configured for duplicates.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with JFrame , please help !

    hello , all !
    I define a JFrame1 as ancestor
    I set the JFrame's contentPane Layout to borderLayout ,
    and add some component in south , north , and add a menu , in its constructor
    then I define a new JFrame2 inherit from JFrame1, I also add a Jpanel component
    to contentPane center in its constructor !
    but something a wrong , I can't see the Jpanel , only see the components which add in JFrame1?
    this is why ?
    thanks
    /* source code */
    public class JFrame1{
    public JFrame1(){
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    statusBar.setBorder(BorderFactory.createEtchedBorder());
    statusBar.setText("Hello , Young follow! ");
    contentPane.add(statusBar, BorderLayout.SOUTH);
    toolbar = new Toolbar_DataEntry(this);
    contentPane.add(toolbar, BorderLayout.NORTH);
    menubar = new Menu_DataEntry(this);
    this.setJMenuBar(menubar);
    public class JFrame2 extends JFrame1 {
    public JFrame2() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    JPanel bodyPane = new JPanel();
    bodyPane.setDataModule(queryDataSet1);
    queryDataSet1.Opendatabase();
    bodyPane.setBorder(null);
    this.setTitle("Frame Title");
    bodyPane.setBounds(new Rectangle(4, 5, 427, 114));
    contentPane.setPreferredSize(bodyPane.getPreferredSize());
    contentPane.setMinimumSize(bodyPane.getMinimumSize());
    Frame_Resize();

    The problem is that the constructor for JFrame2 does not automatically call the constructor for JFrame1. Therefore the JFrame1 constructor never gets called.
    You must do this yourself with the super() method.
    public JFrame2() {
    super();
    try {
    jbinit();
    catch( Exception e )
    e.printStackTrace();
    Remember that this rule applies to all descendent classes.

  • How can I deal with long sql by the oo4o?

    I am using VB and oo4o to develop a sql executor which is a extention of an old system.
    For some reason, I have to use oo4o v8.1.7 to deal with Oracle Database 8i to 11g.
    But when I send a very long sql(11KB) to it I got a error in the VB enviroment.
    The Err.Description is "automention error. Started object is disconnected by the client.".
    The Err.Number is "-2147417848 ".
    The sql that I send it to the program is a simple select sql that like select a, b, c, substrb(d, 1, 2), substrb(e, 2, 3) .... from A_TBL where A=aa;
    This sql is normally executed by the sqlplus but I got an error by the oo4o.
    When I insert a '' between the 30Xth items, it got exectuted normally.
    ex. select a, b, c, substrb(d, 1, 2), substrb(e, 1, 2) ..... substrb(303th, 3, 4), '', substrb(304th, 1, 2) ... from A_TBL where A = aa;
    How can I deal with this problem? Thanks.

    So how can use this function correctly?By learning what exceptions are, how they're used, and what you can do to deal with them. There's a tutorial here: http://java.sun.com/docs/books/tutorial/essential/exceptions/index.htmlAnd here's a quick overview:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • Cannot OpenDatabase (MSAccess mdb file) using VB6 code on windows8 64 bit machine using office 2013.

    I have a "mdb" file which is created long back in MSAccess 97 or 2000. I am using Office 2013.
    When I tried to open the mdb file from my application using below code written in VB6, It works fine in Windows 7 64 bit machine but It is not working in Windows 8 64 bit machine.
    If I use office 2010 again same code works fine in both Windows 7 and 8 64 bit machines.
    Set gWork = DBEngine.CreateWorkspace("", "admin", "", dbUseJet)
    Set gCache = gWork.OpenDatabase(DataPath & fFilePath & "\connec00.mdb")
    I have a referenced "Microsoft DAO 3.51 Object Library" for the code.
    I tried changing it to "Microsoft DAO 3.6 Object Library" also but still the problem is not resolved.
    Can anyone please help me in figuring this out ??

    Dear Bruce,
    Thanks for your reply.
    Code was written in VB6. My VB6 application will try to open a "connec00.mdb" file and will read the data in it for displaying in the application.
    For opening the database by the application the code was written like below
    On Error GoTo Herr
    Set gWork = DBEngine.CreateWorkspace("", "admin", "", dbUseJet)
    FLog.Addlog "File exists: Connecting to database..."
    Set gCache = gWork.OpenDatabase(DataPath & fFilePath & "\connec00.mdb")
    Herr:
    FLog.Addlog "Error(Class_Initialize - DataConnector): " + Err.Description + " in " + Err.Source + Chr(10) + Chr(13) + "Init: Going on execution..."
    If I manually open the "mdb" file both in windows 7 64 bit and windows 8 64 bit using MSAccess 2013, I will get  the error
    "cannot open a database created with previous version of your application".
    On Windows 7 64 bit
    Through my VB6 code the mdb file is opened (does not launch MSAccess) by my application and reading is done perfectly which inturns helps the application to display the data in the mdb file. (even though manually if I cannot open)
    On Windows 8 64 bit
    Through my VB6 code the mdb file is not able to open the database by my application.
    It is going to Herr: part when it tries comes to that "OpenDatabase" step and it prints nothing in the log (Err.Description )also.
    (This is seen only for Windows 8 64 bit) . In Windows 7 64 bit Herr part does not even hit.
    Configuration wise I have checked both are same. Please let me know in case of furthur clarification or anything if I miss..
    Thanks for your co-operation.

Maybe you are looking for

  • 1GB shuffle shows only 489.8mb in iTunes?!

    I just got a new (to me) 1st gen iPod shuffle with 1GB, but when I sync it in iTunes, it says that it only has 489.8 MB available--I wonder whether I accidentally got one that was only 512K? Why would I not be seeing the entire 1GB? It holds up to 24

  • Lens correction bug, bad artifacts with contrast adjustments...

    Something has changed between LR3 and LR4 in the processing chain for lens corrections.  Doing an extreme correction (e.g. using a LCP for a fisheye lens) with increased contrast causes bad halos at contrast edges.  The effect doesn't occur with the

  • ITunes has changed MP3 files to MP4a

    Tried to convert the mp4a files back to mp3 via "create new version" but continues to make mp4a copies! Ditto for converting AAC files.

  • Combining Tracks - Silly question

    I rent a lot of books on tape from my library and upload them to iTunes. Needless to say it's extremely unorganized in my library and on my iPod because, unlike purchased books, they are all in seperate 3 minute tracks. Is there ANY way to combine a

  • HT3529 how to select and copy text on iphone 4

    How to select,   copy  and send part of a txt message.