2 very basic sql questions (I hope)

Hi;
This is for the ADO.NET 2.0 MS Oracle driver. Is there a standard way to do either of the following:
Sql Server has the concept of getting the first N of a select only using:
select top 1 * from Schedule where deleted = 0 order by runNext
Does Oracle have this and if so, what is the syntax please?
Sql Server has the ability to return the value of an auto-generated primary key in the insert statement. In C# it goes like this:
cmd.CommandText = "insert into Schedule (sTitle, sDescription) values ('my sched', 'all about it')";
cmd.CommandText += "; select scope_identity()";
object rtn = cmd.ExecuteScalar();
return (long)(decimal)rtn;
Is there a way to do this in Oracle and if so, how?
thanks - dave

1)
select *
  from (select *
          from schedule
         where deleted = 0
         order by runNext)
where rownum = 1;2)
insert into Schedule (sTitle, sDescription)
  values ('my sched', 'all about it')
  returning pk_column_name into v_some_variable;Or, if the auto-generated value comes from a sequence, you can, after the insert:
select my_sequence.currval from dual;

Similar Messages

  • Very Basic Functions Question

    Hi,
    apologies for this being a very basic question, but I rarely
    use Flash. About once a year, however, I am called upon to do some
    sort of (usually very simple) Flash-based project for the students
    I assist. This time it's a simple random slideshow.
    The setup is this:
    * I have a movieClip called 'slides_MC' containing all the
    slide photos, on consecutive frames.
    * This movieClip is placed inside another movieclip named
    slideshowRand_MC.
    This is given an instance name of topslide_mc, and faded up
    and down with alpha keyframes.
    The idea is that, when the slides mc is faded right down,
    some Actionscript causes the slides movie to jump to, and stop
    playing on a random frame, so random slides are faded up, then down
    again, then swapped.
    I need to apply some actionscript to particular keyframes so
    that the swap is performed at the correct time.
    This is my attempt at a reusable function to do the swapping.
    It's placed in a keyframe on the root timeline:
    // Go to and stop at random frame in slides movieclip
    function goRandom(mc) {
    // Number of slides in slides movieclip
    var slides = 22;
    // Random number between 1 and number of frames in slides
    movieclip
    var randFrame = Math.ceil(Math.random() * slides);
    mc.goToAndStop("slide_" & randFrame);
    This function is called from keyframes in slideshowRand_MC:
    _root.goRandom(this.slideshow_rand_mc.topslide_mc);
    I know this is really basic stuff, but can anyone tell me why
    this isn't working.
    I've tried adding a breakpoint in the goRandom function, but
    it doesn't look like it ever gets called.
    Any assistance very gratefully accepted.
    Alex

    Hi Bob, thanks for getting back to me.
    quote:
    Originally posted by:
    Bob Pierce
    "_root.goRandom(this.slideshow_rand_mc.topslide_mc);"
    There's a typo in that line - if it's in your code, it won't
    work!
    Ah, true. The typo actually happened when I was re-writing
    the code in post. The actual code in the movie is
    _root.goRandom(this.topslide_mc);
    This is attached to a keyframe of the container movie-clip
    containing the slides MC.
    I've put the fla file on our server.
    slideshow_random.fla.zip
    If you, or someone else could download it and help me find
    out what I'm doing wrong, I'd be ever-so grateful. I'm sure it's
    something really obvious. Without being very familiar with Flash
    and Actionscript, it's hard to explain things, and much easier to
    show you the actual Flash file.
    The 2 functions are on a keyframe on frame 1 of the root
    timeline. The 'goRandom' function is supposed to be called from a
    keyframe in 'slideshowRand_MC'. I envisaged calling the random
    pause function from another keyframe in the same movieclip.
    Thanks again,
    Alex

  • Very basic loop question

    Hi everyone, I´m somewhat new with programming and I have a very basic loop problem, that I can´t solve.
    I have 3 ArrayLists:
    A has the project information, ordered by client, identified by a projectId, clientId and businessId
    B has the client information, ordered by business, identified by a clientId and businessId
    C has the business information, identified by a businessId.
    I need to show all the projects of a client, then the client information of a certain business, and at last the business information in a format like this:
    A -- Project1
    A -- Project2
    A -- Project3
    B -- Client1
    A -- Project4
    A -- Project 5
    A -- Project 6
    B -- Client2
    C -- Business1
    A -- Project7
    A -- Project8
    B -- Client3
    A -- Project9
    B -- Client4
    C -- Business2
    How should I program my loops? I've been trying different ways but everytime it doesn't print what I want. Help, please!

    OK, here's my code:
    for(int bussCounter= 0; bussCounter< bussArray.size(); bussCounter++)
       ValueObject bussVO = bussArray.get(bussCounter);
       String bussId = bussVO.getBussId();
       for (int clieCounter = 0; clieCounter < clieArray.size(); clieCounter++)
          ValueObject clieVO = clieArray.get(clieCounter);
          String clieId = clieVO.getClieId();
          String bussIdClie = clieVO.getBussId();
             for (int projCounter = 0; projCounter < projArray.size(); projCounter++)
                ValueObject projVO = projArray.get(projCounter );
                String clieIdProj = projVO .getClieId();
                String bussIdProy = projVO .getBussd();
                if (clieIdProy == clieId && bussIdProy == BussIdClie)
                   out.println("<tr>");
                   out.println("<td>" + projVO .getBussId() + "</td>");
                   out.println("<td>" + projVO .getClieId() + "</td>");
                   out.println("<td>" + projVO .getProjId() + "</td>");
                  out.println("<td>" + projVO .getTotal() + "</td>");
                  out.println("</tr>");
              if (bussIdClie == bussId)
                 out.println("<tr>");
                 out.println("<td>" + clieVO .getBussId() + "</td>");
                 out.println("<td>" + clieVO .getClieId() + "</td>");
                 out.println("<td>" + clieVO .getTotal() + "</td>");
                 out.println("</tr>");
       out.println("<tr>");
       out.println("<td>" + bussVO .getBussId() + "</td>");
       out.println("<td>" + projVO .getTotal() + "</td>");
       out.println("</tr>");
    }

  • Very Basic Flash question

    I apologize for this, but I can't seem to figure out this
    very basic function:
    I select a certian number of frames and I'd like to see at a
    glance how many frames I have selected. if I select 42 frames is
    there somewhere I can look that tells me I have 42 frames selected?
    Thanks,
    D.

    Quickest way to do this is to select the amount of frames you
    want in the timeline then hit F6 on your keyboard to turn them all
    into keyframes. Now if you look at the toolbar below it (where the
    frames per second(fps), onion skinning, etc) you will see the
    Current Frame displayed.
    Undo to get rid of the keyframes

  • Very basic Balance question

    Hi, as I said in the title, this is very basic. How can I set the pan on a stereo track to 9:15 or anything other than full left/right?
    Thank you.

    Thanks. Let me see if you got it right. When I have a stereo track and I move the pan knob to left, at at 9 o'clock, is the right channel moving in the same exact opposite direction (:15) so I have a narrower stereo panning?
    Or to do this I need what Bee Jay said?
    Thanks.

  • Very Basic actionscript question

    Hi,
    This is very basic but for some reason cant get it to work.
    Basically I have a movie that plays and at the end I have a button that comes on screen but once the button stops I want the user to press the button then it goes to the url.
    I have
    stop() {
    on (release) {
            getURL("http://google.co.uk","_self","blank");
    but this doesnt work.
    Thankyou for any help.

    I have now sorted it, I had my movie on actionscript 3 and needed to put the url code onto the actual button.

  • Very basic SQL/XML question

    I'm using the following environment:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    However, I don't think my environment is the issue.
    I'm trying to get output which looks like this from a simple table:
    <MAXDOMAIN action="S">
         <DOMAINID key="true">domainid_data</DOMAINID>
         <SYNONYMDOMAIN type="relationship" action="AU" >
              <VALUE key="true">value_data</VALUE>
              <MAXVALUE>maxvalue_data</MAXVALUE>
              <DESCRIPTION>description_data</DESCRIPTION>
              <DEFAULTS>defaults_data</DEFAULTS>
         </SYNONYMDOMAIN>
    </MAXDOMAIN>The table looks like this
    Name                           Null     Type          
    DOMAINID                       NOT NULL VARCHAR2(30)   
    DESCRIPTION                             VARCHAR2(50)   
    DOMAINTYPE                              VARCHAR2(5)    
    MAXTYPE                                 VARCHAR2(5)    
    LENGTH                                  VARCHAR2(5) The real question is how do I get an element with attributes to also have content.
    <DOMAINID key="true">domainid_data</DOMAINID>and
    <VALUE key="true">value_data</VALUE>I'm not sure if I'm syntactically challenged or just not using the correct tags.
    If I try to just generate the first two tags, forgetting the following nesting, I'm OK, as long as I don't try to assign attributes to the DOMAINID tag:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID")
    AS "RESULT"
    FROM FAC_MAXDOMAIN;This works and is pretty trivial.
    <MAXDOMAIN action="S"><DOMAINID>AIRFLOWTYPE</DOMAINID></MAXDOMAIN>
    etc, etc...However, this:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID",XMLATTRIBUTES('true' AS "key"))
    AS "RESULT"
    FROM FAC_MAXDOMAIN;Yields an ORA-00907: missing right parenthesis error.
    Any ideas? maybe a good primer on SQL/XML might be the best solution...
    TIA,
    Paolo

    Very nice for a first post in terms of data included and formatting.
    It took me a few minutes to see it, but the simple answer is you are putting the XMLAttributes in the wrong location. See the XMLElement spec at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions220.htm#SQLRF06168 that shows XMLAttributes comes between the identifier and value. So that means you should have written it as
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    SQL> WITH FAC_MAXDOMAIN AS
      2  (SELECT 'domainid_data' domainid, 'dscr' description,
      3          'type' domaintype, '10' maxtype, '5' length
      4     FROM dual)
      5  -- Using WITH so didn't have to create your table locally
      6  SELECT  XMLELEMENT("MAXDOMAIN",
      7            XMLATTRIBUTES('S' AS "action"),
      8            XMLELEMENT(NAME DOMAINID, XMLATTRIBUTES('true' AS "key"), "DOMAINID")
      9          )
    10  AS "RESULT"
    11  FROM FAC_MAXDOMAIN;
    RESULT
    <MAXDOMAIN action="S"><DOMAINID key="true">domainid_data</DOMAINID></MAXDOMAIN>

  • A very basic sql xml question..

    I want to print only two rows group by grup number so there are only two group numbers
    0 and 1...
    so 0 group should have two items...
    Elapsed: 00:00:00.01
    15:15:55 SQL>
    15:15:56 SQL> l
      1  with data as
      2    (select 0 as grp,'A' item_name , 'XX' Item_desc from dual
      3     union
      4      select 0 ,'B'  , 'XY'  from dual
      5      union
      6      select 1 ,'B'  , 'Y'  from dual
      7       )
      8  select xmlelement(name "grp",
      9            xmlforest(grp  "item_name",item_name)
    10            )
    11*  from data
    15:15:57 SQL> /
    XMLELEMENT(NAME"GRP",XMLFOREST(GRP"ITEM_NAME",ITEM_NAME))
    <grp><item_name>0</item_name><ITEM_NAME>A</ITEM_NAME></grp>
    <grp><item_name>0</item_name><ITEM_NAME>B</ITEM_NAME></grp>
    <grp><item_name>1</item_name><ITEM_NAME>B</ITEM_NAME></grp>
    Elapsed: 00:00:00.01

    Hi,
    You should use XMLAGG, to get everything into a single XML element. And DON'T use extract()!!
    Something like:
    SQL> declare
       xml   xmltype;
    begin
      with data as
        (select 0 grp, 'g1' grp_name, 'A' item_name, 'XX' item_desc from dual union all
         select 0    ,  'g1' grp_name,'B'          , 'XY'           from dual union all
         select 0    ,  'g2' grp_name,'B'          , 'XY'           from dual union all
         select 0    ,  'g3' grp_name,'B'          , 'XY'           from dual union all
         select 1    ,  'g1' grp_name,'B'          , 'Y'            from dual)
    -- end of test data    
         select xmlagg(xmlelement("GRP"
                                 ,xmlagg(xmlelement("ITEM_NAME", item_name))
                                 ,xmlagg(xmlelement("item_desc", item_desc))))
           into xml
           from data
       group by grp, grp_name, item_name;
       dbms_output.put_line(dbms_lob.getlength(xml.getclobval()));
    end;
    299
    PL/SQL procedure successfully completed.Regards
    Peter

  • Very basic code questions

    Hi,
    I'm pretty new to dealing with this so please bare with me. I come from a PHP background so I got alot to learn here ;) Anyway, to my question then. I've got a book that im reading and following examples from but also try to evolve those examples into something more, to try and learn even more. I haven't come very far yet but I've stumbled across a little thing that I woulld like some help with. I'll post the complete code just in case.
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.wireless.messaging.*;
    import javax.microedition.io.*;
    public class quiz
         extends MIDlet
         implements CommandListener {
      private List mList, longList;
      private Command mExitCommand, mNextCommand, longExitCommand, longNextCommand;
      public quiz() {
        String[] stringElements = { " Game 1", " Game 2", " Game 3", " Game 4", " Game 5", " Game 6", " Game 7", " Game 8" };
        Image[] imageElements = { loadImage("/1.png"),
         loadImage("/2.png"),
         loadImage("/3.png"),
         loadImage("/4.png"),      
         loadImage("/5.png"),
         loadImage("/6.png"),
         loadImage("/7.png"),
         loadImage("/8.png") };
        mList = new List("Quiz v1.0", List.IMPLICIT, stringElements, imageElements);
        mNextCommand = new Command("Choose", Command.SCREEN, 0);
        mExitCommand = new Command("Exit", Command.EXIT, 0);
        mList.addCommand(mNextCommand);
        mList.addCommand(mExitCommand);
        mList.setCommandListener(this);
      void HowMany() {
        String[] stringElements = { " 1 question", " 2 questions", " 3 questions", " 4 questions", " 5 questions" };
        longList = new List("Quiz v1.0", List.EXCLUSIVE, stringElements, null);
        longNextCommand = new Command("V�lj", Command.SCREEN, 0);
        longExitCommand = new Command("Avsluta", Command.EXIT, 0);
        longList.addCommand(longNextCommand);
        longList.addCommand(longExitCommand);
        longList.setCommandListener(this);
      public void startApp() {
        Display.getDisplay(this).setCurrent(mList);
      public void commandAction(Command c, Displayable s) {
        if (c == mNextCommand || c == List.SELECT_COMMAND) {
          int index = mList.getSelectedIndex();
         if ( mList.getString(index) == " Game 1") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 1 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 2") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 2 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 3") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 3 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 4") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 4 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 5") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 5 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 6") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 6 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 7") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 7 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
         if ( mList.getString(index) == " Game 8") {
              HowMany();
              Alert alert = new Alert("Your Choice", "Your choice: Game 8 with X questions.", null, AlertType.INFO);
              Display.getDisplay(this).setCurrent(alert, mList);
        else if (c == mExitCommand)
         notifyDestroyed();
      public void pauseApp() {}
      public void destroyApp(boolean unconditional) {}
      private Image loadImage(String name) {
        Image image = null;
        try {
         image = Image.createImage(name);
        catch (IOException ioe) {
          System.out.println(ioe);
      return image;
    }I know that the IF parts pretty much suck, will improve those later on (or when my book does hehe) so that's not the issue. Anyways, I've included a second choice for the user which is what I call "HowMany", so first the user gets to choose between a few options (Game 1, Game 2, etc etc) and then the idea is for the user to choose how many questions, I get to that menu allright but when i try to choose that option nothing happens. I need to include some kind of listener or something to make something actually happen right? If someone would be so nice to show me how it's done it would be just super.
    Thanks in advance!

    I get to that menu allright but when i try to choose that option nothing happens.The form of javax.microedition.lcdui.Display.setCurrent you use ispublic void setCurrent(Alert alert, Displayable nextDisplayable)Which List do you want to be the nextDisplayable? mList or longList?
    Once that works, you will need to add suitable condition checking in commandAction(...) for doing stuff when the Command-s added to longList are selected.
    db

  • Very basic modules questions (ath_pci, etc)

    Hello! (I'm sorry, I posted this one in another forum first, thinking I was posting it in this one :oops: )
    I have a very simple question:
    Where can I find modules (e.g., ah_pci for my Atheros mini PCI wireless card), and where and how do I install them?
    For example, when I do:
    modprobe ath_pci, I get a message saying something like:
    can't find ath_pci module;
    although I've seen a directory with this name on my system (IIRC, under /sys/drivers???).
    Other example:
    I have a 855GM Intelchipset. How do I find the module for it and how do I install it?
    Thanks a lot.

    Thanks for the reply, and for deleting the other thread.
    I looked for /lin/modules, and I don't have a /lin directory... Is it normal?
    Or maybe you meant /bin/modules...? Anyway, I looked for this too and there is no /modules directory under /bin.
    I found some modules under /sys/module. There is one named ide_cd that I put in the MODULES array of rc.conf (just for a test, I don't know why it is for...), but I get a message at bootup:
    [/code]FATAL: module ide_cd not found[code]
    Is this normal too? Or it has to be compiled with the kernel to work. And BTW, if I compile the kernel (I don't think I'm at this point in Linux yet!), do I loose my installation or if everything stays in place in my system?
    Thanks a lot![/code]

  • Very basic String + @ question

    Hello all.
    I'm trying to use the "BitmapMetadata.GetQuery(String query)" method. I've found a few examples online where the argument string is specified as follow:
    string iptcRegion = @"/app13/irb/8bimiptc/iptc/Province\/State";
    As I understand it, the use of "@" is so that I don't have to specify "//" everywhere...but what is the meaning of "\/" at the end just before "State"? Thank you in advance.
    -L

    Thanks Armin, but if it has no special meaning why is it being written that way? I understand that the "@" is specifying a literal string, but something is just not clicking here. I'm sourcing the above strings from two places:
    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/371f5e90-1a59-412d-8ae0-de7814da6158/iptc-query-using-bitmapmetadatagetquery-method-?forum=windowswic
    and
    http://www.dustyfish.com/blog/basic-editing-of-photo-metadata-using-windows-imaging-component
    I've read and re-read these the two above posts but I just cannot make sense of their use of "/" and "\" and "@". There seem to be 3 different ways being shown and I can't figure out which one is correct. Can anyone clear this
    up for me? Thank you very much.

  • Basic SQL Question

    Can anyone help me to get answer for below question.
    The below table named 'XXX' contains the following values
    name type qty
    haneesh p1 5
    prahlad p2 3
    ram p3 1
    write a SQL query to get the below output
    name type qty
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    prahlad p2 1
    prahlad p2 1
    prahlad p2 1
    ram p3 1

    Woyswer wrote:
    Can anyone help me to get answer for below question.
    The below table named 'XXX' contains the following values
    name type qty
    haneesh p1 5
    prahlad p2 3
    ram p3 1
    write a SQL query to get the below output
    name type qty
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    haneesh p1 1
    prahlad p2 1
    prahlad p2 1
    prahlad p2 1
    ram p3 1
    ME_TUBBZ?      with data (col1, col2, col3)
      2     as
      3  (
      4     select 'name1', 'p1', 5 from dual union all
      5     select 'name2', 'p2', 1 from dual
      6  )
      7  select
      8     col1,
      9     col2,
    10     1  as col3
    11  from
    12     data d,
    13     table(cast(multiset( select level from dual connect by level <= d.col3) as sys.odcinumberlist));
    COL1  CO               COL3
    name1 p1                  1
    name1 p1                  1
    name1 p1                  1
    name1 p1                  1
    name1 p1                  1
    name2 p2                  1
    6 rows selected.
    Elapsed: 00:00:00.01
    ME_TUBBZ?

  • Web Service With Dynamic URL (Very Basic Conceptual Question)

    Hi everyone,
    I would like to employ JAX-WS to generate and publish a web service along with a web-based client which uses the service. The problem is: I want to deliver both the server (with its service) and the client to a customer, who will install the server on an internal machine, and who will have to configure the client to look for the web service at the IP of that internal machine, ideally by just putting the IP into some configuration setting. Both the services' path (on the server) as well as the services remain constant.
    From everything I have found so far, it appears as if one fixes the service's IP during compilation, i.e., when generating the WSDL and stubs using wsgen/wsimport. I guess that's fine when the server remains with me & a fixed IP, but doesn't this approach break down as soon as you need some flexibility in the server's IP, as, e.g., in my above scenario? I guess I am missing something, but unfortunately all the documentation I have found so far either neglects this issue or comes up with rather complex solutions indeed. - Or would one not use SOAP+WSDL in the above scenario in the first place? Any other best practices?
    I'd very grateful for any hints,
    Cheers
    equitone
    Message was edited by:
    Equitone

    Hi,
    thanks for your reply. Of course, I agree I could alter the generated code, but, as you say, I would not want to do that, since it will make automatic builds and deployment rather complicated.
    I guess my expectations on the "flexibility"/"design" of some of the generated artifacts is just a bit skewed, and I'll have to find a compromise between my expectations and the Java 6 way of web services. For instance, I also find it somewhat annoying that wsgen will apparently only generate the service against an implementing class, not an interface. E.g., when I have the following web service interface MyService and an implementing class MyDummyService:
    @WebService
    public interface MyService
        @WebMethod
        public String getString();
    @WebService(endpointInterface = "com....MyService")
    public class MyDummyService implements MyService {
       public String getString() {
          return "Just a dummy.";
    }Then the service in the WSDL specifies its Port as "MyDummyServicePort", so if I ever change the implementation---without actually changing the (web service) interface, I will also have to regenerate all client stubs. I would have hoped that wsgen's "service" option would help in this regard, but apparently it doesn't. Unfortunately, the documentation on the whole issue is in a pitiful state, IMHO.
    Cheers
    Equitone

  • Very basic compiling question: multiple c files

    Hi,
    I've been playing with alchemy for a few days, and hit a road block. I'm sure there is an easy answer, but I can't find it...
    I have a .c file "alchemy_project.c" that lets me call 3 functions from actionscript. I have the basic main() function that sets up the functions and calls
    AS3_LibInit(result);
    It is working well. However, I want to add another c file "support_functions.c" with a function I can call from "alchemy_project.c".
    int testFunction(){
         int i;
         i = 2;
         return i;
    I made a header file "support_functions.h":
    int testFunction();
    I included this header in "alchemy_project.c" by placing it after my AS3.h include:
    #include "AS3.h"
    #include "support_functions.h"
    I compile with:
    alc-on
    gcc alchemy_project.c support_functions.c -Wall -swc alchemy_project.swc
    When I run my flash file, it gives:
    Undefined sym: _main
    If I add a main function to support_functions.c:
    int main(){
        return 0;
    I get:
    [object AlchemyExit]
    Any tips?
    Thanks for the help!

    This helped me a little bit:
    http://forums.adobe.com/thread/465926
    I now compile the 2 c files with:
    gcc -c file1.c -o file1.o
    gcc -c file2.c -o file2.o
    then link them with
    gcc file1.o file2.o file3.o -O3 -Wall -swc --combine lib.swc
    I don't get any errors about main(), but actionscript gives me the error:
    Undefined sym: _testFunction
    when alchemy_project.c tries to call the testFunction() function in support_functions.c

  • Very basic comps question

    Logic Express 8.02. I have four bass takes. Various parts of each are needed. I've read the manual and there is no explanation about how to select just a small section of a take. The only way I see to do it is to go to the beginning, drag all the way to the start point and go all the way to the end and drag left to the end point. After that, however, I see know way to use a later or earlier part of that take again without duplicating the track. I know how it should work. I should be able to "lasso" part the part of the take I want as I go through the song and make the lassoed parts active. The manual touches on this, but when I try to "select the desired take sections by click-dragging over them with the Pointer tool" nothing happens. I'm sure this is really easy, but not easy to figure out. What's the trick? Thanks for any help.

    OK. It seems to be working now. That figures right after I post a question. I hit "revert to saved" and now I see how it works...I think.

Maybe you are looking for