Direct connect mysql server without php in swift- 4(code) iOS - ios

I am trying to connect to MySqlServer by code in swift directly without php file.
Is there any way to do the same? we have enterprise application where we need to direct connect with mysql db

It is possible using mySqlClient.We need to enter host name, user, password and db_name and connect to db. Using this we can query db directly and fetch data therein

There is only one way to connect with database without using php.
use firebase database. No need for server side coding .. you can get and set data using swift. it looks just like you are posting data in mobile database.

Related

Running the same Rails code on multiple laptops and saving the data from all of them to the same Database

I am trying to run the same rails code on multiple laptops on localhost:3000. How can I save the data submitted from the different laptops to save in a single database. Or, they would share the same database and if someone has submitted data, it would automatically be on the other persons laptop. Also consider that there won't be any internet connection, but we can connect them with Ethernet cables. Also, we are using sqllite3 . Thanks!
Probably you would like to use mysql in that case - it is designed to work this way, you just specify remote host instead of 'localhost' in config.
However, you can put sqlite database in ftp/sftp/webdav server, mount as local folder (kinda complicated on windows tho), and try to use it, which will work REALLY slow.

How to manually update Relay store without querying server?

Let's say I have some data that I obtained through a non-graphql endpoint for example from third party server (firebase).
How do I put the data into the local relay store?
Is there an easy way to add / edit / overwrite data to relay store directly without going through query or mutation?
A non public RelayStoreData field is accessible from the Relay.Store instance and it gives you direct access to the records contained in the store. I haven't done anything with this myself but you could try modifying the cache directly like this:
RelayStore._storeData._cachedStore._records[recordId][fieldName]=newValue
I would use relay without a server, defining your graphql schema locally and doing your API requests from your graphql schema the same way you would query a database in your schema.
https://github.com/relay-tools/relay-local-schema

How to create communication API between my website and my Client's website

I would like to create a communication API between my website which was built using rails and another website, so I can send data from my database to there website. So my idea is to use node.js where I will create real-time, so it will work in the following procedure. My Database is connected to rails, rails will send it to redis and then redis will send it to node finally node will send it to the other website using socket.IO
The question: Is that valid? Is there easier way?
Use just rails, create a controller and action that returns a json.
You can use https://github.com/rails-api/rails-api to speed things up.
I don't think that is a good way
You should consider lowering your dependency chain (DB -> Rails -> Redis -> node -> client)
Is redis necessary? (you can connect node to your DB, if you need realtime)
And if you don't need a realtime system, consider using http instead, you can return any type in rails (your own json, html, ...)

Connecting directly to Database in Rails (Heroku?)

I am currently writing RoR applications and deploying using Heroku.
Is there any way to connect directly to the DB using a connection string?
I guess what I am asking here is can I connect directly to the DB, is there a connection string, how can I get the connection string, etc. I want to be able to perform querys on the DB outside of the terminal I am developing. My current solution is using
heroku db:pull 'anotherPOSTGRESQLdatabasesCONNECTIONstring'
and then performing queries on that database, but this is not a valid solution, because I am developing this application for users who are not code savvy, and they should be able to perform queries on the database without me or them using the terminal.
I think what you might be asking is available here: https://postgres.heroku.com/
Click "Try For Free", Select the option where you already have a heroku account, login with the correct credentials.
Now you can choose the database you want to perform actions on, and create "Data Clips" that your clients can run to get data reports etc (data clips can be used to run arbitrary select SQL commands).

Oracle error occurred, but error message could not be retrieved from Oracle

There is a delphi application in which I am trying to connect to Oracle database Using provider MSDAORA.1 but problem is coming in connecting. Oracle error message which is coming is "Oracle error occurred, but error message could not be retrieved from Oracle"
I am able to connect to database with Oracle10g client.
Connection String: Provider=MSDAORA.1;
User ID=murat;
Password = murat;
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST= INGPSP)(PORT=1521))(CONNECT_DATA=(SID=INGPSP)));
Persist Security Info=False;
Please provide your expert opinion what can be the reason of this?
The service name seems to be lacking in your address.
Set a tnsnames.ora file, and use the entry as data source instead of the data_source parameter you set. Follow the steps available on the faq.
Or use use connection strings like '//host[:port]/[service_name]' for your data source: //INGPSP:1521/ServiceName
For Oracle, both Microsoft and Oracle OleDB providers are known to have issue with BLOBs. If you can, use another mean of connection.
What I see that is strange is that your HOST and SID are the same. The HOST is the name of the machine on your network and the SID is the database instance on that machine. I created the following ConnectionString for the PRD3 database on machine DB19 (there are multiple databases on DB19) on our network. I was able to connect to the database successfully with real User ID and Password.
Provider=MSDAORA.1;
Password=123456;
User ID=abc;
Data Source="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db19)(PORT=1521))(CONNECT_DATA=(SID=prd3)))";
Persist Security Info=True
Normally the Data Source I use is the database name as defined in TNSNAMES.ORA. It is a lot less to type (fewer potential errors) and can be changed to another database without recompiling the program (such as switching between a development database and production database).

Resources