Can I access the database file as a resource in Blackberry project? - sqlite

Can I access the database file as a local resource in Blackberry project via coding? Does not in SDCard storage!

the answer is NO
but you can put your database in your resources folder and copy it to sdcard or eMMC and access it afterwards

Related

How to deploy Javafx desktop application with Hsqldb

I've completed a Java project with Hsqldb, the application works fine on my local machine, this is intended to be used as a standalone desktop application on the Windows platform. Please could you suggest any references/documentation on how to go about the deployment processes. Thanks in advance.
For deploying an embedded HSQLDB database, the only thing that can be different on the target is the location of the database files.
You define the directory where files are stored and it should be a writable directory. In this case, define the path and use it as an absolute path (which includes the drive name if any) to connect to HSQLDB.
You can also define the database connection URL to contain the user home directory path. This allows storing the database is a subdirectory of the user's home directory. See http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_variables_url

The easiest way to access Azure File Storage?

I need to migrate an application to Azure and I have a Azure Web Application with 50gb storage space and an Azure File Storage with 250gb, that I'll use to store videos, images and other things.
My application stores the files in a folder in the same directory of my application, so It was easy to do, I didn't have to access another server, like Azure File Storage seems to be.
I have access by FTP to my app folder, like It was at the other server, but this folder only have the 50GB of storage. Does exist an way of mapping the 250gb's Azure File Storage folder to my app folder, or I'll have to change my code to use the Azure API?
Your application can work against Azure File shares without code changes. You will need to persist credentials using cmdkey, and then instead of local path, use the file share path or mounted drive within your application. For more information you can refer to:
How to use Azure Files on Windows
How to use Azure Files on Linux
I run a batch file on login which runs the following command, you can use whichever drive letter you choose:
net use <drive-letter>: /delete /y
net use <drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name> /u:<storage-account-name> <storage-account-key>
An example with dummy information would look like this:
net use t: /delete /y
net use t: \\testaccount.file.core.windows.net\testshare /u:accountname verylongstorageaccountkey

where does wildfly store jdbc driver jar file?

I'm using wildfly 8.2. I registered the sqlite driver and created a datasource for it already. It's connected fine and I can see it in the standalone.xml.
But when I search under the "wildfly-8.2.0.Final" directory, I can't find the "sqlite-jdbc-3.8.7.jar" file.
Do you know where wildfly store the physical jar file?
Thanks
You can just put the Jar-File of the driver in the Deployment-Folder of the Wildfly. "/wildfly-path/standalone/deployments" The files in this folder will always deploy on startup.
https://bitbucket.org/xerial/sqlite-jdbc/downloads/sqlite-jdbc-3.8.7.jar

ASP.NET MVC wants me to store my SQL Server database files in the App_Data folder -- should I?

When creating a new database with SQL Server Express 2005, the database files (.mdf and .ldf) get stored in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data by default.
However, with the tutorials I've seen for ASP.NET MVC (e.g., Nerd Dinner), it seems to be common practice to keep the database files in the ASP.NET project's App_Data folder.
Questions
Is there any significance to the App_Data folder, or is it just a convenient place to store database files if you happen to use Visual Studio's designer to create a new database?
Will there be any negative repercussions if I don't use or even delete the App_Data folder?
Update
One thing I'm still not getting. If you have a production database on the server, why would you even want to replace this database with what is in App_Data. Wouldn't you normally just want to have update scripts that you run on the production database when you release a new version of the app? Even for initial deployment, I'd rather script database creation than physically copy over the files. Also, with SQL Server (Express) databases, copying is not enough. You have to detach the database to manipulate the files then reattach when you are done.
So, I have to say, the point of App_Data still escapes me. Can someone enlighten me?
You can delete App_Data without any negative repercussions, but when it exists (by folder name) inside an ASP.NET website then it has the special website power of disallowing direct linking to download its contents - this is a security feature to protect your database from being downloaded directly over the web (e.g. by a web browser) even though it exists in the website. However your application can still access the files in the App_Data folder just as it accesses other website content.
Microsoft states it as:
Note: The content of application
folders, except for the App_Themes
folder, is not served in response to
Web requests, but it can be accessed
from application code.
Microsoft describes their special ASP.NET folder structures including App_Data here.
There are a number of advantages of placing database files in the App_Data folder:
As some have mentioned, that folder is secure from people browsing it directly on the web. This is also true of placing the database in folders outside of your web site, though.
You can "xcopy deploy" your application by copying the entire folder from your local development machine to your hosting web site.
Various components in Visual Studio can offer extra assistance in building your application by having your database files there. For example, you can double-click on a SQL Server Express MDF file and have it automatically open up in Server Explorer so that you can change the database's schema or view its data.
There is absolutely no need to use the App_Data folder. It's just a convenient place to keep your database files together with your site. The decision to use it or not is more a matter of preference / policy than anything else.
yes, when you are simply using an express database which will exist within your webroot it is best to use the app_data folder. The primary reason is that the asp .net isapi implicitly knows not to fulfill any requests for files from this directory. The same goes for the app_code folder. There is no stipulation that you have to but its good practice to be prudent.
You can also store sensitive xml,access dbs and any other data files in here for added security.
I've only ever used it for local development before pointing the web.config at a SQL server instance rather than the db files.

What is the App_Data folder used for in Visual Studio?

When creating a new ASP.NET application in Visual Studio, a couple of files and folders are created automatically. One of those folders is called App_Data.
Also when publishing a website by selecting the menu option Build->Publish a checkbox is available Include files from the App_Data folder.
Am I right assuming that the files put in this file and its sub-folders are not going to be accessible through the web? For example, would it be safe to put in that folder resources that I only intend to be used by the application code?
What is the real intended use of the App_Data folder?
EDIT:
Thank you for all the answers. From the answers received so far I am interested mostly in two points mentioned:
App_Data is essentially a storage point for file-based data store
It should not be viewable by the web and is a place for the web app to store and read data from
Would someone be able specify how the "not viewable by the web" is ensured?
Can I rely on that fact when performing standard deployment, or do I need to check some IIS settings on the server as well.
In the situation when I have a set of pdf files that I want to be accessible only from the application. Would App_Data folder be the right place to use, or should I create a separate folder and manually set IIS to ensure that it is not accessible by Web?
App_Data is essentially a storage point for file-based data stores (as opposed to a SQL server database store for example). Some simple sites make use of it for content stored as XML for example, typically where hosting charges for a DB are expensive.
in IIS, highlight the machine, double-click "Request Filtering", open the "Hidden Segments" tab. "App_Data" is listed there as a restricted folder. Yes i know this thread is really old, but this is still applicable.
The intended use of App_data is to store application data for the web process to acess. It should not be viewable by the web and is a place for the web app to store and read data from.
It's a place to put an embedded database, such as Sql Server Express, Access, or SQLite.
The App_Data folder is a folder, which your asp.net worker process has files sytem rights too, but isn't published through the web server.
For example we use it to update a local CSV of a contact us form. If the preferred method of emails fails or any querying of the data source is required, the App_Data files are there.
It's not ideal, but it it's a good fall-back.
From the documentation about ASP.NET Web Project Folder Structure in MSDN:
You can keep your Web project's files in any folder structure that is
convenient for your application. To make it easier to work with your
application, ASP.NET reserves certain file and folder names that you
can use for specific types of content.
App_Data contains application data files including .mdf database files, XML files, and other data store files. The App_Data folder is
used by ASP.NET to store an application's local database, such as the
database for maintaining membership and role information. For more information, see Introduction to Membership and Understanding Role Management.
The main intention is for keeping your application's database file(s) in.
And no this will not be accessable from the web by default.
We use it as a temporary storage area for uploaded csv files. Once uploaded, an ajax method processes and deletes the file.
The intended use for App_Data is to store database related file. Usually SQL Server Express .mdf files.

Resources