NetTalk Central

Author Topic: Source procedure in a multi tenant app  (Read 3626 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Source procedure in a multi tenant app
« on: November 03, 2014, 01:05:43 PM »
Hi all,
In my multi tenant app I set the sql connection string in the web handler proc so the user hits the right db, no problem here.

But then I've got this (clarion) source proc that does some calc + updates using pure sql. Should I set the connection string here as well before issuing the sql statements? My guts say yes but I'm not quite sure I understand why  ???

Anyone?

Peter

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Source procedure in a multi tenant app
« Reply #1 on: November 03, 2014, 10:55:24 PM »
no as long as you have set it in the correct place in the web handler (process link embed) then the connection is set until that thread dies. If you were running the source procedure on its own thread then yes you would need to set it.

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Source procedure in a multi tenant app
« Reply #2 on: November 04, 2014, 12:58:40 AM »
Thanks, Kevin.

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Source procedure in a multi tenant app @Kevin
« Reply #3 on: November 04, 2014, 11:07:11 PM »
Hi Kevin,
That is a nice aspect you point out:"on its own thread".
How would i do that?
Thanks,
René
Rene Simons
NT14.14

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Source procedure in a multi tenant app
« Reply #4 on: November 04, 2014, 11:25:47 PM »
Start()