Announcement

Collapse
No announcement yet.

New macros and example released

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

  • New macros and example released

    Hello there guys,

    We just release a new Scriptcase macro that you guys aways asked us to do, we implemented a macro to change the connection data (such as, host, drive, user, password, enconding, ...) dynamically, so now you can do it via code, not only change the info from the connection but you can also create a new one from scratch.

    Check the new example and its tutorial

    http://www.scriptcase.net/scriptcase...e-connections/

    http://www.scriptcase.net/scriptcase..._databases.php


    Enjoy
    Best regards,
    Carlos Lacerda.
    ScriptCase Commercial Manager.

    Skype: carlos.lacerda82
    Email: carlos@scriptcase.net
    Visit our Blog: http://www.scriptcase.net/blog/
    Visit out fan page: http://www.facebook.com/Scriptcase

  • #2
    Please change sc_connection_new() parameter "drive" to "driver" ... "Drive" is not the correct expression for that!
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Thanks Carlos, but sample don't works.
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        Hello guys,

        Thanks for your feedback. I will discuss it with our team.

        regards,
        Bernhard

        Comment


        • #5
          Originally posted by RHS View Post
          Please change sc_connection_new() parameter "drive" to "driver" ... "Drive" is not the correct expression for that!
          I asked then before and I was told that "drive" is the correct syntax for that.
          Best regards,
          Carlos Lacerda.
          ScriptCase Commercial Manager.

          Skype: carlos.lacerda82
          Email: carlos@scriptcase.net
          Visit our Blog: http://www.scriptcase.net/blog/
          Visit out fan page: http://www.facebook.com/Scriptcase

          Comment


          • #6
            Originally posted by Giu View Post
            Thanks Carlos, but sample don't works.
            Buddie,

            It is working here, Could you be more specific? Thanks.
            Best regards,
            Carlos Lacerda.
            ScriptCase Commercial Manager.

            Skype: carlos.lacerda82
            Email: carlos@scriptcase.net
            Visit our Blog: http://www.scriptcase.net/blog/
            Visit out fan page: http://www.facebook.com/Scriptcase

            Comment


            • #7
              Originally posted by carlos View Post
              Buddie,

              It is working here, Could you be more specific? Thanks.
              http://www.scriptcase.net/scriptcase...e-connections/ just gives me a blank page
              /Giuseppe

              Professional Scriptcase Services
              Some Customers opinions

              Comment


              • #8
                Originally posted by carlos View Post
                I asked then before and I was told that "drive" is the correct syntax for that.
                No, you would set a "driver" to access the databases, but not "drive" a driver to access ...

                The main thing is, it works ... but the little things are important.
                Best regards: - Reinhard -

                I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                Comment


                • #9
                  Originally posted by RHS View Post
                  No, you would set a "driver" to access the databases, but not "drive" a driver to access ...

                  The main thing is, it works ... but the little things are important.
                  Agreed. The correct term is "driver".

                  We invented this stuff. We know the terminology.

                  "Drive" is either a noun or a verb, depending on context. As a noun, "Drive" would usually mean a disk drive (a flat box that stores data), or as a verb it would likely mean "pilot a car".

                  "Driver" is a noun that refers to a software interface between two objects, either hardware or software.

                  Comment


                  • #10
                    And, THANK YOU!

                    Now, we can use ScriptCase for very large projects.

                    Comment


                    • #11
                      P L E A S E, use the correct term(s) (see above):

                      sc_drive.jpg
                      Best regards: - Reinhard -

                      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                      Comment


                      • #12
                        Caution: If anyone is planning on trying this - read thread: http://www.scriptcase.net/forum/show...k-in-prod-mode

                        Good idea, but I hope it is fixed before ScriptCase 9

                        Dave
                        Dave Prue
                        Code Whisperer
                        Lahar International Corp
                        www.lahar.net

                        Comment


                        • #13
                          Originally posted by RHS View Post
                          P L E A S E, use the correct term(s) (see above):

                          [ATTACH=CONFIG]1380[/ATTACH]
                          Hello Reinhard,

                          I will verify this issue.

                          regards,
                          Bernhard Bernsmann

                          Comment


                          • #14
                            Well, this was supposed to be fixed in 8.00.0015 today, but no luck.

                            It no longer generates a function-not-found error, but it simply does not work the same in production as in developer mode.

                            If anybody at NetMake needs a sample app that demonstrates this, I have one and would be happy to forward it.

                            The symptoms are simple to reproduce.

                            1. Create a database with one table, containing one column. Call this database "demo-1".
                            2. Create another database like demo-1 and call it demo-2. Use same username, password, table name, column name. Only the database name is different.
                            3. Add easily recognizable data to the two tables so that you can tell the two databases apart by their contents.
                            4. Create a grid using one of the databases, call it my_grid
                            5. Create two blank apps, blank_a and blank b with the following contents:

                            blank_a:

                            sc_connection_edit("conn_mysql", array( 'database' => 'demo-1'));
                            sc_redir('my_grid');


                            blank_b:

                            sc_connection_edit("conn_mysql", array( 'database' => 'demo-2'));
                            sc_redir('my_grid');



                            6. Create a menu app with two menu items, linking to the two blank apps.

                            When you run this in Developer Mode, it behaves exactly as I would expect, selecting a menu item changes the data that gets displayed.

                            When you run this from Production Mode, the data never changes. It acts like the grid is never re-opening the connection using the new connection info.

                            My belief is that in production mode, the grid uses the connection data that it already has in place, instead of init() noticing that the connection data has changed.


                            By the way, your own sample from the link at the beginning of this thread is doing exactly the same thing. THe charts for the two companies are THE SAME, not coming from different databases at all.


                            Dave
                            Last edited by daveprue; 10-31-2014, 08:22 AM.
                            Dave Prue
                            Code Whisperer
                            Lahar International Corp
                            www.lahar.net

                            Comment


                            • #15
                              Carlos,

                              Company B customer grid returns the same data as Company A.

                              Dave
                              Dave Prue
                              Code Whisperer
                              Lahar International Corp
                              www.lahar.net

                              Comment

                              Working...
                              X