Connecting iPhone to an ODBC Database - odbc

I'm new to iOS development. I have to make an application that connects to a Sybase database. My bet would be to use ODBC. Does anyone know how to connect to an ODBC enabled database from within objective C.
I've encountered applications that can do this but I don't seem to find any specific iOS related documentation or source code examples. Does anyone have even the slightest idea?
Thanks in advance!

There is a new ODBC SDK for iOS available at http://ODBCrouter.com/ipad complete with screenshots and an app you may download and use with the online demonstration system.

Mostly you want to get to remote databases through a web service layer. The app I'm currently working on does a TON of database interaction, and I wrote a number of PHP scripts that live on a web server on the same machine with the database. My PHP receives web requests from the app, does the DB work, and responds with JSON objects. You can obviously use any web layer you want--asp, perl, you name it--and respond with XML if you prefer. Doesn't matter.
I don't know of anybody actually interacting live with a database interface, ODBC or otherwise, directly from the phone. The way people seem to be going about it is via an intermediate web app layer.

iPhone SDK can use SQLite I am unsure of others. Perhaps the best choice will to be to free it of the ODBC issue and write a web service façade to provide the database access.

WCF Data Services /w Entity Framework and the OData client library for iOS will give you full CRUD access to the schema.

Related

Connect Azure database to existing Asp.Net web application

I'm actually working on an university project and have to figure out how to connect my windows azure database to an already existing ASP.net web application project.
The web application should run on smartphones and tablets.
Since this is a group project, we use TFVC to manage the project.
Our client supplied an mysql script that will create the tables needed.
The Database is hosted in Azure and we want to access it through Visual Studio ultimate, so we can reveice data from the DB and integrate it's data in the application.
I also got the connection string, so I could use it if needed.
So my question is:
How can I connect to the database through visual studio and afterwards: how can I access to it? With access I mean, how and where can I use SQL queries in Visual Studio?
I don't really know where to start, whether it is connecting to the DB via code or on another way.
Every kind of help is welcome.
Thank you in advance.
Your question is still quite vague on specifics of what you want to achieve but hopefully this answers it. If not, please provide even more detail on your question.
If you just want to see the DB in Visual Studio and interact with it
Download the Azure SDK
Go to Tools > Connect To Database
A side box will open and you can navigation through Azure then to your database.
Personally I prefer using SQL Server Management Studio, its much more responsive that the UI through Visual Studio.
If you want to connect your application to Azure, as in code an application that talks to a database, then you just need to replace the connection string in your Web.Config to your Azure Connection String. Then either use ADO.NET, Entity Framework or another ORM.
I recommend Entity Framework but it all depends on what your circumstances and project requirements are.
If the DB already has its schema defined get started here:
https://www.asp.net/mvc/overview/getting-started/database-first-development/setting-up-database
If its empty you can use code first:
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

Web Services that connect to PostgreSql

I'm creating an iPhone app that has a DB in PostgreSql. I want to create web services that connect to the database and fetch the data in and out, like for example , I want to create a web service for the login screen of my iPhone app that would connect to the PostgreSql database and authenticate the user.
How do I go about with the web services part..?
Looks like this question is destined to be closed, but before it is locked, I'll try to provide some direction. You can use any of your listed technologies to publish a web service. ASP.NET is my technology of most comfort, so might I recommend looking at using a simple web application with an exposed Page method, and using Npgsql as the database interface.
Using a simple page method isn't the most robust solution, but it will serve simple needs and requires very little specialized knowledge nor a WCF implementation, which can be daunting for some.

Offline support for web application in ipad

I have developed web application for restaurant. Its Front office is developed for iPad and back office maintain .net web application .
SQL Server 2008 is used as database.
I want to make offline application for Front office which can be used when unable to connect network / DB Server using iPad.
Master table's data cannot be Modified but, there should be latest data of master table to
transaction in other pages.
whenever system is connected to internet all offline transaction should synchronize with online data
It will be better if can suggest me solution without installing sql at client
I have think to use save data xml/json files as per table structure but its not preferable with large numbers of tables and clients and also security issue is there
Please guide me on this. Any help would be appreciated
Thanks in advance
Just to be sure: Your frontend is developed using HTML-Technologie?
You could use HTML5 Local Storage and/or offline caching with a manifest.
I think you have to put your data there by hand, but you could write a function for this...

SQL Server and iPad app interaction

I have to write an app for iPad that would take data from SQL Server and post it to the iPad. I looked up on this over the Internet and found that i have to write a web service to expose the data from SQL server using ASP.NET. I did an app previously in android that would take data from my dropbox a/c and display it to the user. I made use of the drop-box api available. I was wondering if anything like that exists for SQL? Also, i have to code in Obj-C for the iPad, so how will
i write ASP.NET code? I have more doubts.
Thanks in advance.
There are many options for web services. If you are developing in ASP.NET and don't want to invest to much time in just accessing the data I would suggest some software that will help you generate the source code.
WSSF (Web Service Software Factory) is software that will assist you in creating a SOAP web service and it generates source code for you. I do recommend however working through a tutorial first before just jumping into using this. WSSF uses visual studio as well.
Once you have a web service that packages your SQL data for communication through http requests. You will need to parse the data communicated in Objective-C. For this you'll find SudzC to be very helpful.
SudzC generates all the source code for accessing your web service in Objective-C, given the WSDL.xml file of your web service (a file that lays out the design of your web service).
Although these software will save you a lot of coding, I wish I could tell you that this will be a short and easy process. However this is vary rarely the case, developing this will take you a couple of days.
I do know that people often use RESTful web services when dealing with the iOS enviroment, although I do not have the same kind of experience with them as I do SOAP web services. I hope that this information is helpful to you.
I've done this. The best way is to use .NET 3.5 or higher to create a WCF (Windows Communication Foundation) project. These projects will let you communicate with your mobile application using REST or SOAP. They also let you send data in XML or JSON format. You will then need to create a REST or SOAP client in your IPad application to communicate with the server.
Use OData. See Creating an OData API for StackOverflow including XML and JSON in 30 minutes for how to publish your SQL Server data as an OData service. See Consuming OData using Objective-C for how to consume the OData service from your iPhone app.

iSeries + ASP.NET web application - Do I need any special license for iSeries?

I know how to access the iSeries using VB.NET. I use an OLE DB connection to connect to it. Now I am developing an ASP.NET web application using VB.NET that is going to use the iSeries for the database. Is there any special web license I need to access the iSeries over the web in this fashion? It's really just the web server accessing the iSeries locally, so I don't see how it's any different then the way I've done it already.
Check out this forum post, which appears to be a reliable source (IBM).
The way I read it, you don't need a license to use the OLE DB providers IBM includes as part of Client Access (a.k.a. iSeries Access or IBM i Access). Parts of Client Access require a license, but if you do a selective install and only pick the data access components you'll be in good shape.

Resources