iOS Question Reading from SQL Server and displaying data on phone.

Scotter

Active Member
Licensed User
Hi -

I'm about to start building a pretty simple app that does the following:
(1) Looks to the database of an already-running database-driven web site for
(a) Determining which site folder to pull banner ad image from to display on phone.
(b) Get from another table about eight fields of data to display on phone as "items" in a grid like you see in the grid.jpg I uploaded (not a spreadsheet-looking grid).
(2) Allow user to click on any "item" to pull up detail of that item (optional for version 1.0).
(3) At very bottom a link to the web site.

I'm experienced with Visual Basic and SQL but very new to B4i.
Wanting to know from you, the pros, if:
(1) Is this something that should be pretty easy to do?
(2) Has someone already done some or all of this and wants to share some code snippets to save me time? I'm going to search through the code snippets part of this forum now :)

Thanks!
 

Attachments

  • grid.jpg
    grid.jpg
    250.2 KB · Views: 188

sorex

Expert
Licensed User
Longtime User
if you know a web language (php/asp/...) you can (ab)use that to read out the data.

then you just have to use http download to reach the data and parse it.
 
Upvote 0

Scotter

Active Member
Licensed User
Wow. So... if that website I spoke of generates mobile adaptive html/css, I could use http download to point to a specific page that is already laid out as I like!? Any potential downsides to going this route?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
yes, a big one.

Apple only allows apps to work fully offline.

So a webview pointing to a web app will be rejected.
 
Upvote 0

Scotter

Active Member
Licensed User
yes, a big one.
Apple only allows apps to work fully offline.
So a webview pointing to a web app will be rejected.
Ah. Thank you for that information!
So... if my app needs to get data (current garage sales, for example)... hmmm...
If it just always shows "old data" (yesterday's garage sales) until the user taps "refresh" (where refresh is an online operation), would this be considered an app that "works" offline and thus be accepted by Apple?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
yes, it must have the look 'n feel of an app based on their guidelines. that doesn't include webview "apps".

in case of an app like you want to do you can include a data set as default.

if it was able to update (at app start) replace the default one with the downloaded one so that you always have the latest cached just in case the user has no connection.
 
Upvote 0

Scotter

Active Member
Licensed User
I think there was a sidetrack here (webview pointing to a web app) from my original question, which is if someone has some code to help get me started on reading data from SQL; specifically an SQL Server database that also happens to be feeding a web site.
Help, please?
 
Upvote 0

Scotter

Active Member
Licensed User
Thank you! Two questions:
(1) I notice the first link took me to a B4A-related post. Is this something I can easily adapt to an iPhone app?
(2) The second link takes me to B4J stuff. Same question about how it works with B4i?
Apology if this is something obvious. I'm a newb to the B4 thing :)
 
Upvote 0

Scotter

Active Member
Licensed User
jRDC is made of a server and clients. The server is implemented with B4J. The client code is compatible with all three platforms.
Thank you! It's slowly becoming more clear for me. Now... hopefully, just one more thing:
When you speak of server and client, I totally get what you mean by client.
But when you speak here of server, I'm confused. I think of the server as being a database server (SQL Server 2014 in this case) that I have set up and I want to get data out of it and into the phones. If I were building a web app, I'd use ODBC or similar protocol. What I'm hoping to find here is someone to say, "Oh yeah, just use these lines of code where you create a connection object where you need to put in an IP address to the database server and a username/pw and create a recordset object by putting in some SQL and voila!"
BUT then I see Erel referring to a "Java Server Port" along with MySQL and I get confused again. Is the "Java Server Port" a reference to the "transmission protocol" or the actual database? Apology that I'm not hip to all the terminology :)
 
Upvote 0
Top