what is the isar databse file extension? - isar

I use sqflite in flutter because i am able to find the databse file and save it for many use later.
But when i started to use isar db i could not find the db file at all.
I tried path and path provider to find the directory like this
final directory = await getApplicationSupportDirectory();
final Isar isar = await Isar.open([IsarEmailSchema], directory: directory.path);
with no success.
So what is the isar database extension and how to find the db files acrros platforms?

The file extension for an ISAR (Integrated Station Automated Reporting) database is usually ".mdb", which stands for Microsoft Access Database.
The database file extension for Isar database is not specified. It is a self-contained database that operates on the file system and doesn't require a separate database server to function.
As per the information available, Isar uses SQLite database under the hood, but the actual file extension could be different as it might be using a custom wrapper on top of SQLite.
In order to find the Isar database file, you could try to use the getDatabasesPath method from the Flutter path_provider package to get the path to the database file, then append the name of the database file to it.
For example:
java
final directory = await getDatabasesPath();
final String dbPath = directory.path + "/isar_database.db";
final Isar isar = await Isar.open([IsarEmailSchema], dbPath);
This should give you the path to the Isar database file, which you can then use to locate the file across platforms.

Related

Can I use sqldelight with different databases in same project?

I want to use SQLDelight to connect to a SQLite In-Memory database for test and to PostgreSQL server for production, is that use case possible? how I can do the config? and do I need to have .sq files for each database?
Yes, you can it.
First, create one directory for each database in the "src/main" directory of your module:
src/main/database1/
src/main/database2/
do I need to have .sq files for each database?
Yes, you need it. Put your .sq files into packege-associated directory:
src/main/database1/your/package/name/database1.sq
src/main/database2/your/package/name/database2.sq
Next, configure your databases in module's build.gradle file:
sqldelight {
database("Database1") {
packageName = "your.package.name"
sourceFolders = listOf("database1")
}
database("Database2") {
packageName = "your.package.name"
sourceFolders = listOf("database2")
}
}
It is important to specify the correct (created in the previous step) sourceFolders for each database.
Finally, implement the correct driver for each database as mentioned in the SqlDeLight documentation.
Rebuild your project before use databases. SqlDeLight will generate separated implementations classes for each database.

How to pass data from Config file to data table in Cucumber automation

I have a static data in config.properties file (ex : email and password) and I have used data table in feature file for email and password. I am passing the email and password in the data table.
So I need to use the data from config file instead of directly using in the data table. I have created a propertyreader file and able to use some data from config file like url but unable to use the email and password.
Is there any way that I can use data table + data from config file?
You can take a look to cucumber extension for BDD2 which has support properties from configuration as well as external examples.
You can use properties in step cal as well as can have external examples. You also can use properties in Examples with BDD2.

VB.net Const - Project location path

I am using a SDK with the SDK one of the parameters calls for a const which is a file path to a DLL. The example that I was given hard codes the file path but I need this to point to the project path so that when I deploy I can deploy it anywhere.
I have tried to use a couple of functions to get the file path of the project but because I need a const I get micorsoft error. "Constant expression is required. "
Public Const strLibrary As String = System.IO.Path.Combine(My.Application.Info.DirectoryPath, "\E_BEPSET32.DLL")
Is it possible to achieve this or do I have to hard code the value?

How to open the .db paradox file

i want to view the test.db file, i search for it's editor but didn't get any one
So please help to see the it in editor as like sql server.
i found some sqlite editor but it's not an sqlite file on most forum it say that it is an paradox .db file.
So how do i open it
Thanks
To access Paradox tables in .NET you can use ODBC. Here's a small example (in C#):
private static void RunMinimumParadoxTest()
{
const string ConnectionStringFormat =
"Driver={{Microsoft Paradox Driver (*.db )}};Uid={0};UserCommitSync=Yes;Threads=3;SafeTransactions=0;" +
"ParadoxUserName={0};ParadoxNetStyle=4.x;ParadoxNetPath={1};PageTimeout=5;MaxScanRows=8;" +
"MaxBufferSize=65535;DriverID=538;Fil=Paradox 7.X;DefaultDir={2};Dbq={2};CollatingSequence={3}";
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.Odbc");
using (DbConnection connection = factory.CreateConnection())
{
string userName = "Tor";
string paradoxNetPath = #"C:\BdeNet";
string databasePath = #"C:\LangloMainSrv\LData\Ordre\LordWin\Database2011";
string collatingSequence = "Norwegian-Danish";
connection.ConnectionString =
String.Format(ConnectionStringFormat, userName, paradoxNetPath, databasePath, collatingSequence);
connection.Open();
using (DbCommand command = connection.CreateCommand())
{
command.CommandText = "select Count(*) from [OrdreDet] where [Ordrenr] = 81699002";
object itemCount = command.ExecuteScalar();
Console.WriteLine("Order items: {0}", itemCount);
Console.ReadKey();
}
}
}
Also see the following link for more details: http://msdn.microsoft.com/en-us/library/ms710922(VS.85).aspx.
A Paradox db file contains just one flat table. The actual structure of the DB file changed over time and different versions. But you can usually open the DB file with MS Excel - of course that changed over different versions too.
As noted above, other database applications, also including Paradox for Dos and Paradox for Windows, will open the file and other features as well. The key, for example is in the PX file with the same table name.
All of this assumes the table is not password protected, which an application database could be - or that you know the password. Beware if you get an error to that effect.
You can open and view Paradox database files using Database Desktop that is shipped with Borland C++Builder. A free alternative is BB's Database Desktop. The software may require administrator privileges to run correctly.
You can use gnumeric spreadsheet, paradox-db-reader or BB database desktop to read db paradox file.
BB database dekstop able to read XG0 file too.
BB's Database Desktop now called JEDI Database Desktop, but project is closed and it couldn't edit my table. I have had to use some hack: open *.db file in MS Excel 2007, edit it, export to *.csv, close file then Open *.db file in Paradox Data Editor 3.2.0, clear all table data and import previosly saved csv-file. And it works (don't know why but this app can't insert row in my file itself)!

How to load files dynamically in an AIR app? Do I have to use the File class?

I have an XML file that specifies the image files that I need to load. The XML file and the image files live in a subfolder relative to where the AIR app lives.
I need to load the XML file and also the images (load them and add them as children to a movieclip)
In my AIR app, when I tried to load it via the URLRequest, it didn't work.
myLoader = new URLLoader();
myLoader.load(new URLRequest(xmlFilename));
myLoader.addEventListener(Event.COMPLETE, processXML);
(I know this works from a .swf b/c I've tested it)
I've found some sample which uses the File class and here's my code and this does work:
var aFile:File = File.applicationDirectory.resolvePath( xmlFilename );
var aStream:FileStream = new FileStream();
aStream.open( aFile, FileMode.READ );
configXML = new XML( aStream.readUTFBytes( aStream.bytesAvailable ) );
aStream.close();
processXML();
...
I'm now trying to load the images specified in the XML file and I'm finding that I have to use the File class to reference the image in the file system.
var engImageFile:File = File.applicationDirectory.resolvePath( "./english/"+ engFilename );
ldr = new Loader();
var urlReq:URLRequest = new URLRequest( engImageFile.url );
ldr.contentLoaderInfo.addEventListener( Event.COMPLETE, engImgLoaded );
ldr.load(urlReq);
Is this the way that AIR accesses files (using the File class) when it wants to read/load/etc. them?
if I understand your question correctly, I belive you just need to load it as a data source/array, which you can then bind to a component of your choosing.
In the documentation it states that if you use the File class to access files then this is safe across all platforms. Also the .url property of the File object will use the appropriate URL scheme...
"app:" - relative to the application directory
"app-storage:" - relative to the special application storage directory
"file:" - all else...I think if you specify an absolute path