I have a site and there is register system that introduce data into RDBMS via php. I had PostgreSql on localhost and now I wanna connect my website with "DB2 on Cloud" from cloud.ibm.com How can I do it and what I must use?
I used to connect with postgres via .php, but with db2 must I use JDBC,ODBC or other APIs? or with other things for RDBMS.
You can use IBM's php_ibm_db2 module to connect a PHP website to a remote database on Db2-on-cloud. This module uses an ODBC (also known as CLI in Db2) connection to the database, and it requires a CLI driver for the database connectivity, and such a driver is freely downloadable from IBM by following the instrucuctions).
You can use a classic interface or a PDO style interface, both are supported in php_ibm_db2.
You will have a learning curve, so careful study of all the documentation is necessary.
Depending on your platform, you may need to compile that module, but some precompiled modules are available.
See https://github.com/php/pecl-database-ibm_db2
See also https://www.ibm.com/docs/en/db2oc?topic=programmatically-php
Related
My client given code is programmed in c language to connect to Ingres Database in Unix environment.
This code is using API's such DBconnect(), DBExecSQL,DBRollback()....
I want to confirm that whether these API's are Ingres database specific API's?
Can I use these API's for connecting to Oracle DB.
If I cannot use those same API's to connect to Oracle DB, how to connect to Oracle Database from c program?
Thanks.
I can confirm they're not Ingres-specific API calls, which are things like IIapi_connect().
It's possible they're part of some 3rd party interface layer for which there's also an Oracle driver. Or they could be something they have written themselves and are in a library somewhere.
I have am existing project that runs on windows, mac, ios and android. I'm looking for a way to make a windows phone version, but I can't figure out how to use SQL. My current code base is very large and I can't "switch" to using EF. How can I get access to databases in UWP?
If you want to connect a local database, for example the SQLite, there are implemented libraries could be used do this stuff:
A Developer's Guide to Windows 10: (10) SQLite Local Database
If you want to connect a server-based database, for example, the SQL Server database, unfortunately, there is not a built-in API like ADO.NET that could be used to connect the SQL Server directly. And for a workaround, you would have to utilize a middle layer for example, the WCF Serrvie:
How to access data from SQL Server database in Windows Store app, although this sample is written for store app, the used approach is the same for UWP application.
You'll not be able to connect directly to a Microsoft SQL Server database. Instead you'll need to make some type of Service layer that communicates with the database and your phone app would need to communicate with that. For more information on how to do that see the code same and the video that Microsoft has hosted here:
https://code.msdn.microsoft.com/windowsapps/How-to-access-data-from-5f2602ec
I am actually trying to build an windows application and I need to maintain a database ("Not local") on cloud where can I actually maintain? I tried using phpmyadmin but it was to create a local db.
You can use SSH in conjunction with a database admin software such as Sequel pro for OSX or MySQL Workbench (http://www.mysql.com/products/workbench/) for other operating systems.
The most secure way typically would be to connect to the remote database server via SSH. Both these programs have that option available.
So you'd use the ssh key you'd use to SSH into the server, so tunnel into the database via SSH also.
I understand that SQLite3 does not operate under the client-server database application model, so I was wondering how one would actually connect to a "running" database server with a SQLite3 back.
Meaning if I were to have a database server running on Linux with a SQLite3 back, how would clients connect to this server? Would I have to use another RDBMS?
Thanks,
Jake
You don't have any database server running SQLlite3. You can just have applications using SQLlite3 (there is no client - server protocol involved). The data is in some files accessed by the libsqlite3 library linked inside the application. (so the data is local to the system running that application).
So by definition you cannot connect to a SQLlite3 database server. Such thing don't exist.
Read the http://www.sqlite.org/ front-page, which starts with
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
And the wikipage sqllite
If you want to have a database server (with external, possibly remote, applications interacting thru a client-server protocol with it) switch to PostGreSQL, MariaDB, etc...
Clients that connect to SQLite "server" just use API that looks like connection. Library for "connection" is embedded into application.
I am looking to find if there are special drivers I have to use in order to connect a .NET application to IMS.
On the Internet, I found articles saying that something called Open Database, provides JDBC and that it is one way to go. However, it is for java environment and I want to use .NET.
My question is:
How do I connect to IMS using Open Database from a .NET application (ASP.NET)? A sample would be great.
A .NET Data Provider driver is available for IMS as of Version 13. The .NET driver leverages the NativeSQL engine introduced in IMS V13.
More information is available here
Another solution would be to use an ODBC-JDBC Bridge and leverage the Java JDBC drivers for IMS DB access.
I believe the question is referring to the IMS Open Database, which is an IBM technology that allows access to IMS from distributed systems using the DRDA protocol. It does indeed allow JDBC-type access to IMS (with some smarts to convert the SQL calls to the appropriate DLI calls, and with some limitations, because, indeed, IMS is an hierarchical database). I don't know if there is a driver for .NET (and you need the driver if you intend to use SQL), but you can certainly experiment with it easily enough using the free IMS Explorer.
However, your IMS environment needs to be running IMS V11+, with CSL, ODBM, and IMS Connect configured for Open Database before any of this can work (and you need your IMS administrator to set that up for you). The Redbook I linked to in the beginning of my reply provides more details.
There's an IMS solution kit that was put out specifically showing how to connect to an IMS database using the IMS .NET Data Provider. The solution kit contains step by step samples from setting up the backend infrastructure to coding your client side application. The solution kit can be found here:
https://www.ibm.com/support/knowledgecenter/en/SSEPH2_15.1.0/com.ibm.ims15.doc.sk/ims_openacc_net.htm
IMS is not an open source database management system.
IMS is hierarchical, not relational.
Microsoft provides a package, a part of which provides what you may be looking for.
I would suggest you talk to the IMS folks in your organization about using SOAP web services to access IMS resources, which would perhaps be a more open solution.