Xamarin ODBC Connectivity - c#

I'm looking to start a small application for maintenance techs to view production status of lines and whether they are running or currently throwing an error.
Essentially when a user keys in that the line is experiencing problems it will pass a value to the DB we have. The IOS app should be able to read the data from the table as to take it and then create visual warnings for techs to access view through the app. An example of this would be a small Green/Red Square representing the current status of a line
Does Xamarin.IOS support this via an ODBC connection? I have done some preliminary searches for accessing the data through a web server but I am not quite how this would be implemented.
Any help would be appreciated - Cheers,

It is better if you can write a separate backend server application to deal with DB. Expose that server through the Restful Web API and then access that Web API from the Mobile app. If you are planning to use an in-app local database, then you can write DB service with SQLite. Refer below link
https://github.com/praeclarum/sqlite-net

Related

Web service for Laravel

Assume that I have a third-party database application with SDK that can be used to retrieve data out of the database in XML.
On the other side, I have developed a website using Laravel framework of PHP. The website is supposed to display data from the database of the application.
In regards to above I have the following questions:
As far as I understand, I can either store the requested data in my website database or just show it without storing. What technique do you suggest?
How do I achieve xml data transfer from the database server to the website?
Taking into account that I have experience of development in C#, I assume that I have to develop some web-service that would run on the database server, retrieve the required data and send it to my website. So the web-service has to receive the requests from my Laravel website, retrieve data from database server accordingly and pass the xml response to my website that would finally display it. Am I on the right way? If so, could you please guide me on how to code and bind these parts?
Thank you in advance.
I have to agree with #Serge in the comments - there are many ways to do this because it is a very broad question.
My answer was mostly going to deal with how regularly the third party database was going to be updated but judging from your comments, I'm assuming it will be fairly often? In which case, I would likely connect directly to the third party database from your laravel app using the firebird driver found here: https://github.com/jacquestvanzuydam/laravel-firebird (Please note, I have never used this so I cannot comment on it's quality) instead of writing a C# web service. I don't know much about firebird itself but you will likely want to connect using an SSH tunnel or VPN for security reasons.
Then I would either store data in MySQL if you know it isn't likely to change very often (in this case you would use a laravel command, run on a schedule, to pull data out of firebird every [X] days/hours/minutes depending on the data) or, if the data is likely to change on each potential web request, using some form of caching system (redis, memcache, file cache etc) to speed up the web requests.
Sorry if that isn't particularly helpful - if you can provide more information maybe I can help you out further :)
Good luck!

Connect to MS Access Database with android

I'm working on a project and I need to connect to MS Access Database. The problem is that I'm using a pretty new platform , I'm using Visual Studio 2015 Xamarin and I'm developing to android with c# (thought this platform).
I already have a project with this Database using aspx and i need to connect the android application to this Database .
I could not find any answer for it , probably cause it's new .
Thanks for helping.
The problem is not related only to Xamarin or MS Access.
Everytime you want to use the same database in different applications (in your case a website and mobile apps), it is better to create a new layer (WCF Service or REST API) in order to access the same database on the server. This is more flexible and would be the right thing in your case.
Without moving the architecture to the next Level, you will always have such problems when mixing old and new technologies together.
If you just want to finish this quickly for school and use the database only on the device, then there is no way to use the MS Access database with xamarin. I recommend using SQL lite for this and there are lots of examples for that:
https://developer.xamarin.com/recipes/android/data/databases/sqlite/
It not clear if the database is to run “local” on the android, or you just wishing to connect to some web service that holds the database?
If you needing a local database to run 100% stand-alone on the Android device, then Access is not supported. Your best bet for a local database would thus be SQLite.
Perhaps you don’t need nor want a local data store. In this case if the Access database is on the server, then you would be forced to write some kind of web service to “interact” with your Android software and the web server (this would not be a "general" interface to the database, but a set of web services that you expose on the web site - this assumes you thus have control and are able to write software and implement a web service on the web site. So in this case some kind of “direct” connection to the Access database is not possible.
You could again certainly DIRECTLY connect to a server based database like SQL server – but this would assume the web hosting allows external ODBC connections to the database (often they don’t allow this, but some do).
So not clear is if you need a local database running on the Android that can THEN connect to some web or server based system, or you simply want the android to connect via the internet to some database hosted on some server and the Android device does not have a local database at all.
Regardless of the location of MSAccess, you cannot "connect" to a non server database like Access. So the question remains as to "where" you want this database to be used, and ALSO if you need a local data store on the Android device or not.

Shared MySQL database for ASP.NET and Java

I recently developed a Java Application for a client with MySQL database. Now he wants to have ASP.NET website connected with the Java Application.
I'm thinking of placing the database on a local server which would support both the desktop application and the website.
What i want to know is, is it the good way to handle these kind of scenario or is there any standard method?
I also want to know what are the steps to do this?
If you're worried about having both the desktop application and the web site accessing the database, you shouldn't worry as databases are designed to have many different programs accessing them at once.
If you're worried about keeping your data in a consistent state, you should look at using a transactional MySQL database engine such as InnoDB for a start. Also, in both your application and your website you are going to have to make sure that you validate any data going in/out of the database. i.e. if someone enters garbage data from the website, make sure that this will not be saved to the database and will not crash the desktop application.

Grabbing MS SQL Server Data for iPhone App?

I have a pre-existing desktop application that draws its information from a Microsoft SQL Server. The desktop application is written in C#/ASP/.NET.
I'd like to take this same data and present it in an iPhone application. What would be the best way to obtain and present the data?
I would recommend writing a web service that exposes the data and then interfacing with this from the iPhone across the network.
Calling web services and making HTTP calls is very easy on the iPhone.
Do you assume your iPhone application will have network access? If so I would go the webservice route as already mentioned. If it's a small database that you want available on the iPhone with out the need to access the internet to retrieve data you could look at converting the SQL Server database into a SQLite database and packaging it with your app.

J2ME communicating with MS-SQL

I am trying to create an integrated project in which I can update MS-SQL's database value using J2ME's application.
But I need more resources/links that let me fully understand how to go about writing implementation for this.
These are the few question in which I've got in mind.
How do I update the data that I've got from J2ME into MSSQL 2005?
How do I retrieve and view the updated value from the database?
How do I send sms to the J2ME's application, as the other application of mine need to send an 'alert' to the j2me app.
Short of writing your own ODBC library for J2ME, I would suggest you look at writing a web service layer over your database which the J2ME application can communicate with over HTTP.

Categories