Convert ActiveX DTS script task to SSIS Script task - Please help

Hello,
I Have a ActiveX script that was used in a DTS package but I'm currently trying to convert all my DTS packages to SSIS.The script is tasked to run the package on a daily basis. Everything works fine except the ActiveX script. It gives an error on my DTSGlobalVariables.parent,
I looked up this error and changed it to "DTS.Variables("User::VariableName").Value", in
the SSIS script task (in VB) but now I'm getting error: 
Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The element cannot be found in a collection.
---> System.Runtime.InteropServices.COMException (0xC0010009): The element cannot be found in a collection.
bij Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100.get_Item(Object Index)
bij Microsoft.SqlServer.Dts.Runtime.Variables.get_Item(Object index)
--- Einde van intern uitzonderingsstackpad ---
bij Microsoft.SqlServer.Dts.Runtime.Variables.get_Item(Object index)
bij ST_f32fc12b60f34bebbbdfc0c5e5b40a96.vbproj.ScriptMain.Main()
--- Einde van intern uitzonderingsstackpad ---
bij System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
bij System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bij System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
bij System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
I have tried to convert this ActiveX script into a SSIS script task in VB but I know hardly any VB... So I'm wondering what the best course of action for me is, should I try to convert it into the script task like I am trying now, if so, how do I make it
work?
Any help would be really really welcome.
This is the original ActiveX script that needs to be converted:
' Visual Basic ActiveX Script
Function Main()
Dim sEnvironm
Dim sServer
Dim sSourceFile
Dim sSourcePath
Dim sBackupPath
Dim sErrorPath
Dim sFileName
Dim sUDLPath
' Set vars
' First 2 are depending on the server and db
' FILL IN THE RIGHT VALUES
sEnvironm = "MON_Datamart"
sServer = "BrechtProesmans"
' --- DO NOT CHANGE ANYTHING BELOW THIS LINE ---
sSourceFile = "C:\Program Files\Microsoft SQL Server\MON_Datamart\SourceFiles\tbl_L00T1.txt"
sSourcePath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\SourceFiles\"
sBackupPath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\BackupFiles\"
sErrorPath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\ErrorFiles\"
sFileName = "tbl_L00T1.txt"
sUDLPath = "C:\Program Files\Microsoft SQL Server\MON_Datamart\MON_Datamart.udl"
' Initial
FoundError = False
' Get a handle to the Package object.
Set oPackage = DTSGlobalVariables.Parent
' Update DTSConnections
Set oConnection = oPackage.Connections("tbl_L00T1.txt")
oConnection.DataSource = sSourceFile
Set oConnection = oPackage.Connections("Datamart")
oConnection.UDLPath = sUDLPath
Set oConnection = oPackage.Connections("Truncate")
oConnection.UDLPath = sUDLPath
' Update DTSTasks
Set oTask = oPackage.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask
oTask.SourceObjectName = sSourceFile
oTask.DestinationObjectName = sEnvironm & ".dbo.stg_tbl_L00T1"
' Set Global vars
DTSGlobalVariables("SourcePath").Value = sSourceFile
DTSGlobalVariables("BackupPath").Value = sBackupPath
DTSGlobalVariables("ErrorPath").Value = sErrorPath
DTSGlobalVariables("FileName").Value = sFileName
' Clean up.
Set oTask = Nothing
Set oConnection = Nothing
Set oPackage = Nothing
Main = DTSTaskExecResult_Success
End Function

Set a breakpoint and tell us on what line it dies, at the same time, you can inspect the variable values in the Auto window (if there are) as it merely perhaps is an issue with values not being passed in.
Arthur
MyBlog
Twitter

Similar Messages

  • I just downloaded the free trial of Adobe PDF to Word converter and was not able to convert a PDF file to word. Could anyone please help? Thx

    I just downloaded the free trial of Adobe PDF to Word converter and was not able to convert a PDF file to word. Could anyone please help? Thx

    Part of the problem in helping is likely that there is no program Adobe -- that is the company name. You are in the Acrobat forum, but it sounds like you have subscribed to Export PDF or such, a different program. The subscription to Acrobat is currently $19.99 per month.

  • Issue with Proportional Spreading Script. Please help !

    Hello,
    I have a requirement where I need to write a spreading script for a data form. On this form user will enter data at a parent level and what the script needs to do is spread the parent level input value to the 0 level members proportinally based on the values already existing in the 0 level members.
    Say the account member is “X”. All the other members on the data form in the POV/Page/Rows and Columns are 0 level members except for one that is Product which is in the Page
    Product
    - A
    - B
    I came up with this basic logic for the proportinal spread. Ofcourse I will need to include some logic with IF statement or something else to check if the cell belongs to product A or product B. For now, assuming the value is being input for A so now we need to spread that value at A to 0 level members proportionally.
    “X” = ((“X” -> (@CURRMBR(“Product”)*100)/(Previous Parent Value *100))*”X”->”A”
    Example with numbers:
    Current member cell value = 100 (0 level member for Product A)
    Previous Parent Value = 200 (Value for A)
    New Parent Value = 400 (User inputs this new value by overwriting the previous value 200)
    So, X = ((100*100)/(200*100))*400 = 200
    Now, the logic of the formula makes sense to me and would spread proportionally, but my question is how would we get the “Previous Parent Value to calculate the % as the user will overrite it with a new value = 400 before running the rule. So, we would not have 200 anymore and unless we have it we wont be able to know the % to do a proportional spread.
    I apologize if this is confusing, but please help me with your ideas on how can I achieve this proportional spreading script. I would really appreciate your inputs.
    Thanks!
    ~ Adella

    Hi,
    Have you not asked this earlier?
    Business Rule - Allocation Script Logic - Not working ! Please help.
    But in hindsight, I think there's a little problem with the script I had posted. This was what I suggested:
    SET UPDATECALC ON;
    FIX(“AccountMember”,”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    &Currmonth
    &Currmonth = @PARENT(Product)*(&Currmonth/@SUMRANGE(&Currmonth,@RELATIVE(@PARENT(@Currmbr(Product)),0)));
    ENDFIX;The problem I see here, every time the script calculates a product, the total of the siblings of the product changes and when it calculates the next product, allocation is done based on a different different total. To overcome this, you can try it this way:
    SET UPDATECALC ON;
    FIX(”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    &currmonth(
    @calcmode(bottomup);
    /*copy original values to somewhere else to make sure allocation base doesn't change*/
    "AccountMemberAllocBase"="AccountMember";
    Endfix
    FIX("AccountMember",”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    &Currmonth
    @calcmode(bottomup);
    &Currmonth = @PARENT(Product)*(&Currmonth->"AccountMemberAllocBase"/@SUMRANGE(&Currmonth->"AccountMemberAllocBase",@RELATIVE(@PARENT(@Currmbr(Product)),0)));
    ENDFIX;
    Cheers,
    Alp

  • Strange glitch in my script. Please help!

    I've been working on a script that would help a friend of mine to prep photos for his web-site. It was working just fine until after some small change it suddenly started telling me this: "Cannot open the file because the open options are incorrect". The ExtendScript Toolkit highlights line 44:  var doc = app.open(file);
    I've looked at all variations of the app.open(); function but can't seem to understand what is wrong.
    I'm hoping someone will notice the problem. Thanks in advance!
    #target photoshop
    var outputWidth = 1500; 
    alert("You will now need to select a folder with photos to be processed.");
    var inputFolder = Folder.selectDialog("Select Input folder");
    // Creating a new  subfolder based on user input
    var outputFolder = new Folder(inputFolder + "/" + "PROCESSED"); 
    outputFolder.create();
    var Destination = outputFolder.path + "/" + outputFolder.name;
    // Replacing %20 with space for clean alert
    var CleanDestination = Destination.replace('%20', ' '); 
    var CleanerDestination = CleanDestination.replace('%20', ' '); 
    var startRulerUnits = preferences.rulerUnits; 
    app.preferences.rulerUnits = Units.PIXELS;
    // our web export options
    var options = new ExportOptionsSaveForWeb();
    options.quality = 70;
    options.format = SaveDocumentType.JPEG;
    options.optimized = false;
    options.includeProfile = true;
    if (inputFolder != null && outputFolder != null) { 
        var files = inputFolder.getFiles(); 
        for (var i = 0; i < files.length; i++) { 
            var file = files[i]; 
            var doc = app.open(file); 
            // get a reference to the current (active) document and store it in a variable named "doc"
            doc = app.activeDocument; 
           //get the filename without the extension 
            var Name = app.activeDocument.name.replace(/\.[^\.]+$/, ''); 
           if (doc.height > 1000) {
    //build up the output file name and path 
             var goodFolder = new Folder(outputFolder + "/" + "READY FOR WEB"); 
            goodFolder.create();
            var saveFile = File(goodFolder + "/" + Name + "-web" + ".jpg"); 
    // do the resizing.  if height > width (portrait-mode) resize based on height.  otherwise, resize based on width
            if (doc.height > doc.width) {
            doc.resizeImage(null,UnitValue(outputWidth,"px"),null,ResampleMethod.BICUBIC);
            else {
            doc.resizeImage(UnitValue(outputWidth,"px"),null,null,ResampleMethod.BICUBIC);
    else {
       //build up the output file name and path 
            var smallFolder = new Folder(outputFolder + "/" + "TOO SMALL"); 
            smallFolder.create();
            var saveFile = File(smallFolder + "/" + Name + ".jpg"); 
            doc.convertProfile('sRGB IEC61966-2.1', Intent.RELATIVECOLORIMETRIC, true, true);
            //you need to have a full filepath not a folder 
            doc.exportDocument(/*outputFolder */saveFile, ExportType.SAVEFORWEB, options); 
        doc.close(SaveOptions.DONOTSAVECHANGES); 
            $.writeln('File ' + (i + 1) + ' of ' + files.length + ' processed'); 
    //restore ruler units 
    app.preferences.rulerUnits = startRulerUnits; 
    alert(files.length + " files have been processed into " + CleanerDestination);

    JJMack,
    Right before var doc = app.open(file);  fails to execute, the value of var file is "~/Desktop/Input/.DS_Store", where Input is my folder with images.

  • Java script problem; please help !

    Hi,
    I am selecting value from drop down.As soon as I am selecting the value I am displaying the value in one
    text area. This text area is having already some text.Iam appending the value from drop down to this text area.
    The problem is when I do first time it is fine,but second time when I select value from drop down to
    display in text area. this value is getting appended with the first value.
    I do'nt want the first value.What I want is when second time I select the value from drop down.The
    first selected value get replaced by second value.
    This is the script I am using.
    function emailAdd(item) {
    document.mailForm.to.value =
    item.options[item.selectedIndex].value;
    document.mailForm.content.value ="Email Address:" +
    document.mailForm.to.value
    + '\n' + document.mailForm.content.value
    }Please help me and it would be GREAT that if someone can send me an updated code. Thanks and have a wonderful week-end !!!!
    -sangita

    First and foremost: "JavaScript".equals("Java") not "JavaScript".startsWith("Java")
    That aside, you need to keep the original value...
    var orig = '';
    function emailAdd(item) {
       if(orig == '') {
          orig = document.mailForm.content.value;
       document.mailForm.to.value = item.options[item.selectedIndex].value;
       document.mailForm.content.value =orig + '\n' + document.mailForm.content.value;
    }

  • Logic 8.0.2 Will Not Convert My SF2 to EXS. Any suggestions? Please Help!

    I have tried everything. I put the soundfonts (SF2) in /Library/Application Support/Logic/Sampler Instruments. I tried in both the user and the system libraries numerous times. AKAI discs convert fine to EXS but not SF2. The soundfonts play fine in GarageBand though but not Logic. I am using Logic Pro 8.0.2; please help me!
    Message was edited by: iKenj
    Message was edited by: iKenj

    Bee Jay wrote:
    What is the blahdy diffrence ~twixt the two path-pointing methods?
    /Library/ is the library folder at the root of your hard drive
    ~/Library/ is the library folder in your user area (the tilde is a Unix shortcut which refers to your user home directory) - ie the full path would be /Users/yourusername/Library/
    From my experience... either location works, in fact my root /Library/Application Support/Logic/Sampler Instruments folder is on a separate partition and I use an alias to the above location, seems to work just fine.
    However, I would definitely tries Bee Jay's suggestion (User/Library...) as you have nothing to lose at this point.
    pancenter-

  • I am getting an error report and not sure how to fix the script. Please help...

    I am using action script 3. I have html codes from ccbill that I am trying to make work with flash. Here is the script I am trying to use:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    myButton.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the code from ccbill:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    This is the error report I am getting:
    Scene=photogallery, layer=buttons, frame=1, Line 1 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 3 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 5 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    Scene=photogallery, layer=buttons, frame=1, Line 7 Statement must appear within on handler
    If anyone can help me with this issue I would be most grateful.
    Thank you for any consideration,
    Thomas

    You have a mixture of things going on... AS3 code in an AS2 setting.  Those are all AS2 error messages, and they are indicating you have placed the code on the buttons.  To use that code, it must be placed on the timeline, and your Flash Publish Settings need to have AS3 specified instead of AS2.  AS3 does not allow code to be placed on objects like AS2 does.

  • Swtiched computers and my script broke please help

    Ok, so I have this script running on my Mail.app from a rule action. It worked perfectly. Then I switch to a different computer and it's not working on the new one. Can anyone spot anything in the script that might be causing it -- or have any other ideas?
    [applescript]
    add a mail message to todo.txt
    using terms from application "Mail"
    on perform mail action with messages selectedMsgs
    tell application "Mail"
    repeat with msg in selectedMsgs
    set theSubject to subject of msg
    set theSender to extract name from sender of msg
    set theDate to date received of msg
    set newDate to my new_date(theDate)
    set toText to "@mail @takeaction " & " @" & theSubject & " @date " & newDate
    do shell script "/Volumes/JUMP/todo/todo.sh add " & toText
    end repeat
    end tell
    end perform mail action with messages
    end using terms from
    on new_date(theDate)
    set cDate to theDate
    set shortDate to short date string of cDate
    set theMonth to word 1 of shortDate
    if length of theMonth is 1 then set theMonth to "0" & theMonth
    set theDay to word 2 of shortDate
    if length of theDay is 1 then set theDay to "0" & theDay
    set theYear to (year of cDate) - 2000
    set YYear to "0" & theYear
    set DateString to theMonth & theDay & YYear
    end new_date
    [/applescript]
    PowerBook G4   Mac OS X (10.4)  

    Hi Dara
    As far as I can see the variable selectedMsgs isn't defined anywhere in the script you've posted, but I suspect the error is not being returned by the "on perform mail action" handler, or that selectedMsgs is being silently coerced into an empty list.
    Try this from Script Editor
    using terms from application "Mail"
    on perform mail action with messages selectedMsgs
    tell application "Mail"
    return selectedMsgs
    repeat with msg in selectedMsgs
    -- rest of you script goes here
    The script will stop after the "return" statement in line 4 and should show the value of selectedMsgs as its result. If this is an empty list, there's your problem.
    If not, you may have to temporarily add a few "display dialog" commands to see if the text variables match what you expect. For example
    set newDate to my new_date(theDate)
    display dialog newDate
    etc etc etc.
    Incidentally, your new_date handler will break in 2010. The year will be returned as "010", not "10". Try this instead:
    set YYear to text -2 thru of -1 of (year of cDate as string)
    Hope some of this helps.
    H

  • My fastdial is no longer appearing on a blank tab and every time I click on addons it freezes and has a script error - please help!

    When I click the fastdial button which has appeared on my navigation toolbar - it takes me to chrome://fastdial/content/fastdial.html so I figured that it is chrome that caused the problem.
    When I click on tools/addons I get a script error and a frozen firefox.
    Also can not use any toolbar links and have to type in the address into navigation to get anywhere.
    I don't know what else to try!

    Other users have reported that this is caused by one of their add-ons. I suggest going to the Add-ons page and disabling everything that is not essential, and then restarting Firefox. Hopefully it's not caused by something you really rely on.
    orange Firefox button ''or'' Tools menu > Add-ons
    On the left side, click Extensions
    Then disable as many as possible and restart Firefox.
    Any luck?

  • Apache/CentOS--error: attempt to invoke directory as script. Please help.

    I am running CentOS 4.5 with kernel 2.6.9-55.EL and Apache 2.0.52.
    When I am typing http://linxdell.systems.com to execute index.cgi, I am getting:
    Forbidden
    You don't have permission to access / on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request
    In the error_log I found:
    attempt to invoke directory as script: /var/www/htdocs/
    But if I type http://linxdell.systems.com/index.cgi, it works fine.
    Below is some of my httpd.conf:
    DocumentRoot "/var/www/htdocs"
    <Directory />
    Options FollowSymLinks ExecCGI Indexes
    AllowOverride All
    </Directory>
    <Directory "/var/www/htdocs">
    Options Indexes FollowSymLinks All Multiviews ExecCGI
    SetHandler cgi-script
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    DirectoryIndex generate_page.pl index.html index.htm index.cgi
    ScriptAlias /cgi-bin "/var/www/cgi-bin" (also tried with Alias)
    <Directory "/var/www/cgi-bin">
    AllowOverride All
    SetHandler cgi-script
    Options ExecCGI Indexes
    Allow from all
    </Directory>
    I will really appreciate any help to solve this problem.
    Thanks.

    Hi,
    This is a example for your case:
    <Directory "/var/www/html">
    Options Indexes FollowSymLinks +ExecCGI
    AddHandler cgi-script .cgi .pl .sh
    Order allow,deny
    Allow from all
    </Directory>
    1. add "Options: +ExecCGI"
    2. add "AddHandler cgi-script .cgi .pl .sh"
    Details refer to:
    http://httpd.apache.org/docs/2.0/howto/cgi.html
    Best Regards,
    Sipingal

  • " loading failed please check your page for  java script errors" please Help

    recently my project starts crashing.... when it loads it gives a java scrip error .. saying " loading failed please check your page for  java script errors"

    Hey, If you have an error, you should see the error in Edge and you can correct it. In the window/code there will be a red dot too.

  • I am getting an error report and not sure how to fix the script. Please help... 3

    So now Im getting a new error report. I named the instance of the button in the properties panel btn_ccbil.
    Here is the code I have now:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    btn_ccbil.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the error report:
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    This is the original code for the billing from ccbill I am trying to get to work with flash:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    Is this just something that flash can't do? If so will someone please let me know. I am running in circles at this point and very frustrated... I'm new to as3 but I thought it could work.
    Thank you to all for the help and consideration,
    Thomas

    You appear to be using AS3 code in an AS2 setting.  Go into your Publish Settings and change the actionscript version to AS3 in the Flash section.
    Other matters...
    You do not need to import the URLRequest class while coding in the Flash IDE.
    You need to put an argument in the function definition due to the listeners throwing one when it is triggered...
    function onOrderClick(evt:MouseEvent):void

  • SQL SCRIPT ERROR PLEASE HELP!!!

    DROP TABLE CUSTOMERUSER CASCADE CONSTRAINTS;
    CREATE TABLE CUSTOMERUSER
    ( Username VARCHAR(10) NOT NULL,
    UserID VARCHAR(15) NOT NULL,
    Pword VARCHAR(30),
    Street VARCHAR(15),
    City VARCHAR(15),
    Postalcode VARCHAR(15),
    Phone VARCHAR(10),
    Email VARCHAR(16),
    PRIMARY KEY (Username,UserID));
    DROP TABLE ADMINISTRATOR CASCADE CONSTRAINTS;
    CREATE TABLE ADMINISTRATOR
    ( Username VARCHAR(10) NOT NULL,
    EmployeeID VARCHAR(15) NOT NULL,
    Pword VARCHAR(30),
    AdminType VARCHAR(15),
    PRIMARY KEY (Username,EmployeeID));
    DROP TABLE FLIGHT CASCADE CONSTRAINTS;
    CREATE TABLE FLIGHT
    ( FlightID VARCHAR(10) NOT NULL,
    FlightNumber VARCHAR(15) NOT NULL,
    Airline VARCHAR(30),
    AvailableSeats INT,
    PRIMARY KEY (FlightID));
    DROP TABLE RESERVATION CASCADE CONSTRAINTS;
    CREATE TABLE RESERVATION
    ( ReservationNumber VARCHAR(10) NOT NULL,
    IsPaid VARCHAR(4) NOT NULL,
    dayof VARCHAR(10),
    FlightID VARCHAR(10) NOT NULL,
    UserID VARCHAR(15) NOT NULL,
    PRIMARY KEY (ReservationNumber,UserID),FOREIGN KEY (FlightID) REFERENCES FLIGHT(FlightID),FOREIGN KEY (UserID) REFERENCES customeruser(UserID));
    DROP TABLE PAYMENT CASCADE CONSTRAINTS;
    CREATE TABLE PAYMENT
    ( PaymentID VARCHAR(10) NOT NULL,
    PaymentAmount VARCHAR(15) ,
    PaymentDate VARCHAR(30),
    ReservationNumber INT NOT NULL,
    PRIMARY KEY (PaymentID),FOREIGN KEY (ReservationNumber) REFERENCES RESERVATION(ReservationNumber));
    DROP TABLE FLIGHTSCHEDULE CASCADE CONSTRAINTS;
    CREATE TABLE FLIGHTSCHEDULE
    ( FlightNumber VARCHAR (15) NOT NULL,
    Fromw VARCHAR(25) ,
    Wto VARCHAR(25),
    DepatureDate VARCHAR(10) ,
    ArrivalDate VARCHAR(10),
    Class VARCHAR(10) ,
    DepatureTime VARCHAR(8),
    ArrivalTime VARCHAR (8) NOT NULL,
    PRIMARY KEY (FlightNumber),FOREIGN KEY (FlightNumber) REFERENCES FLIGHT(FlightNumber));
    When i execute the RESERVATION section. it gaving me a error called " *
    ERROR at line 7:
    ORA-02270: no matching unique or primary key for this column-list
    How to fix that?

    in TABLE RESERVATION the FOREIGN KEY (UserID) REFERENCES customeruser(UserID) expects the primary key of TABLE CUSTOMERUSER to be UserID (not PRIMARY KEY (Username,UserID) as in your case) or the TABLE CUSTOMERUSER having an unique index on UserID.
    Regards
    Etbin
    Edited by: Etbin on 3.12.2011 22:22
    You might be sorry defining DepartureDate as VARCHAR2(10) and DepartureTime as VARCHAR2(8) instead of Departure DATE (time component included)
    the same for ArrivalDate in TABLE FLIGHTSCHEDULE
    in TABLE RESERVATION there is dayof VARCHAR(10) too

  • Action script..PLEASE HELP..

    ...hello guys...i really dont know what to do...i have a drop
    down menu here..it is an xml driven menus...and i want to put a
    scroll bar in the submenus....so even if the submenus will be to
    many..it will not go across the movie....PLEASE HELP.. i am really
    new in actionscripting and i dont have any programming
    backgrown...hope for your response...this a vertical dropdown
    menus....

    The link in your message is also broken.

  • How can I animate a bungee rope (timeline animation CS6 - no script)? Please help

    Hi,
    I'm going to be creating a Flash skyscraper web banner (CS6) which has a person bouncing up and down on a bungee rope, but I'm a bit stumped as to how I'm going to achieve this, the rope animation needs to look realistic, elastic with give, curving/bending and then stretching. But I need to do it manually as I'm not an ActionScript guy. Any advice, tips or techniques I can use would be greatly appreciated.
    Kind regards
    Mark

    Chances are you will need to manage this as a frame-by-frame animation, using the drawing tools to manually change shapes and positions of the different objects.

Maybe you are looking for

  • SAP MM - Purchasing queries

    Hello All, 1)     Could you please suggest a report / tcode  where we can find the list of Purchasing Documents along with THE USER who created it?? 2) Can we have PO qty more than the PR qty?? If yes, how can we restrict it?? 3)  Is it possible to c

  • Access browser in full screen mode?

    how do you access browser to brows photos when in full screen mode? i can see the film strip at the bottom but how do you go in browser mode to see all photos on screen while full screen? full screen was kind of wird to use at first so i avoided usin

  • Problem changing email address

    All I wanted to do was update my email address.  Went to Profile and entered the new email.  Then it said postal code was required, so I put that in.  Then it said my password was wrong, but I was actually not able to enter the password due to that b

  • Caching Query in Portal - Variable set to System Current Date

    Hi, I am facing issue on caching for query in portal in Production. I have query called ABC in production with variable Master valid on for user to chooce the date. This variable is hardcoded value in General Precalculation in variable assigment sess

  • Ddl-generation error

    Hello, i'm having a very strange error during ddl-generation, i'm using Netbeans 5.5, Glassfish V2 and Mysql 5.0.26. Toplink bug? JDO76609: Got SQLException executing statement "ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0": java.sql.SQLExcepti