8 Replies Latest reply on Dec 17, 2013 1:38 PM by Lars Burgess

    How does RhoMobile know which source adapter to use in RhoConnect?

    Ken Zhou

      I have a RhoMobile application and a RhoConnect server.

       

      The server is running but when the application trys to login, it returns "Server returned an error".

       

       

       

      my database info:

       

      instance name = G3MySQL

      Scheme = g2schema

      table = locationlist

       

       

      is this correct?

       

      class Locationlist < Rhoconnect::Model::Base

       

        @@query = 'SELECT locid, barcode FROM locationlist'

        @@create = 'INSERT into locationlist (locid, barcode) VALUES (?,?)'

        @@update = 'UPDATE locationlist SET locid = ? WHERE barcode = ?'

        @@delete = 'DELETE FROM locationlist WHERE locid = ?'

        @@url = 'DBI:Mysql:g3schema'

        @@user = 'root'

        @@pwd = '123'

       

        def initialize(source)

          super(source)

        end

       

        def login

          # TODO: Login to your data source here if necessary

          @dbh = DBI.connect(@@url, @@user, @@pwd)

        end