Announcement

Collapse
No announcement yet.

Connected with two databases and a different host

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connected with two databases and a different host

    Connected with the two databases and a different HOST, I've done.
    In this case I have a problem when entering record into the database A.

    example:
    I have 2 database connection that is:
    con1 -> host 192.19.0.10; database name = A
    con2 -> host 192.19.0.1 ; database name = B


    I created a button in order to include records from database B to the database A.
    I use a macro sc_exec_sql, and the error message like "ERROR: schema" HR "does not exist"


    Please help me to get out of this error.
    Thanks Before

    Regard
    LeiGen

  • #2
    Re: Connected with two databases and a different host

    Did you specify the connection in sc_exec_sql?

    Code:
    sc_exec_sql ("sql command", "connection")
    Regards,
    Scott.

    Comment


    • #3
      Re: Connected with two databases and a different host

      Thanks Scott, you have helped me.

      Regards
      LeiGen

      Comment


      • #4
        Re: Connected with two databases and a different host

        Can explain better the procedure of connection of 2 differentes bases, 1 interbase + 1 mysql
        I no comprernds not this story of macro


        Thank you in advance françois

        Comment


        • #5
          Re: Connected with two databases and a different host

          "ERROR: schema" HR "does not exist" sounds a connection problem.

          Like oracle or others database that you need to connect on a schema.

          Please, put turn on the debug mode.

          Comment


          • #6
            Re: Connected with two databases and a different host

            For example
            Can give me myself a script of connection for two database mysql.
            I am lost

            THANK YOU

            Comment


            • #7
              Hi DUFOUR,
              Here is an example to connect to another database. First you need to create 'connection_A' and 'connection_B'. Please go to ScriptCase Database>NewConnection.


              #1 Example to execute a SQL query using 'connection_A'

              PHP Code:
              sc_lookup(rs"select field from table"'connection_A'); 
              #2 Example to execute a SQL query using 'connection_B'

              PHP Code:
              sc_lookup(rs"select field from table"'connection_B'); 
              Note: Your connection NAME is the name that you define in ScriptCase Database>NewConnection
              Best Regards
              Hiram BQ

              Comment


              • #8
                How did make query with 2 different database and 2 different host ?

                Comment

                Working...
                X