How to connect Rhoconnect with SQL Server 2012 for sync data with the app ?

Hi,

I am newbie in RhoMobile, i need to develop a simple inventory for product for exemple .

I created a RhoMobile app with the model "Product" and a RhoConnect app with a source adapter "Product" with some parameters.

My goal is to connect RhoConnect with a database i created in SQLServer 2012 containing an empty Product table.

I need a step by step explanation for what i must added to bind RhoConnect with SQLServer for tasks such as sync, add new data, receive data from database etc...

ps: sorry for my English, I speak French better

Can you help me?

Thanks

Darryn Campbell
Hi RahXen,We are publishing a

Hi RahXen,

We are publishing a 3-part series on getting started with Rhodes and Rhoconnect. The examples use SQLite instead of SQLServer, but they will show you clearly where each piece of the puzzle fits. Have a look at them and see if they help you:

Part 1

Part 2

(Part 3 is coming soon)

Thanks,

Javier

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


RahXen Legacy
Thank you very much for the

Thank you very much for the quick response, i see it now .

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
Javier,Just curious - In

Javier,

Just curious - In order to follow your tutorial series, which do you recommend - the production version of RMS or the Beta release?

Thanks!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
I recommend you stay with the

I recommend you stay with the production version, the tutorials have not been tested with the beta and I suspect they may not work as-is

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
OK, thanks a lot. I'm off to

OK, thanks a lot. I'm off to download the latest production version

And thanks for the tutorials, I'm sure they are a blessing to many (me included )

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


RahXen Legacy
Hello,I completed the

Hello,

I completed the tutorials part 1 & 2 and it was interesting. Pending publication part 3, I'll work on a more advanced personal example for practice .

And i'm still looking for a complete example of connection to database SQL Server.

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
AFAIK, there are 2 ways you

AFAIK, there are 2 ways you can achieve that :

(a) Thru a RoR webservice that connects to the SQL Server. You might need the SQL Server Adapter gem installed if not already. Your Rhoconnect source adapter would then have to have that RoR URL specified in the initialize method, like so :

  def initialize(source)

    @base = 'http://myRoRWebServiceURL/contacts'

    super(source)

  end

(b) Thru AsyncHTTP (without using Rhoconnect). Here also, you'd need a webservice that would connect to SQL server and expose the CRUD methods which can then be called from your Rhodes/RhoElements app.

Maybe Lars can chime in some more here...

Good Luck!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


RahXen Legacy
Hello,I want to use method (a

Hello,

I want to use method (a) with Rhoconnect and Source adapter, but i have no idea about RoR webservice . What is it ?

Thanks !

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
Hi, first off, a small

Hi, first off, a small correction is called for : You can use any webservice that can connect to SQL Server, not just RoR, although, IMHO, RoR plays very well with Rho. RoR=Ruby on Rails. You can Google it.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


RahXen Legacy
Hi, ok thanks for the

Hi, ok thanks for the clarification.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Part three is online now: The
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


RahXen Legacy
Hi, thanks for the tutorials

Hi, thanks for the tutorials.

Now my question is : how can i use Activerecord or DBI to connect RhoConnect with my SQL Server database ?

I installed the gem Activerecord-sqlserver-adapter, Activerecord and DBI.

Server name : myserver

Database : myData

Login : rhoconnect

Password : 'null'

So how can access in my database and where i configure the access in my project ?

My other question is, if i finished the development, I have to build the application being installed on our devices, then what about the Rhoconnect Application ?

Thanks for your help

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
My other question is, if i

My other question is, if i finished the development, I have to build the application being installed on our devices, then what about the Rhoconnect Application ?

Very wise question : Before embarking on developing a Rhoconnect app, be aware that you need to set up the pieces required for it in production. And you might have to spend on Rhoconnect licenses. You could however host your Rhoconnect app in Rhohub, but that's usually only for testing purposes and limited to 10 devices. If you do it the AsyncHttp way, you won't have to spend a dime, but then you'll have to do more coding.

Please refer these posts also :

https://developer.motorolasolutions.com/message/7437

https://developer.motorolasolutions.com/message/5189

I can send you a small video which shows how to configure a rails app to connect to SQL Server, if you're interested. Send me your email ID (PM me)

Message was edited by: Mark Nongkhlaw

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Log in to post comments