I have written a Windows Forms application in C#, .NET framework 2.0, that uses System.Data.OleDb to talk to an SQL Server 2000 database, which is working fine. I now need to enhance the application to talk to an DB2 database on AS/400. Is this just a matter of configuring the connection string, or do I need additional driver software (where from) and/or references in my project?
I would like to still use OLEDB, but with DB2.
Edit: I downloaded the Microsoft OLE DB Provider but was unable to install it onto my desktop development PC because I do not have SQL Server installed. This provider seems to be only for integrating SQL Server with DB2, whereas I want to integrate a Windows Forms application with DB2. Is there a different download location for an OLE DB provider that does not require SQL Server, which I can use from a Windows desktop?
You will can use Microsoft's OLEDB for DB2 provider for this. Also the connection string will change.
Like:
Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=xxx.xxx.xxx.xxx;Initial Catalog=MyCtlg;Package Collection=MyPkgCol;Default Schema=Schema;User ID=myUsername;Password=myPassword;
Or you can use IBM's own IBM OLE DB Provider for DB2 that works without SQL Server.
You should look at Connection strings for IBM DB2 for all other providers and their configuration.
Related
I have a software developed in c# that must connect to SQL Server database, I must install it on a virtual machine not configured. I'm experiencing problems with performing a simple query.
Software is installed in other customers servers, so I'm quite sure about the correctness of the code. The problem could be, in my opinion, the configuration of the software or the configuration of ODBC in windows.
I'm using the following connection string:
Driver={SQL Server Native Client 11.0};Server=<serverName>;Database=<dbName>;Uid=<user>;Pwd=<password>;
and I configured the following query:
SELECT TOP(1) 1 FROM [dbName].[dbo].[TABLE]
In ODBC side:
I installed SSMS to check the connection is good, and it connects to
the DB correctly.
Drivers in the VM are (from settings>data source):
SQL Server Native Client 11.0
SQL Server ODBC Driver 13 for SQL Server
nothing under User DSN and System DSN.
Can you help me to troubleshoot this?
Thanks
I am trying to find out options to connect to a database that is hosted on cloud (Cloud Foundry) and is available as a service. The DB is offered through JDBC driver. I am trying to write a .netcore application (fine with any framework though) to connect to the DB service.
I had referenced the .netcore options and don't find a way to connect to such services. They have provided option to connect to Azure - but, that's a SQL DB. Request for a direction to try out the options:
ODBC - Can I try ODBC - JDBC bridge option?
Oracle Managed Dataservice - Not sure if this can help for the cloud foundry option.
Should I consider moving to .NET Framework instead of .NET Core?
The DB I am trying is a relational DB.
Connecting a C# app to a JDBC (Java) data source requires a bridge of some kind, possibly multiple bridges stacked atop each other. Examples include this, with two API translations (from ADO.NET to JDBC, and from JDBC to DBMS) --
C# ADO.NET app
-> OpenLink Enterprise Edition Generic Client ADO.NET Provider
... TCP/IP ...
-> OpenLink Enterprise Edition Request Broker &
Bridge Agent for JDBC Data Sources
-> JDBC Driver
-- and this, with three API translations (from ADO.NET to ODBC, and ODBC to JDBC, and from JDBC to DBMS) --
C# ADO.NET app
-> OpenLink Lite Edition ADO.NET Provider for ODBC Data Sources
-> OpenLink Lite Edition ODBC Driver for JDBC Data Sources
-> JDBC Driver
These Bridges (Enterprise Edition ADO.NET to JDBC, Lite Edition ADO.NET to ODBC, and Lite Edition ODBC to JDBC) come from my employer, OpenLink Software. There are other options.
Windows form application build in C# is unable to fetch the data from Oracle database without Oracle Client installed on the system, whereas the same exe build with Delphi7 platform + ODAC fetches data from Oracle without Oracle Client installed.
Can anyone explain the reason??
Connection with Delphi may be possible since it will be using BDE or Third party component like ToracleSession,TOraSession . These components do not require Oracle client installation.
Refer Following link for example --
https://www.devart.com/odac/faq.html
Refer Below link to connect to oracle without using oracle client.
https://begeeben.wordpress.com/2012/08/01/accessing-oracle-database-without-installing-oracle-client/
I have developed a .net based desktop application (WinFrm) using C# and MS SQL Server. I have used Typed DataSets with Stored Procedures to connect MSSQL database. Now i have migrated MSSQL database to MySQL database as per client requirements. But i find it too slow (While uploading excel files, and normal select operations over remote connection). I have used MySQL Installer 5.6.13 for Windows that includes MySQL Workbench, and i have migrated MSSQL database using MySQL Workbench. Do i need to change any thing else in the code to speedup its performance with MySQL?
Note:- MySQL Workbench is installed on Microsoft Windows Server 2008R2 and application accessing it remotely.
I am writing an application to run on a windows embedded ce 6.0.
the application needs to have access to a sql database and insert records into it.
My boss said i have to use Odbc commands, but so far i haven't seen proof that windows embedded ce 6.0 supports Odbc at all.
Can someone confirm that for me please before I go to my boss and humiliate myself in case I am wrong :p?
and In case i cannot use Odbc: is there any alternative?
Thank you for your help.
The Compact Framework has no support for ODBC. What type of database do you need to connect with? Many (SQL Server, Oracle, MySQL, SQLite, etc) have ADO.NET Providers
Here's an example for using the SQL Server provider.
Windows CE 6.0 does not support ODBC:
http://social.msdn.microsoft.com/Forums/en/sqlce/thread/ed42734d-1594-4fe0-90ca-9e55771421af
No, there’s no such API. ODBC is not supported on CE and OLEDB driver
is not available.
... or ...
http://docs.oracle.com/html/B10100_01/wnovw.htm
Windows CE does not support the ODBC driver manager.
However, one good alternative is the CE variant of standard (VB6 era) ADO, ADOCE:
http://msdn.microsoft.com/en-us/library/ms834317.aspx