Import script (SQL to FDM) - ConnectionRead error

Hi,
I have written an import script in FDM to load data from a SQL view. This script works fine when loading approx 5,000 rows, however, fails when trying to load 20k+ rows
The error message I am receiving is:
Detail: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
At line: 72
Line 72 = rs.movenext 'moves to the next record in the SQL view.
I have tried ignoring a few columns in the import script (to reduce the data volume) - this works, however I need all columns.
Below is a copy of the script:
Function COG1_BrandPL(strLoc, lngCatKey, dblPerKey, strWorkTableName)
Dim cnSS 'ADO connection object
Dim strSQL 'SQL string
Dim rs 'Source (Cognos) recordset
Dim rsAppend 'FDM recordset
'Initialize ADO objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
'Open FDM table recordset for appending
Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
'Connect to SQL Server database
cnSS.open "Driver={SQL Server};Server=XXXXXXXXX;OLE DB Services =-2;Database=XXXXXX;Uid=USER;Pwd=PASSWORD;"
'Create SQL query string
strSQL = "Select * FROM Corporate_PLUOP_view"
'Open source recordset
rs.Open strSQL, cnSS
'Check for data in source system
If rs.bof AND rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No records to load!"
COG1_BrandPL = False
Exit Function
End If
'Loop through source records and append to FDM table
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = lngCatKey
rsAppend.Fields("PeriodKey") = dblPerKey
rsAppend.Fields("DataView") = "YTD"
'From Cognos
rsAppend.Fields("UD3") = rs.fields("Cube").value
rsAppend.Fields("Entity") = rs.fields("Entity").value
rsAppend.Fields("UD1") = rs.fields("Custom1").value
rsAppend.Fields("Account") = rs.fields("Account").value
rsAppend.Fields("ICP") = rs.fields("ICP").value
rsAppend.Fields("UD2") = rs.fields("Custom2").value
rsAppend.Fields("Amount") = rs.fields("QPR_Value").value
rsAppend.Update
rs.movenext
Loop
End If
rs.close
cnSS.close
'Assign Return value
COG1_BrandPL = True
End Function
The only other thing I have tried is copying and pasting the script to Excel.... This works for ALL rows... so seems to be a communication issue between FDM and SQL?
Any ideas?

Bit more info:
I am using FDM 9.3.1
SQL Server 2005 on Windows 2003 Enterprise x64
Here's a copy of the FDM error log:
** Begin FDM Runtime Error Log Entry [2010-01-13-12:14:55] **
ERROR:
Code......................................... -2147467259
Description.................................. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
At line: 75
Procedure.................................... clsImpProcessMgr.fLoadAndProcessFile
Component.................................... upsWObjectsDM
Version...................................... 931
Thread....................................... 12432
IDENTIFICATION:
User......................................... HFM-Cognos1
Computer Name................................ DEFMDHY9A01
App Name..................................... CognosTest
Client App................................... WebClient
CONNECTION:
Provider..................................... ORAOLEDB.ORACLE
Data Server..................................
Database Name................................ HFM9UAT
Trusted Connect.............................. False
Connect Status.. Connection Open
GLOBALS:
Location..................................... COGNOS1
Location ID.................................. 750
Location Seg................................. 3
Category..................................... ACTUAL
Category ID.................................. 13
Period....................................... Jun - 2009
Period ID.................................... 30/06/2009
POV Local.................................... False
Language..................................... 1033
User Level................................... 1
All Partitions............................... False
Is Auditor................................... False
Edited by: PaulScrivens on 13-Jan-2010 03:26

Similar Messages

  • Importing Script file for speech analysis - error message

    I'd love to get some assistance to get past an error message in Premiere Pro CC, "Matching scene number not found".  However, I've named the scene number and the clip to match, simply as "1".  What am I missing?  NOTE:  the scene is 33 pages long as this is a long speech that I've transcribed and would like to match up to the video clip . . . just in case that is an issue that someone has experienced in the past.  But I'm hoping length of clip isn't a problem (as this is a typical work flow scenario for me).

    Hi,
    Even I am getting the same error while importing the .zip file for the second time through B2B console-->Administration-->Import/export tab.
    But again it works for the third time..
    Error Message:
    Import of file OriginalProject.zip failed. MDS-00521: error while reading document /soa/b2b/tpa_MnjhBHh-70301432125893445241.xml from metadata repository MDS-00520: failure to read document /soa/b2b/tpa_MnjhBHh-70301432125893445241.xml because it is not in the metadata repository MDS-00911: Document with name "/soa/b2b/tpa_MnjhBHh-70301432125893445241.xml" and version 34 does not exist in the repository. ORA-01403: no data found ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 407 ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 603 ORA-06512: at line 1 ORA-01403: no data found ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 407 ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 603 ORA-06512: at line 1 ORA-01403: no data found ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 407 ORA-06512: at "DEV_MDS.MDS_INTERNAL_SHREDDED", line 603 ORA-06512: at line 1
    Please help...

  • 1014 - Expected 'End' Error in FDM Import Script

    I've been successful in creating a script. I get the following error :
    1014 - Expected 'End'
    At Line: 43 *(bolded)*
    Can someone please point me in the right direction.
    Thanks
    Function JDE_Entity(strField, strRecord)
    'Oracle Hyperion FDM DataPump Import Script:
    'Created By:     jzm6518
    'Date Created:     10/29/2012 11:42:36 AM
    'Purpose: Concatenate Entity 00089 with Sub_Account for mapping purposes
    'This is the section where variables are assigned
    'strField represents the Original Entity
    'strSubAcct represents the SubAccount field
    'strSubAcct=DW.Utilities.fParseString(strRecord,6,5,vbTab)
    strSubAcct=DW.Utilities.fParseString(strRecord,6,5,",")
    'strLedger represents the Ledger Field
    'strLedger=DW.Utilities.fParseString(strRecord,6,1,vbTab)
    strLedger=DW.Utilities.fParseString(strRecord,6,1,",")
    'strDept represents the dept Field
    'strDept=DW.Utilities.fParseString(strRecord,6,3,vbTab)
    strDept=DW.Utilities.fParseString(strRecord,6,3,",")
    If strField = "00001" or StrField = "1" then
    If strDept = "2" or strDept = "3" or strDept = "4" or strDept = "6" or strDept = "7" or strDept = "8" or strDept = "8" or strDept = "35" then
    JDE_Entity = strField & "." & strDept
    Else
    End If
    Else
    If strField = "00050" or strField = "00055" or strField = "00070" or strField = "00075" then
    If strLedger = "AA" or strLedger = "BA" then
    JDE_Entity = strLedger & "." & strField
    Else
    End If
    End If
    Else
    If strField = "00089" then
    JDE_Entity = strField & "." & strSubAcct
    Else
    End If
    **Else** JDE_Entity = strField
    End IF
    End Function

    This code is really messy and not well structured, so it's no surprise you have an issue. Try the following:
    1) Never have an Else clause in your If statements where you don't actually have an Else condition i.e. line 33, 40 etc
    2) Use a Case statement to replace your outermost If. It will make your code easier to read and probably get rid of your error which will be caused by poorly sequenced/structured If statements.

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • FDM - Integration IMPORT script failed

    Hi,
    We are on 11.1.2.1.
    I am trying to create a import integration script which i took from the FDM admin guide...and i am trying to pull data from Oracle table...
    But i am getting error as "Data access error" and its in the below line when i try to execute the code form the workbench...but when i use the import button in the web its importing....*i beleive its somethign related to the STRWORKTABLENAME and somewhere i read that i need to declare the function FARSTABLE*...but i dont know how as i am pretty novice to that....can you please help me....
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    also when i checked the error log i saw
    *** Begin FDM Runtime Error Log Entry [2012-07-03 07:06:27] ***
    ERROR:
    Code............................................. -2147467259
    Description...................................... ORA-00903: invalid table name
    Procedure........................................ clsDataAccess.farsTableAppend
    Component........................................ upsWDataWindowDM
    Version.......................................... 1112
    Thread........................................... 20228
    Below is the complete code i am using
    Function SI_ActualLoad(strLoc, lngCatKey, dblPerKey, strWorkTableNam)*
    *+'------------------------------------------------------------------+*
    +'Oracle Hyperion FDM IMPORT Integration Script:+
    +'+
    +'Created By: admin+
    +'Date Created: 2012-06-01 01:19:02+
    +'strWorkTableName+
    +'Purpose:+
    +'strWorkTableName+
    *+'------------------------------------------------------------------+*
    Dim cnSS 'ADO connection Object*
    Dim strSQL 'SQL String*
    Dim rs 'Source system recordset*
    Dim rsAppend 'Hyperion FDM recordset*
    Dim monthvar*
    +'Initialize ADO objects+
    Set cnSS = CreateObject("ADODB.Connection")*
    Set rs = CreateObject("ADODB.Recordset")*
    monthvar=Month(Date)*
    +'Open Hyperion FDM work table recordset For appending+
    +'Set rsappend = DW.DataAccess.farsTableAppend(strWorkTableName)+
    +'Connect To Oracle database (our data source)+
    Dim strConn*
    strConn="Provider=ORAOLEDB.ORACLE.1;Data Source=EMDDS392:1521/DEVDBEMD;Database=DEVDBEMD;User id=xxxxxxx;Password=xxxxx"*
    cnss.open strConn*
    +'Create source query String+
    strSQL = "Select * "*
    +'strSQL = strSQL & "FROM STG_SAP_ACTUALS WHERE ACCOUNT NOT LIKE 'NA'"+
    strSQL = strSQL & "from EGETLDB.STG_SAP_ACTUALS where period =SUBSTR(TO_CHAR(SYSDATE-90,'MONTH'),1,5)"*
    +'Open source recordset+
    rs.Open strSQL, cnSS*
    +'Check For data In source system+
    If rs.bof And rs.eof Then*
    +'Give Error message+
    RES.PlngActionType = 2*
    RES.PstrActionValue = "No records To load!"*
    +'Assign Return value of Function+
    SI_ActualLoad = False ' Assign return value of function*
    Exit Function*
    End If*
    +'Loop through source records In database And append To+
    +'Hyperion FDM work table+
    If Not rs.bof And Not rs.eof Then*
    Do While Not rs.eof*
    rsAppend.AddNew*
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey*
    rsAppend.Fields("CatKey") = RES.lngCatKey*
    rsAppend.Fields("PeriodKey") = RES.dblPerKey*
    rsAppend.Fields("DataView") = "YTD"*
    rsAppend.Fields("CalcAcctType") = 9*
    rsAppend.Fields("Amount") = rs.fields("GROUPCURRENCY").Value*
    rsAppend.Fields("Account") =UCase(rs.fields("ACCOUNT").Value)*
    rsAppend.Fields("Entity") = UCase(rs.fields("ENTITY").Value)*
    rsAppend.Fields("UD1") = UCase(rs.fields("SCENARIO").Value)*
    rsAppend.Fields("UD2") = rs.fields("VERSION").Value*
    rsAppend.Fields("UD3") = rs.fields("CURRENCY").Value*
    rsAppend.Fields("UD4") = rs.fields("TRANS_CURRENCY").Value*
    rsAppend.Fields("UD5") = rs.fields("ZONE").Value*
    rsAppend.Fields("UD6") = rs.fields("CATEGORY").Value*
    rsAppend.Fields("UD7") = rs.fields("SCHEDULE").Value*
    rsAppend.Fields("UD8") =UCase(rs.fields("DEPT_PRJCTS").Value)*
    rsAppend.Fields("UD9") =rs.fields("WBSELEMENT").Value*
    rsAppend.Fields("UD10") = rs.fields("DOC_DETAIL").Value*
    rsAppend.Fields("UD11") = rs.fields("BUSINESS_TRANSACTION").Value*
    rsAppend.Fields("UD12") = rs.fields("VENDOR_NAME").Value*
    rsAppend.Fields("UD13") =rs.fields("RECOVERYINDICATOR").Value*
    rsAppend.Fields("UD14") = rs.fields("TRANSAMOUNT").Value*
    rsAppend.Fields("UD15") = rs.fields("GROUPCURRENCY").Value*
    rsAppend.Fields("UD16") = rs.fields("SEGMENTNO").Value*
    rsAppend.Fields("UD17") = rs.fields("PARTNEROBJECT").Value*
    rsAppend.Fields("UD18") =rs.fields("PO").Value*
    rsAppend.Fields("UD19") = rs.fields("QUANTITY_UOM").Value*
    rsAppend.Fields("UD20") = rs.fields("DESCRIPTION").Value*
    rsAppend.Fields("DESC1") = rs.fields("ACCOUNT_DESCRIPTION").Value*
    rsAppend.Update*
    rs.movenext*
    Loop*
    End If*
    +'Give success message+
    RES.PlngActionType = 6*
    RES.PstrActionValue = "SQL Import successful!"*
    +'Assign Return value+
    SI_ActualLoad = True*
    End Function*

    Per my answer on Network 54 you cannot test the script interactively in FDQM workbench. You must execute the integration script as part of the normal data load process.
    Per the FDM Admin guide: "Integration scripts can be run only by selecting Script from the File Type column of the Import Group grid (top grid) of the Import Formats screen".
    As I mentioned in my Network 54 post you can test the pure vbscript portions (without the FDQM specifics) to confirm that is working properly then add it to the integration script which will only run as part of a normal file import process.
    Regards,
    John A. Booth
    http://www.metavero.com

  • FDM Import Script

    Hi,
    i'm new making import scripts to FDM. I m making an integration script between SAP and FDM. I m getting information from via web FDM, the problem is when i a m trying to add this information to the workTable. The code is as follows:
    for i = 0 to tData.Rowcount
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName1)
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("Entity") = arrayResult(19)
    rsAppend.Fields("Account") = arrayResult(0)
    rsAppend.Fields("Desc1") = arrayResult(0)
    rsAppend.Fields("ICP") = "[None]"
    rsAppend.Fields("Amount") = saldoTotal
    rsAppend.Update
    next
    Whe i execute this script i just receive an error message saying: "Error: Import Failed", nothing appears in the Error log, neither in the work table.
    Can anyone help me? Does anybody know what can i do to add these records in the work table?
    Thanks in advance.
    Regards.

    How are you getting the table name for variable strWorkTableName1?
    I'd suggest taking another look at the admin guide. There is an example import integration script in that document.

  • Schedule a SQL Integration Import Script

    Hey Everyone! I need some help from the FDM community.
    I am currently using FDM 11.1.2.1 and using the Hyperion Essbase adapter to load data to a Planning/Essbase application. I have successfully created a SQL integration import script that connects directly to Oracle EBS, and have manually tested the process up-to-check of the workflow. However, I would like to schedule this process on a nightly basis. I am aware of the batch processing task scheduler and have used it previously, but I am obviously not dumping flat files into the OpenBatch directory nor am I using the Custom General script usually associated with Batch Processing. So, is there a Custom General script that I can use to call on the import integration script so I can schedule such a process?
    Please let me know, and thank you for your time!
    Sincerely,
    Craig

    You can do this with the batch. You just create a blank text file with the proper naming convention for the POV you are going to kick off the integration script for and place it in Open batch. The batch will then execute the integration script for the POV when executed.

  • FDM - Building Integration Import Scripts

    Hi All,
    I am trying to write an Integration Script to load SQL Server data into FDM 9.3.1. The script initialises a recordset object for the worktable that the source SQL Server data is loaded into.
    The statement at which my script fails is:
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)*
    I have followed the sample script documented in the FDM Admin Guide.
    Does anyone have ideas as to why the script fails at this statement?
    Thanks,

    Hi everyone,
    I was wondering if sending the sample code would help get a clearer picture....
    Function CTIDB2Test(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Hyperion FDM Integration Import Script:
    'Created By:     admin
    'Date Created:     2/19/2009 1:16:59 PM
    'Purpose: This import integration script connects to the CentroODS database
    ' and imports Actuals data from the generalLedgerMasterFile and glMasterAccount table into FDM
    Dim cnSS 'ADO Connection object
    Dim strSQL ' SQL String
    Dim rs ' Source System recordset
    Dim rsAppend ' FDM recordset
    Dim sPOVString
    Dim sPOVPeriod
    Dim sDataCol
    ' Initialise the ADO objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.RecordSet")
    Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
    The script fails at the statement:
    Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
    Thanks

  • How to use import script with FDM using adapter ERPI?

    Hi,
    I use FDM and ERPI 11.1.2 to load data from EBS R12 to Planning 11.1.2
    Data loaded from eBS are YTD data.
    I have seen that I could use an import script to calculate manually the amount with the periodic_net_cr and periodic_net_dr fields.
    But how to use this import script? Because in my import format in FDM, I don't use a file but directly the adapter, so no "Expression" field.
    Thanks in advance for your help
    Fanny

    Hello Fanny,
    No you will not need to put anything in the BatchAction. If you review the FDM API Documentation posted it will outline all the scripts that will execute for a particular event ... and the order in which they execute. The BatchAciton only affects the execution of the batch ... it does not control processing of data. Processing of data is controlled by many others.
    There is a script that can be written and placed (as Tony mentioned) in the ImportAction that will be able to recaculate the values from ERPi to be YTD values. You can possibly open an SR and a support Engineer can help you .... or you can search the current KM base and use that information there from the v11.1.1.3.00 version to build your own for v11.1.2.x
    Thank you,

  • FDM import script with selectable source file

    Hi All,
    I would like to build an import script attached to an import format that imports a text file with multiple value columns.
    Source file:
    Entity, Detail, Account 1, Account 2
    E_abc, D_abc, 100, 200
    In FDM this needs to be:
    Entity, Detail, Account, Amount
    E_abc, D_abc, Account 1, 100
    E_abc, D_abc, Account 2, 200
    So i need to loop through the file.
    My biggest challenge is that when i attach a script to an import format in the import process i cannot select a file from inbox anymore, it has to be a pre-defined file.
    Has someone an example or solution how to make a script-import format and enable the select file from inbox?
    And if possible has someone an example script of the issue stated above?
    Thanks in advance,
    Marc

    Hi Wayne..
    Thanks for your reply (and sorry for the delay in mine).
    Could you tell me what script to use to open the file in the befImport script, or how to rename the file in memory to a new one?
    So i write a script that rewrites the file to a new file in the inbox but i need to tell FDM that it needs to process this new file.
    Thanks,
    Marc

  • Connection error using import java.sql.*;

    I have a very strange error. See the code below:
    import java.sql.*;
    import java.lang.*;
    class a7 {
    public static void main(String args[]) {
    String kolom,ko = new String();
    String db = "devarbn1";
    String url = "jdbc:odbc:"+db;
    String login = "arbor";
    String password = "arbor123";
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String BasisQuery = "select COLUMN_NAME " +
    " from all_tab_columns " +
    " where table_name = ? ";
    System.out.println("Database: " + db);
    Connection con;
    try { 
    Class.forName(driver);
    } catch (java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,login,password); //this line gives an error!!!
    and so on.....
    This is a fragment of the whole program. All of a sudden I cannot compile it anymore using jdk1.3 or jdk 1.4 (I never had compiling problems before with this program)
    It gives the following error message: incompatible types, found Connection.
    I haven't got a clue what went wrong. I have a lot of other java files in which a connection is involved. I cannot compile any of them anymore. Even reinstalling jdk1.4 or 1.3 doesn't help. Can anyone please help me?
    Thanx, debeumers

    Yes, the whole message is:
    incompatible types found : java.sql.Connection required : Connection.
    The whole code is (it is from a different java file then the code I used before)
    import javax.sql.*;
    import java.sql.*;
    import java.lang.*;
    public class Connection {
    static final String arb_nl = "arbornl";
    static final String arb_fr = "arborfr";
    static final String clar_nl = "clarnl";
    static final String clar_fr = "clarfr";
    static final String po = "pcnlpp";
    static final String user_clar_nl = "report";
    static final String pass_clar_nl = " r3p0rt";
    static final String user_clar_fr = "report";
    static final String pass_clar_fr = " r3p0rt";
    static final String user_arb_fr = "report";
    static final String pass_arb_fr = " r3p0rt";
    static final String user_arb_nl = "report";
    static final String pass_arb_nl = " r3p0rt";
    static final String user_po_nl = "report";
    static final String pass_po_nl = "r3p0rt";
    static boolean a = true;
    static boolean b = true;
    static boolean c = true;
    static Connection conarb,conclar,conpo;
    static String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String loginarb = user_arb_nl;
    String passwordarb = pass_arb_nl;
    String loginclar = user_clar_nl;
    String loginpo = user_po_nl;
    String passwordpo = pass_po_nl;
    String passwordclar = pass_clar_nl;
    public Connection() {
    public void makeConnection(String database,String user,String password,String type) {
    String url = "jdbc:odbc:" + database;
    try { 
    Class.forName(driver);
    } catch (java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    a = false;
    try { if (type=="ARB")  { conarb = DriverManager.getConnection(url,user,password);} //giving the problem!!
    if (type=="CLAR") { conclar = DriverManager.getConnection(url,user,password);} //giving the problem!!
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    b = false;
    /* try { if (type=="PO") {conpo = DriverManager.getConnection(url,user,password);}
    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage()); c = false;}*/
    I hope you can help..
    Thanks...debeumers

  • ORA-06502: PL/SQL: numeric or value error : Not able to run a script

    Hi All,
    I want to run a script like this:
    DECLARE
    I_so_status_dtl     RIB_SOStatusDtl_REC;
    BEGIN
    I_so_status_dtl := RIB_SOStatusDtl_REC('0'     --Cust Order No
                   ,'1000000014'     --Dest ID
                   ,'100010222'     --Item ID
                   ,1          --Order Line Number
                   ,1          --Unit Quantity
                   ,'R'          --Status
                   ,'RMS12DEV'     --User ID
                   ,'06-May-2001'     --Updated Date
    End;
    I am trying to run this script. Actually this script is supposed to generate an XML message, which I require. Here's the definition for the TYPE RIB_SOStatusDtl_REC:
    create or replace TYPE RIB_SOStatusDtl_REC UNDER RIB_OBJECT (
         cust_order_nbr     VARCHAR2(10),
         dest_id     VARCHAR2(10),
         item_id     VARCHAR2(25),
         order_line_nbr     NUMBER(3),
         unit_qty     NUMBER(12,4),
         status     VARCHAR2(2),
         user_id     VARCHAR2(10),
    updated_date DATE,
         overriding member procedure appendNodeValues( i_prefix in varchar2)
    ,constructor function RIB_SOStatusDtl_REC (rib_oid number, cust_order_nbr VARCHAR2, dest_id VARCHAR2, item_id VARCHAR2, order_line_nbr NUMBER, unit_qty NUMBER, status VARCHAR2) return self as result
    ,constructor function RIB_SOStatusDtl_REC (rib_oid number, cust_order_nbr VARCHAR2, dest_id VARCHAR2, item_id VARCHAR2, order_line_nbr NUMBER, unit_qty NUMBER, status VARCHAR2, user_id VARCHAR2) return self as result
    This TYPE has a body which actually generates an XML message.
    But whenever I am trying to run this, I am getting the following message:
    Error report:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 6
    06502. 00000 - "PL/SQL: numeric or value error%s"
    *Cause:   
    *Action:
    Therefore I am not able to run the following script. Here I am passing hard coded value within the TYPE, as I have run similar kind of scripts, which accepts this and creates an xml message. Can anyone help me what's the wrong with this script?
    Thanks & Regards,
    Debabrata

    Hi,
    Create one constructor same as with 8 parameters as you have constructor for only 7 and 8 9 parameters.
    Regards
    RK

  • Error at Script Editor - ORA-06502: PL/SQL: numeric or value error

    Hello everyone,
    This is my last call for help. I have made some research before i decided to create this thread, trying to find similar problems on the web and on this forum but it seems that this kind of error is associated with another type of situations. In addition, i am pretty new to Oracle DBMS and i do not know how to figure out some problems that happens in this DBMS. This one is very ridiculous because it happens when i load or create a script in Oracle Script Editor. This might be a bug for Oracle Developers figure out and correct for the next releases or updates (or not..).
    Working on:
    Oracle Database 10g Express Edition (Fresh installation - Yesterday)
    Application Express 2.1.0.00.39 (Might be useful information) Windows XP
    Problem:
    I have a script which allows to create a new database with some tables, relations and data filled in. I go to DB Homepage and login, go to Script Scripts menu and upload the script. I open the script to run it and when the Script Editor load it shows this: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    <table style="display:none;position:absolute;background-color:#EEEEEE;border:#000000 solid 1px;padding:0px;text-align:center;font-size:12px;color:#000000;" summary="" cellpadding="0" cellspacing="0" border="0" id="R138352509674476936">
    <tr>
    <td class="htmldbWizardHeader">Save Script</td>
    <td class="htmldbWizardHeader" align="right"><span><img src="/i/qb/vertical_close.png">
    </span></td>
    </tr>
    <tr>
    <td colspan="2" class="htmldbWizardBody">
    <div id="saveDialog">A script with this name already exists. Do you wish to overwrite it?</div>
    <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td align="right"><input type="button" value="Cancel" class="htmldbButton">
    <input type="button" value="Yes" class="htmldbButton">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="right">???</td>
    </tr>
    </table>
    <table summary="">
    <tr>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11141129549203626">
    <input type="hidden" name="p_t09" value="" id="OB_OBJECT_NAME">
    </td>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11143605700225196">
    <input type="hidden" name="p_t10" value="" id="P0_PPRTIMESTAMP">
    </td>
    <td width="15">
    <div style="width:15px"><br>
    </div>
    </td>
    <td id="htmldbRegion3" class="htmldbTDRight" width="100%" valign="top"></td>
    </tr>
    </table>
    <div id="htmldbRegion4"></div>
    <div class="htmldbFlowV">Application Express 2.1.0.00.39</div>
    <div class="htmldbNewBottom">
    <div class="htmldbNewBottom1">Language: pt</div>
    <div class="htmldbNewBottom2">Copyright ? 1999, 2006, Oracle. All rights reserved.</div>
    <br style="clear:both;">
    </div>
    <form><input type="hidden" name="p_md5_checksum" value="">
    </form>
    <a name="END"><br>
    </a> <script language="JavaScript1.1" type="text/javascript">
        first_field('P60_SCRIPT_NAME');
    </script> The first line seems to be the error: boldORA-06502: PL/SQL: numeric or value error: character string buffer too small*bold*.
    However i don't understand why shows the HTML code. Seems to be the code related with the rest of the Oracle DB webpage where the script in filled in (check this two images to understand what i am trying to say: http://img146.imageshack.us/img146/3104/errororacle10g.jpg and http://img180.imageshack.us/img180/5185/scripteditornormal10g.jpg. This is what Script Editor shows on Internet Explorer.
    If i login and make the same in another browser the behavior is different. In Firefox the script editor don't show anything and with Chrome i get all the script instructions in a single line (it exceeds the Script Editor) and the Script Editor background turns red: http://img812.imageshack.us/img812/1382/oracleerrorchrome.jpg I tested some scenarios and i got other conclusions: When i try to create a script in the Script Editor, whatever i write (instructions or whatever) when i save and load the file shows the same error. I uploaded the script many times with different File Character Set and the error shows in all situations.
    Edited by: 806529 on Nov 1, 2010 3:38 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM

    The script that i am trying to run is this: (I think the script is not relevant because many class mates can upload and run it successfully on their Oracle Express 10g installed on Windows 7 or XP)
    drop table alunos cascade constraints;
    create table alunos (alu_id number(10) not null,
                   alu_nome varchar2(60) not null,
                   alu_local varchar2(30),
                   alu_dnsc date not null,
                   alu_sexo char(1) not null,
                   alu_email varchar2(30),
                   alu_cur_id number(10));
    drop table cursos cascade constraints;
    create table cursos (cur_id number(10) not null,
                   cur_nome varchar2(40) not null);
    drop table departamentos cascade constraints;
    create table departamentos (dep_id number(10) not null,
                          dep_nome varchar2(60) not null,
                          dep_sigla char(3) not null);         
    drop table disciplinas cascade constraints;
    create table disciplinas (dis_id number(10) not null,
                        dis_nome varchar2(40) not null,
                        dis_creditos number(1) not null,
                        dis_dep_id number(10));
    drop table planoestudos cascade constraints;
    create table planoestudos (pla_cur_id number(10) not null,
                          pla_dis_id number(10) not null,
                          pla_semestre number(1) not null);          
    drop table inscricoes cascade constraints;
    create table inscricoes (ins_id number(10) not null,
                    ins_alu_id number(10) not null,
                    ins_pla_cur_id number(10) not null,
                    ins_pla_dis_id number(10) not null,
                    ins_dt_inscricao date not null,
                    ins_dt_avaliacao date,
                    ins_nota number(4,2) );
    -- Chaves primárias               
    alter table alunos add constraint pk_alunos primary key (alu_id);              
    alter table cursos add constraint pk_cursos primary key (cur_id);
    alter table departamentos add constraint pk_departamentos primary key (dep_id);
    alter table disciplinas add constraint pk_disciplinas primary key (dis_id);
    alter table planoestudos add constraint pk_planosestudos primary key (pla_cur_id, pla_dis_id);
    alter table inscricoes add constraint inscricoes_pk
                primary key (ins_id);
    -- Chaves estrangeiras
    alter table alunos add constraint alunos_fk_cursos
                foreign key (alu_cur_id) references cursos(cur_id);
    alter table disciplinas add constraint disciplinas_fk_departamentos
                foreign key (dis_dep_id) references departamentos(dep_id);
    alter table planoestudos add constraint planoestudos_fk_cursos
                foreign key (pla_cur_id) references cursos(cur_id);           
    alter table planoestudos add constraint planoestudos_fk_disciplinas
                foreign key (pla_dis_id) references disciplinas(dis_id);           
    alter table inscricoes add constraint inscricoes_fk_alunos
                foreign key (ins_alu_id) references alunos(alu_id);
    alter table inscricoes add constraint inscricoes_fk_planoestudos
                foreign key (ins_pla_cur_id,ins_pla_dis_id) references planoestudos(pla_cur_id,pla_dis_id);
    -- Sequências
    drop sequence seq_alunos;
    create sequence seq_alunos increment by 1 start with 1;           
    drop sequence seq_cursos;
    create sequence seq_cursos increment by 1 start with 1;
    drop sequence seq_disciplinas;
    create sequence seq_disciplinas increment by 1 start with 1;
    drop sequence seq_departamentos;
    create sequence seq_departamentos increment by 1 start with 1;
    -- Informação
    insert into cursos values(seq_cursos.nextval,'Engenharia Biomédica');
    insert into cursos values(seq_cursos.nextval,'Engenharia Informática');
    insert into cursos values(seq_cursos.nextval,'Engenharia Electrónica e Computadores');
    insert into cursos values(seq_cursos.nextval,'Engenharia do Ambiente');
    insert into alunos values(seq_alunos.nextval,'Joaquim Pires Lopes','lisboa',to_date('85.01.01','YY.MM.DD'),'M','[email protected]',2); 
    insert into alunos values(seq_alunos.nextval,'Ana Maria Fonseca','Setúbal',to_date('87.03.03','YY.MM.DD'),'F','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Paula Antunes','Lisboa',to_date('86.07.06','YY.MM.DD'),'F',null,2); 
    insert into alunos values(seq_alunos.nextval,'Joana Ramalho Silva','Costa da Caparica',to_date('84.09.23','YY.MM.DD'),'F','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Rui Manuel Silva','Cascais',to_date('84.08.15','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'João Paulo Santos','Lisboa',to_date('81.11.16','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Cristina Fernandes Lopes','Lisboa',to_date('86.01.07','YY.MM.DD'),'F',null,1); 
    insert into alunos values(seq_alunos.nextval,'Miguel Pinto Leite','Cascais',to_date('74.01.07','YY.MM.DD'),'M','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Francisco Costa Rosa',null,to_date('78.02.16','YY.MM.DD'),'M',null,4); 
    insert into alunos values(seq_alunos.nextval,'Elsa Fialho Pinto','Palmela',to_date('79.10.29','YY.MM.DD'),'F','[email protected]',1); 
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Sistemas e Informática','DSI');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Engenharia Electrotécnica', 'DEE');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Matemática','DEM');   
    insert into disciplinas values(seq_disciplinas.nextval,'Introducao a Programacao',4,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Inteligência Artificial',3,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Redes de Computadores',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Base de Dados',6,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Complementos de Base de Dados',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise de Sistemas',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Distribuídos',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Digitais',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Microprocessadores',2 ,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Electrónica Geral',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática I',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática II',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Aplicações Multimédia',6,1);
    insert into planoestudos values(1,1,1);
    insert into planoestudos values(1,2,4);
    insert into planoestudos values(1,3,4);
    insert into planoestudos values(1,4,3);
    insert into planoestudos values(1,5,5);
    insert into planoestudos values(1,6,2);
    insert into planoestudos values(1,7,5);
    insert into planoestudos values(1,8,6);
    insert into planoestudos values(1,11,1);
    insert into planoestudos values(2,1,1);
    insert into planoestudos values(2,4,5);
    insert into planoestudos values(2,8,3);
    insert into planoestudos values(2,9,2);
    insert into planoestudos values(2,10,1);
    insert into planoestudos values(2,11,3);
    insert into planoestudos values(3,1,3);
    insert into planoestudos values(3,11,4);
    insert into planoestudos values(3,12,5);                                                             
    insert into planoestudos values(4,1,3);
    insert into planoestudos values(4,4,4);
    insert into planoestudos values(4,11,4);
    insert into planoestudos values(4,12,5);       
    insert into inscricoes values(1,1,2,1,TO_DATE('3-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(2,1,2,8,TO_DATE('5-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(3,1,2,9,TO_DATE('6-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(4,2,1,1,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),11);
    insert into inscricoes values(5,2,1,11,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(6,2,1,4,TO_DATE('5-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(7,3,2,1,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);
    insert into inscricoes values(8,3,2,9,TO_DATE('6-SEP-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(9,4,3,12,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(10,5,1,1,TO_DATE('7-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(11,6,1,1,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(12,6,1,11,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(13,7,1,1,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('10-FEB-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(14,7,1,11,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('7-MAR-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),17);
    insert into inscricoes values(15,7,1,4,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-JUL-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(16,7,1,2,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(17,8,3,12,TO_DATE('11-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),14);
    insert into inscricoes values(18,9,4,1,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(19,9,4,11,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(20,9,4,12,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(21,10,1,11,TO_DATE('11-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-FEB-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(22,10,1,1,TO_DATE('12-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);~
    commit;

  • Velocity demo: error running the import scripts

    I tried to install velocity demo,
    when I run import scripts (mydemo_schema.dmp) I get the
    following error:
    IMP-00010: not a valid export file, header failed verification
    IMP-00000: Import terminated unsuccessfully
    Did someone test it successfully ? Or is file corrupted ?
    Mario

    You need to use import from a 902 database install.
    Mike
    ----

  • FDM Account Import Script

    Dear All,
    I am trying to write a script in account expression. This exp would pick account code which starts with digit "4", if yes then custom 1 dimension is [None].
    Function AccImport(strField, strRecord)
    if left(varvalue(13),1) ="4" Then
    varvalue(20)=[None]
    End If
    End Function
    This is the sample script i have written within data pump function
    Can any body please help me in writting what should be the right script to this working.
    Prince

    In your import format on the Custom1 dimension add an import script to the Expression column.
    Your source record strRecord has the Account value in it you just need to parse it out using DW.Utilities.fParseString. Then check if it starts with a "4" and if so have the script return "None" or else return the value in strField i.e. your original Custom1 source value.
    There are plenty of examples of these techniques in the FDM Admin guide in the scripting section. Have a go at writing it yourself it will be much more useful in the long run than me writing the script here.

Maybe you are looking for

  • Scheduling Agreement-View Changes Made with a T-code

    Dear All, I have a requirement wherein our client wants to view the changes or updation that has happened over a period of time in the scheduling agreement, ie changes in quantity and changes in dates. For example; we have MM04 wherein we can see the

  • Using Calende in a JSP

    Hi i need to use a calender in a JSP page instead of using text box which need more validations thanks alot

  • How to check for locks on a table inside a program?

    Hi Gurus, Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass

  • Data sources in IS-U

    Hi, There is a structure called as EWA_VBSD Screen Fields for IS-W Enhancement of Premise in IS-U. Is there any standart datasource that uses this structure, if so, how can i find it? One more question; is there any transaction code, table or documen

  • How can I access to a query

    Hello, I have not so much experience in WebDynPro but I must do something in it. Does anybody of you know, how I can acces to a BW query in in WebDynPro? I have read in some books, but I have not found anything to do this. If somebody can help me, I'