New to developing could anyone point me in the right direction for sqlite issue?

Hello I am a new developer in training trying to work on my first project I have been hit by a major roadblock that i have worked on correcting for 5 days before posting here.  I am currently using flash builder 4.6 coding in flex.  I am trying to make a database that is able to be accessed accross multiple views.   I am also trying to hook up the date spinners so it search's in the Archive view between the selected dates for entries. However for the life of me I cannot seem to get a database up and running.
I keep getting the following errors.
Database is now open
Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'stb'   //this error is from the Journal view
Database is now open
Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'stb' // this error is from the Archive View
// Journal view code
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark" title="Journal" creationComplete="createDatabase()">
          <fx:Script>
                    <![CDATA[
                              import flash.data.SQLConnection;
                              import flash.data.SQLStatement;
                              import flash.errors.SQLError;
                              import flash.events.Event;
                              import flash.events.SQLErrorEvent;
                              import flash.events.SQLEvent;
                              import flash.events.TimerEvent;
                              import flash.filesystem.File;
                              import flash.utils.Timer;
                              import mx.collections.ArrayCollection;
                              import mx.utils.ObjectUtil;
                              import org.osmf.events.TimeEvent;
                              public var sqlc:SQLConnection = new SQLConnection();
                              public var dbFile:File;
                              public var dbConnection:SQLConnection;
                              private function createDatabase():void
                                        dbFile = File.applicationStorageDirectory.resolvePath("assets/appsimplicity.sqlite"); //last modified
                                        dbConnection = new SQLConnection();
                                        dbConnection.addEventListener(SQLEvent.OPEN, onDatabaseOpen);
                                        dbConnection.addEventListener(SQLEvent.CLOSE, onDatabaseClose);
                                        dbConnection.openAsync(dbFile);
                              private function onDatabaseOpen(evt:SQLEvent):void
                                        trace("Database is now open");
                                        var statement:SQLStatement = new SQLStatement();
                                        statement.sqlConnection = dbConnection;
                                        statement.sqlConnection.open(appsimplicity.sqlite, SQLMode.READ);
                                        statement.text = "CREATE TABLE IF NOT EXISTS stb (id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT , entry TEXT)";          ///working on issue here
                              private function onDatabaseClose(evt:SQLEvent):void
                                        trace("Database is now closed");
                              private function saveJournal():void
                                        var statement:SQLStatement = new SQLStatement();
                                        statement.sqlConnection = dbConnection;
                                        statement.text = "INSERT INTO stb_ (title , entry) VALUES ('"+title_txt.text+"','"+entry.text+"')"; //is this maybe wrong?
                                        statement.execute();
                                        title_txt.text = "";
                                        entry.text = "";
                              //debug log
                              //[SWF] Main.swf - 3,574,774 bytes after decompression
                              //Database is now open
                              //Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'journallistb'
                    ]]>
          </fx:Script>
          <fx:Declarations>
                    <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:Label id="title_lable_txt" x="10" y="48" width="124" height="21" color="#E2881E" text="Title:"/>
          <s:TextInput id="title_txt" x="47" y="36" width="146" enabled="true" prompt="Entry Title" needsSoftKeyboard="true" />
          <s:TextArea id="entry" x="9" y="120" height="147" enabled="true" prompt="Entry" needsSoftKeyboard="true" />
          <s:Button id="savejournal" x="11" y="326" width="296" label="Save" click="saveJournal()" />
          <s:Button id="addphotostojournal" x="11" y="275" width="296" label="Add Photos"/>
          <s:Label id="journal" x="10" y="97" color="#E2881E" text="Journal:"/>
          <s:Label id="Datefield" x="145" y="97" color="#E2881E" text="Date:"/>
          <s:TextInput id="date" x="187" y="78" width="120" height="34" enabled="true" prompt="enter date"/>
</s:View>
//Archive view code
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    title="Archive" creationComplete="createDatabase()">
          <fx:Script>
                    <![CDATA[
                              import mx.collections.ArrayCollection;
                              public var dbFile:File
                              public var dbConnection:SQLConnection;
                              public var selectQuery:SQLStatement;
                              private function createDatabase():void
                                        dbFile = File.applicationDirectory.resolvePath("appsimplicity.sqlite");
                                        dbConnection = new SQLConnection();
                                        dbConnection.addEventListener(SQLEvent.OPEN, onDatabaseOpen);
                                        dbConnection.addEventListener(SQLEvent.CLOSE, onDatabaseClose);
                                        dbConnection.openAsync(dbFile);
                              private function onDatabaseOpen(evt:SQLEvent):void
                                        trace("Database is now open");
                                        selectQuery = new SQLStatement();
                                        selectQuery.sqlConnection = dbConnection;
                                        selectQuery.text = "SELECT * FROM stb ORDER BY title ASC";
                                        selectQuery.addEventListener(SQLEvent.RESULT, onQueryResult);
                                        selectQuery.execute();
                              private function onQueryResult(evt:SQLEvent):void
                                        archivefiles.dataProvider = new ArrayCollection(selectQuery.getResult().data);
                              private function onDatabaseClose(evt:SQLEvent):void
                                        trace("Database is now Closed");
                    ]]>
          </fx:Script>
          <fx:Declarations>
                    <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:DateSpinner id="Startdate" x="66" y="54" width="40" height="60"/>
          <s:List id="archivefiles" x="69" y="119" width="185" height="138" enabled="true" labelField="title" ></s:List>
          <s:Button id="Delete" x="68" y="313" width="185" label="Delete"/>
          <s:VScrollBar x="248" y="120" height="138"/>
          <s:DateSpinner id="Enddate" x="68" y="361" width="40" height="50"/>
          <s:Label id="adspace" x="0" y="0" width="321" height="36" color="#751E1E" text="AdSpace"/>
</s:View>
I made the data base using sqlite manager "Firefox plugin" then copied it to a new package I called assets. inside the project SRC folder.  I am at a lose, and any help would be greatly appreciated! 
Message was edited by: JeanneM7289  updated with tags

I am now getting the error.
Error: Error #3101: Database connection is already open.
          at Error$/throwError()
          at flash.data::SQLConnection/open()
          at views::HomeView/onDatabaseOpen()[C:\Users/blah\Adobe Flash Builder 4.6\appSimplicity Journal\src\views\HomeView.mxml:55]
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark" title="Journal" creationComplete="createDatabase()">
          <fx:Script>
                    <![CDATA[
                              import flash.data.SQLConnection;
                              import flash.data.SQLStatement;
                              import flash.errors.SQLError;
                              import flash.events.Event;
                              import flash.events.SQLErrorEvent;
                              import flash.events.SQLEvent;
                              import flash.events.TimerEvent;
                              import flash.filesystem.File;
                              import flash.utils.Timer;
                              import mx.collections.ArrayCollection;
                              import mx.utils.ObjectUtil;
                              import org.osmf.events.TimeEvent;
                              public var sqlc:SQLConnection = new SQLConnection();
                              public var dbFile:File;
                              public var dbConnection:SQLConnection;
                              private function createDatabase():void
                                        dbFile = File.applicationStorageDirectory.resolvePath("appsimplicity.sqlite"); //last modified
                                        dbConnection = new SQLConnection();
                                        dbConnection.addEventListener(SQLEvent.OPEN, onDatabaseOpen);             ////************ added by bblommers
                                        dbConnection.addEventListener(SQLErrorEvent.ERROR, onDatabaseError);  
                                        dbConnection.addEventListener(SQLEvent.CLOSE, onDatabaseClose);
                                        dbConnection.openAsync(dbFile);
                              private function onDatabaseError(evt:SQLEvent):void    
                                        trace('Error with the database: '+evt);
                              private function onDatabaseOpen(evt:SQLEvent):void
                                        trace("Database is now open");
                                        var statement:SQLStatement = new SQLStatement();
                                        statement.sqlConnection = dbConnection;
                                        statement.sqlConnection.open("appsimplicity.sqlite", SQLMode.READ);
                                        statement.text = "CREATE TABLE IF NOT EXISTS stb (id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT , entry TEXT)";          ///working on issue here
                                        statement.execute();                    //************* added by bblommers
                                        trace("Table is now created");     //************ added by bblommers
                              private function onDatabaseClose(evt:SQLEvent):void
                                        trace("Database is now closed");
                              private function saveJournal():void
                                        var statement:SQLStatement = new SQLStatement();
                                        statement.sqlConnection = dbConnection;
                                        statement.text = "INSERT INTO stb (title , entry) VALUES ('"+title_txt.text+"','"+entry.text+"')"; //is this maybe wrong?
                                        statement.execute();
                                        title_txt.text = "";
                                        entry.text = "";
                              //debug log
                              //[SWF] Main.swf - 3,574,774 bytes after decompression
                              //Database is now open
                              //Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'journallistb'
                    ]]>
          </fx:Script>
          <fx:Declarations>
                    <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:Label id="title_lable_txt" x="10" y="48" width="124" height="21" color="#E2881E" text="Title:"/>
          <s:TextInput id="title_txt" x="47" y="36" width="146" enabled="true" prompt="Entry Title" needsSoftKeyboard="true" />
          <s:TextArea id="entry" x="9" y="120" height="147" enabled="true" prompt="Entry" needsSoftKeyboard="true" />
          <s:Button id="savejournal" x="11" y="326" width="296" label="Save" click="saveJournal()" />
          <s:Button id="addphotostojournal" x="11" y="275" width="296" label="Add Photos"/>
          <s:Label id="journal" x="10" y="97" color="#E2881E" text="Journal:"/>
          <s:Label id="Datefield" x="145" y="97" color="#E2881E" text="Date:"/>
          <s:TextInput id="date" x="187" y="78" width="120" height="34" enabled="true" prompt="enter date"/>
on the archive view I am still getting the error
Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=no such table: 'stb'
However the journal view Trace show's Table created and Database opened  I am at my wits end with this

Similar Messages

  • Can anyone point me in the right direction for the link to download Acrobat 9 Standard?  I found the link to download 9 Pro but not standard.  Old computer crashed and new computer does not have a CDR/DVD rom drive.

    Can anyone point me in the right direction for the link to download Acrobat 9 Standard.  I found the link to download 9 Pro but not standard.  Old computer crashed and new computer does not have a CDR/DVD rom drive.

    Hi,
    Standard or Pro would be licensed through your serial number, the download link and downloaded file would be the same for both of them.
    Pro or Standard would be determined after you put in your serial number.
    Download Acrobat products | 9, 8
    Thank You
    Arjun

  • I can't rate or write a review for app on the app store. It allows me to write out the review but does not diplay my review after sending it. Can anyone point me in the right direction to get answer as apply refuse to reply or solve my problem. Thanks

    I can't rate or write a review for app on the app store. It allows me to write out the review but does not diplay my review after sending it. Can anyone point me in the right direction to get answer as apply refuse to reply or solve my problem. Ps thanks apple for ur ignorance

    I have the same problem with another TeamLava app, Fashion Story.

  • I recently deleted approximately 80gb of space on my hard drive by dragging items to the trash and then emptying the trash.  However, the space does not show up on my HD as free. Can anyone point me in the right direction?

    I recently deleted approximately 80gb of space on my hard drive by dragging items to the trash and then emptying the trash.  However, the space does not show up on my HD as free. Can anyone point me in the right direction?

    If you are using File Vault, turn it off.  To find out where all the extra space is use any of these products - Disk Inventory X
    OmniDiskSweeper
    WhatSize
    SpaceControl

  • I have an older airport express but don't know where to look to find its model number.  The version number is airport utility 6.3.4 (634.17).  Can anyone point me in the right direction?  Thanks.

    I have an older airport express, but don't know where to look to find its model number. 
    The version number is airport utility 6.3.4 (634.17). 
    Can anyone point me in the right direction?  Thanks.

    Hard to see it's so teeny. I needed a magnifying glass.
    FWIW, you should not mark your reply as Solved because you did not solve your question. Helpful and Solved are used to reward the user who help you or solved your problem.

  • I need better performance from my computer. Could someone point me in the right direction?

    I do a lot of video editing for work. I am currently using the Creative Cloud, and the programs I use most frequently are Premiere Pro CS6, Photoshop CS6, and Encore. My issue is that when I am rendering video in Premiere Pro, and most importantly, transcoding in Encore for BluRay discs, I am getting severe lag from my computer. It basically uses the majority of my computer's resources and doesn't allow me to do much else. This means, that I can't do other work while stuff is rendering or transcoding. I had this computer built specifically for video editing and need to know which direction to go in for an upgrade to get some better performance, and allow me to do other work.
    For the record, I do have MPE: GPU Acceleration turned ON, and I have 12GBs of RAM alloted for Adobe in Premiere Pro's settings, and 4GBs left for "other".
    Here is my computer:
    - Dell Precision T7600
    - Windows 7 Professional, 64-bit
    - DUAL Intel Xeon CPU E-2620 - 2.0GHz 6-core Processors
    - 16GBs of RAM
    - 256GB SSD as my primary drive. This is where the majority of my work is performed.
    - Three 2TB secondary drives in a RAID5 configuration. This is solely for backing up data after I have worked on it. I don't really use this to work off of.
    - nVidia Quadro 4000 2GB video card
    When I am rendering or transcoding, my processor(s) performance fluctuates between 50%-70%, with all 12 cores active and being used. My physical memory is basically ALL used up while this is happening.
    Here is where I am at on the issue. I put in a request for more RAM (32GBs), this way I can allot around 25GBs of RAM to the Adobe suite, leaving more than enough to do other things. I was told that this was not the right direction to go in. I was told that since my CPUs are working around 50-70%, it means that my video card isn't pulling enough weight. I was told that the first step in upgrading this machine that we should take, is to replace my 2GB video card with a 4GB video card, and that will fix these performance issues that I am having, not RAM.
    This is the first machine that has been built over here for this purpose, so it is a learning process for us. I was hoping someone here could give a little insight to my situation.
    Thanks for any help.

    You have a couple of issues with this system:
    Slow E5-2620's. You would be much better off with E5-2687W's
    Limited memory. 32 GB is around bare minimum for a dual processor system.
    Outdated Quadro 4000 card, which is very slow in comparison to newer cards and is generally not used when transcoding.
    Far insufficient disk setup. You need way more disks.
    A software raid5 carries a lot of overhead.
    The crippled BIOS of Dell does not allow overclocking.
    The SSD may suffer from severe 'stable state' performance degradation, reducing performance even more.
    You would not be the first to leave a Dell in the configuration it came in. If that is the case, you need a lot of tuning to get it to run decently.
    Second thing to consider is what source material are you transcoding to what destination format? If you start with AVCHD material and your destination is MPEG2-DVD, the internal workings of PR may look like this:
    Convert AVCHD material to an internal intermediate, which is solely CPU bound. No GPU involvement.
    Rescale the internal intermediate to DVD dimensions, which is MPE accelerated, so heavy GPU involvement.
    Adjust the frame rate from 29.97 to 23.976, which again is MPE accelerated, so GPU bound.
    Recode the rescaled and frame-blended internal intermediate to MPEG2-DVD codec, which is again solely CPU bound.
    Apply effects to the MPEG2-DVD encoded material, which can be CPU bound for non-accelerated effects and GPU bound for accelerated effects.
    Write the end result to disk, which is disk performance related.
    If you export AVCHD to H.264-BR the GPU is out of the game altogether, since all transcoding is purely CPU based, assuming there is no frame blending going on. Then all the limitations of the Dell show up, as you noticed.

  • Can someone point me in the right direction for a second monitor adaptor for my iMac?

    I'm trying to add a second monitor to my Late 2006 20 inch iMac (yes it still works just fine and I can't afford to upgrade yet). I'm having a hard time finding the right adaptor for the monitor, I've bought the wrong thing twice now (the second one I got looks like its just for Power PC, it won't go in here but it fits in my iBook G4 just fine)
    I've been searching but everything I find is either for newer or older models then mine Does someone might know of a place where I could find one that will fit my machine? Thank you!

    The late-2006 iMac has a mini-DVI port, so you'll just need a mini-DVI to the appropriate input for your monitor. The adapter you have for your iBook will not work. You can get adapters from the Apple Store as well as many other vendors.
    Regars.

  • Can anyone point me in the right direction?

    Hi,
    I'm wondering if anyone would be able to point me in the direction of a tutorial using action script 2 on making an expanding menu system.
    Simular to this one
    http://www.gardaglobal.com/consulting.php?lang=en
    or this one
    http://flash-creations.com/notes/sample_twolevelmenu.php  - This one is a tutorial but I could do with one from the start step by step!
    If anyone could help that would be great
    Thanks

    google:  flash actionscript 2 dropdown menu tutorial

  • I transfered photos from an old iPhone to a new iPhone 5, but now I can't delete the imported photos.  Can anyone point me in the right direction of how to remove the old photos from the phone??

    Photo transfer problems

    Where did you get the photos from. Were they in the camera roll, or were they ones that were synced to the phone from the computer?

  • Seriously. I have been charged over £200 for supposedly free apps. I need to report this and cannot anywhere find how I can do this. In UK. Please can anyone point me in the right direction.

    Can anyone help. Especially Apple who don't seem to want to allow anyone to report a problem. It's taken me an hour to get this far. I've been charged nearly £100 for apps that are free in the app store - racing penguins for one which is free but billed to me at £6.99! How can I get a refund and stop this happening again...

    There is no subscription section in my account.
    I am paranoid after reading the above post but it seems there is no way to turn off initial purchases, only renewals can be turned off.
    1) Do all apps explicitly ask if you want to purchase a subscription and give the price?
         Is that required and controlled by Apple?
    2) Or is it possible an app will just charge and give you a subscription when
        a) the app is installed or b) when it is run the first time?
    If # 2 is a posibility then:
    We should be able to disable initial purchases so we don't wind up spending 100's by accident.
    Then if they are disabled we would have to re-enable them to get a subscription
      and after we could disable them again.  If #2 can happen that would be the only way to
      stop an accidental purchase from happining.
    Why - because I know from other places on the internet it ir Real Easy to miss
       something in the fine print no matter how dilligent you are about reading the Terms.
    Can someone answer the questions 1 & 2?
    And if 2 is possible - can anyone offer any advice (besides read carefully - I know that)?
    Thanks

  • Since itunes has been updated I can't see how to load songs onto my ipod using playlists, can anyone point me in the right direction??

    I just can't see how to move a playlist I create in Library onto a connected ipod?  How do you do that in the new itunes?

    Found it in link from https://discussions.apple.com/message/20431895#20431895,   Or press ctrl + S to get the left sidebar showing!!!

  • HT201335 I can't find where to download airplay from to my iphone. Can anyone point me in the right direction?

    How do you download airplay to your iphone and where is the software located?

    There is no download.
    AirPlay is built into iOS.
    Swipe up from the bottom of your screen.
    if you don't see the AirPlay icon

  • Can anyone point me in the right direction to create a Word Banner for a logo for a polo shirt T Shirt so that the writing curves over the top and below the logo. First time here so sorry if its directed to wrong area. CP

    I need to design some wording that wraps around a logo on a T Shirt and was wondering if there is something in available or may be some application that I can purchase in the Apps Store

    ArtText>preferences>chessboard.  This is equal to .png alpha channel.

  • Hi: Can someone point me in the right direction for a screen protector cloth?

    Hi:
    I'm not a big fan of the overlay products out there to protect laptop screens.  I'd rather not apply a thin film of clear film and deal with air bubbles, or other wise have anything between my eyes and the retina display other than air.
    With that in mind, I'm looking for something to lay over the track pad and keyboard....basically everything that's visible when the laptop is in use, so that when I shut the lid, the oils and such deposited from my fingers to the keys don't smudge the screen.
    This was a big issue with a 7 year old Titanium MBP that I retired earlier this week.
    Many cloths are to thick and I don't want to force the computer closed...the product has to meet Mac specs and fit between top and bottom.
    I have a newly purchased 15 inch, Retina display Macbook Pro.
    Thanks in advance for the advice.
    Michael

    Thanks, Ralph.
    I'm currently using the sheet of soft paper that came with the MBP, but eventually I'll leave it somewhere or one of our cats will get a hold of the paper and shred it to bits.
    Anything commercially available (perhaps the microfiber cloth you mentioned) and designed specifically for the MBP Retina display models?
    Michael

  • Can a Mod help point me in the right direction...?

    Can a Moderator help point me in the right direction for help on this...not sure if its a sales issue, or a support issue...
    I recently started using the new YouView box.  After a week of use, I have various issues with it, a couple of which I would deem as being serious enough to merit wanting to move back to the BT Vision box.  So...
    1) Is this possible technically?
    2) Can I do this contractually?
    3) If it is possible, can I mothball the YouView box until software upadates fix the issues?
    I'm not sure who to speak to in the first instance....
    Thanks
    Mike

    Hi Guys,
    Thanks for posting. If you’re having problems with the Vision service drop me an email with the details and I’ll look into it for you. Over the next few weeks there will be an update to both BT Vision on YouView and to the YouView software which may help fix some of the issues you have but if you’re still having problem get in touch.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

Maybe you are looking for