Error Message Error #3125 Unable To Open The Database File
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “unable to open the database file” error in Flex for Android up vote 1 down vote favorite 1 Using Flex 4.5 for Android development, this is the script that should create the database: private var db:File = File.userDirectory.resolvePath("events.db"); private var conn:SQLConnection; public function MyDB() { conn = new SQLConnection(); conn.addEventListener(SQLEvent.OPEN, openHandler); conn.addEventListener(SQLErrorEvent.ERROR, errorHandler); conn.open(db, ); } and I have added this permission:
open and openAsync methods NOT create folders for created database file Posted on November 17, 2010 by Łukasz Grela If you run into problems with connecting to the database and you are using open or openAsync with CREATE mode then check if folder location exists for your database file, http://stackoverflow.com/questions/7968084/unable-to-open-the-database-file-error-in-flex-for-android following code will generate SQLError SQLError: ’Error #3125: Unable to open the database file.’, details:’Connection closed.’, operation:’open’, detailID:’1001’ import flash.data.SQLConnection; import flash.data.SQLMode; import flash.filesystem.File; var m_oAppStorageDir:File = File.documentsDirectory.resolvePath("myFolder/structure");//my documents or sdcard var m_oConnection:SQLConnection = new SQLConnection(); try { m_oConnection.open(m_oAppStorageDir.resolvePath("myDb.db"), SQLMode.CREATE); } http://greladesign.com/blog/2010/11/17/sqlite-open-and-openasync-methods-not-create-folders-for-created-database-file/ catch (e:Error) { trace(e.getStackTrace()); } it is because differently then in FileStream class the SQLConnection creates only database file and not entire folder structure. To fix it call createDirectory method of the File instance. import flash.data.SQLConnection; import flash.data.SQLMode; import flash.filesystem.File; var m_oAppStorageDir:File = File.documentsDirectory.resolvePath("myFolder/structure");//my documents or sdcard try { m_oAppStorageDir.createDirectory(); } catch (e:Error) { trace(e.getStackTrace()); } var m_oConnection:SQLConnection = new SQLConnection(); try { m_oConnection.open(m_oAppStorageDir.resolvePath("myDb.db"), SQLMode.CREATE); } catch (e:Error) { trace(e.getStackTrace()); } This entry was posted in actionscript, air for android, flash, SQLite3 (in AIR) and tagged actionscript3, air, air for android, createDirectory, detailID:’1001’, Error #3125, SQLConection, SQLError, SQLite by Łukasz Grela. Bookmark the permalink. Comments are closed. Proudly powered by WordPress This site uses cookies: Find out more.Okay, thanks
I am not looking for input on error message features you would like added (Ill do that in another post). We already have a pretty good idea of the main issues (based error message error on the forums, bug reports, blogs, testing and twitter), but your comments here will be another useful data point. As usual, you can always submit the issues directly to the AIR team here. So, post your biggest Adobe AIR annoyances, bugs and issues in the comments. Keep comments on topic. Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus Copyright 2013 - Mike Chambers
Popular Files Top Authors Top New Authors Affiliates Help Getting Started Why Buy With Us? Help Center Licenses Legal Agreements Item Support Policy Customer Refund Policy Author Refund Policy API Get Hosting Sitemap Create an Envato Account 0 Sign In ThemeForest CodeCanyon VideoHive AudioJungle GraphicRiver PhotoDune 3DOcean All Items Popular Files Featured Files Top New Files Follow Feed Top Authors Top New Authors View All Categories WordPress Popular Items All Items Blog / Magazine BuddyPress Corporate Creative Directory & Listings eCommerce Education Entertainment Layers WP Mobile Nonprofit Real Estate Retail Technology Wedding Miscellaneous WordPress Plugins on CodeCanyon HTML Popular Items All Items Admin Templates Corporate Creative Entertainment Mobile Nonprofit Personal Retail Specialty Pages Technology Wedding Miscellaneous Marketing Popular Items All Items Email Templates Instapage Landing Pages Pagewiz Unbounce Landing Pages Google Web Designer Ads on CodeCanyon CMS Popular Items All Items Concrete5 Drupal Joomla MODX Themes Moodle Mura Webflow Weebly Miscellaneous eCommerce Popular Items All Items 3dcart Cart66 CS-Cart Drupal Commerce Easy Digital Downloads Ecwid Jigoshop Magento OpenCart osCommerce PrestaShop Shopify Ubercart VirtueMart WooCommerce WP e-Commerce Zen Cart Miscellaneous Muse Popular Items All Items Corporate Creative eCommerce Landing Personal Miscellaneous Muse Widgets on CodeCanyon UI Design All Items PSD Templates Sketch Templates Plugins More Blogging Facebook Templates Forums Ghost Themes Jekyll Tumblr TypeEngine Themes Courses New Popular Items All Items Code Web Design Search Home Files Muse Templates Miscellaneous Barber - Responsive Barber Shop and Hair Salon Template Discussion on Barber - Responsive Barber Shop and Hair Salon Template Item Details Comments Support MaximusTheme supports this item Supported Search From buyers and authors only 7 comments found. DEV-Themes 6 months ago Great job! MaximusTheme Author 6 months ago Thank you EricProchnow 6 months ago