Announcement

Collapse
No announcement yet.

sc_change_connection()

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

  • sc_change_connection()

    I call sc_change_connection(old, new) in a login control app, then do an sc_redir() to a menu. The "old" connection is valid. The "new" connection is valid.

    The apps are designed around a schema, and the basic schema is set in the SQL of every app: there's no way to set this dynamically.

    The idea is to force a different database, with the same schema, for different users. (Think 100,000 users, millions of records, the user owns their database) "USE DatabaseName" would be pretty easy, if NetMake wasn't trying to make this work with Microsoft's abandoned Access product.

    Anyway, sc_change_connection() provides no return code feedback. It's a passive-aggressive macro.

    All of the apps use whatever connection is defined under SQL for that app. It's like sc_change_connection() does nothing.

    How can I make an app use a different connection?

  • #2
    I'm not sure,but this macro change connection for the application where is executed, not all applications.

    A workaround can be,to implement this logic on your own PHP, and call it on each onscriptinit
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Thank you, Giu. That is my current workaround.

      I'm developing a very long list of workarounds! At some point, the workarounds will outnumber the SC features. Then, I'll smear some lipstick on that pig and sell her!

      Comment


      • #4
        Originally posted by Giblet535 View Post
        Thank you, Giu. That is my current workaround.

        I'm developing a very long list of workarounds! At some point, the workarounds will outnumber the SC features. Then, I'll smear some lipstick on that pig and sell her!
        It's not difficult to implement what you want. Tedious, but not difficult, and you need to do just 1 time.
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment

        Working...
        X