I need to connect to a .fdb file (Navision database file 2009) through C#. Can anyone explain how can I connect to this file using ODBC/NODBC?
I have tried these links but found nothing useful.
https://dynamicsuser.net/nav/f/users/21774/nodbc-connection-with-net
https://dynamicsuser.net/nav/f/developers/19641/please-help-sample-c-code-to-access-navision-4-0-using-nodbc
https://dynamicsuser.net/nav/f/developers/72463/how-to-make-a-fdb-file
https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/33767/can-you-read-fdb-and-fbk-file-without-using-nav?pifragment-101115=1#responses
https://dynamicsuser.net/nav/f/users/61737/connect-to-fdb
I haven't done it for C#, but Python. It all boils down to the following steps:
Install Navision ODBC Driver which is part of the Navision 2009 installation package.
Set up an ODBC connection to your Navision server. (The ODBC Driver also has a connection test included)
Use any ODBC library to connect to the ODBC DSN created in step 2.
Use regular SQL syntax to communicate with the database
edit/p.s.: Reading your question again. I think it's possible you are lacking the server part. As far as I know, you will need a running Navision server to interact with the fdb file.
Related
I have already running a project in production.
And .wdd is missing. I can't use server/client, for it.
Can I create .wdd file? Or connect to catalog without it?
I using pypyodbc and python3 for it
Only way to find wdd file is in the WinDev project directory.
But also if you don't have the project, you could connect to DB via ODBC using ODBC driver for HFSQL. With that you only have to connect to ODBC and the HFSQL driver do the rest.
https://help.windev.com/en-US/?3044179
I have my windows 10 pc with ODBC datasource as my_odbc
This will connect to my remote informix server.
So for I am using this odbc for my local as well as php website development.
I want to use Adonis Js which uses knex.
How to give database connection properties, as to that of mysql, pg, mssql etc.
using odbc data source.
my connection is "DSN=my_odbc;UID=vijayan;PWD=vijayan;"
No.
But you can write your own ODBC client. There was some initial work done for it, but nowadays all new dialects should be added as separate npm modules like described in CONTRIBUTING.md https://github.com/tgriesser/knex/blob/master/CONTRIBUTING.md#i-would-like-to-add-support-for-new-dialect-to-knex-is-it-possible
(I'm not going to copy-paste that boilerplate code here, because it is more probable that knex changes and that linked document changes in compared to knex github getting offline)
Initial work that was done for the support is found here: https://github.com/tgriesser/knex/pull/2116
The FoxPro ODBC on my machine is only able to connect to certain tables in the ODBC Connection. When I try to connect to specific tables in the same connection I receive the error [Microsoft][ODBC Visual FoxPro Driver]Not a table.( #123). However, I am successfully connected to other tables without an issue. I know these tables I am unable to connect to aren't corrupted because I am able to view the data in them using Visual Fox Pro.
Any suggestions would be appreciated.
First I'd use the Visual FoxPro OLEDB driver instead of ODBC. It's faster and more fully featured.
Then check whether the TableValidate setting is affecting it. To check that, back up the data then open the table exclusively in Visual FoxPro and issue the following in the command window:
append blank
go bottom
delete
pack
This will append and then delete a blank record, forcing the header counters to be recalculated. Then try it via the connection.
Also try turning tablevalidate off for the OLE DB driver as follows.
Create a text file called CONFIG.FPW in the same location as vfpoledb.dll, on a 64-bit machine this will be in 'C:\Program Files (x86)\Common Files\System\Ole DB'.
In the text file just put one line:
TABLEVALIDATE=0
And retry.
First: Do not use ODBC driver UNLESS your tables are VFP6 and earlier compatible. The last ODBC driver released was only for 6 and earlier. If you still need to use ODBC then check Sybase ADS driver. It is compatible with later versions too and local mode is for free.les
Second:Be sure that the tables you are trying to open are really not corrupted (not a table error is often occurs when the header info is off by pne record = you can check the details on "Not A table" entry on foxwikis. You might be looking into two different files when you check from VFP and through OLEDB driver. You can specify the fullpath to be sure.
I am writing an application in C# (.NET 4.0) which has to integrate with another, much older application. Part of the requirement is that my program must read data from three Btrieve files. I can assume that these Btrieve data files will already exist on the computers where my program is installed, and I can also assume that Pervasive PSQL V9 will also be installed and the relational and transactional service programs are running.
I have the associated DDF files, and I can install them as part of my application. The way they were created I have to put them in a different directory to where the Btrieve data files are. (They have to be a sub-directory of the directory where the data files are).
I didn't know anything about Pervasive or Btrieve when I started, but after a bit of experimentation I have got to the point where I can create a DSN using the 32 bit ODBC administration tool, and I can read from the data files using the ODBC ADO connector. All good so far.
My question is, is it possible to read from these files from my .NET program without having to create an ODBC DSN on the machine? In other words, is it possible to specify the directory where the *.DAT files are and the directory where the *.DDF files are in the ODBC connection string?
I'm not committed to using ODBC, I'm happy to use OLEDB or any other technology that allows me to reliably read from these files using .NET.
While a DSN-less connection allows your to connect without a DSN, you would still need a Database Name. Pervasive Database Names can be created on the fly using DTI or DTO. Using C#, I would suggest DTO.
If you can't create a Database Name, you can use OLEDB. It supports using a path in the Data Source parameter of the connection string as documented in the Remote Connections section of the OLEDB documentation.
One more caveat, make sure to compile your .NET program as x86 and not AnyCPU. The Pervasive OLEDB provider is only 32 bit. If you install your app on a 64 bit Operating System compiled as AnyCPU, it will look for a 64 bit provider and fail.
You should search for DSN-less connection. Instead of passing DSN=mydsn to the connect method (where mydsn is the DSN you set up) you pass DRIVER=xxx (where xxx is the name of the driver) and any other attributes it needs to direct it at the files. There are loads of sites with lists of connection strings for different ODBC drivers so one is bound to list Pervasive if you cannot locate the documentation for your ODBC driver. Another alternative to so look at your DSN in the registry where you'll find the names of the attributes you need to specify.
What I want is a Powerbuilder application that runs on Windows that runs from a CD (or some other external disk) that can read from an ASA database whose file is located on the same disk. But I want to do so without deploying the ODBC or OLEDB drivers. That is, I do not want to have to copy the driver files to the client's hard disk or add any registry entries. Is this possible?
In the Powerbuilder and ASA documentation they mention something about "embedded database connections" and supposedly you can specify the executable for the database server in the connection string. But that was no help.
When you attempt to connect to a database and "ODBC" is specified for the DBMS property of the transaction object, PowerBuilder is going to want to start loading drivers and looking to an ODBC datasource for the driver's info.
The only thing I can think to try, is to create all the registry entries at run time and point them to the driver files and the .db file on the CD. You might be able to make things easier with a file based datasource on the CD already, but you'll still need to create registry entries to setup the driver details. Then you can remove all those entries when you disconnect/close the application. I don't think you can do this completely without registry entries.
You do have to deploy the ODBC driver, that's how PB talks to SQL Anywhere. You dont have to create a DNS entry though, you can usr a DNSless connection.
http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForSybaseSQLAnywhere
Since you aren't getting much feedback I thought I'd offer this. I've done this with MS Access, but MS Access is much easier to connect to and most Windows PC's are able to connect via File based DSN.
You definitely want to avoid ODBC if at all possible look for File based DSN in ASA, but because it is more of a full database engine I doubt it is possible without ODBC and setting up ODBC via Registry Entries is possible but no fun at all especially if your clients are running different versions of Windows.
Here is the connect string I used for something similar but MS Access. I choose Access for this exact reason, it was for a RPG program and I wanted a database but didn't want to mess with ODBC.
Sample:
"Connectstring='Driver={Microsoft Access Driver
(*.mdb)};UID=abc;PWD=123; Dbq=C:\Program Files\Mafia Manager\mm.mdb;
Exclusive=1;'"