NetTalk Central

Author Topic: MultiSite with FM3 and SQL  (Read 2607 times)

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
MultiSite with FM3 and SQL
« on: April 27, 2012, 03:07:37 PM »
HI  everyone

Please help !
 
My scenario
http://Site1.mydomain.com connecting to SQL Database1 using FM3 with SQL Connector
http://Site2.mydomain.com connecting to SQL Database2 using FM3 with SQL Connector
If I compile them as exe with each running on different ports its working fine.

BUT

To run them both on port 80 connecting both to SQL seems to be a bit of a challenge for me.
I got the example MultiSite6 (59) working fine with tps files.

My questions
Should I be using the SQL connector of FM3 GUI interface ?
How does the compiled DLL’s reference the different FM3.ini file. It seems to default to the folder where the host,exe lives?
Where should the embed points be for the tables?
If I need to use connector string. How should they look like ?


Thanks
Louis

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: MultiSite with FM3 and SQL
« Reply #1 on: April 27, 2012, 08:49:59 PM »
Hi Louis,

With Multi-Site the one key to remember is that _only_ the INIT method in the WebServer procedure, in the DLL, is ever run. Any other embed code in the WebServer procedure is ignored (because it is the WebServer procedure in the Host which is running.)

Therefore the best place to set the owner string in the Web app, is in the WebHandler, ProcessLink method, before the parent call. And make sure the Owner string itself is THREADed.

cheers
Bruce

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
Re: MultiSite with FM3 and SQL
« Reply #2 on: April 28, 2012, 01:21:07 AM »
Thanks Bruce.

I think the penny has dropped :)

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
Re: MultiSite with FM3 and SQL
« Reply #3 on: June 03, 2012, 10:35:35 AM »
Im getting this almost right :) My dll's dont GPF anymore, But my dll applications are not connecting to SQL via FM3.
Can anyone assist me with the correct syntax to a MS SQL SERVER? Am I correct in saying that I can’t use the GUI in the dll to connect to the SQL backend?

Many thanks
Louis

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: MultiSite with FM3 and SQL
« Reply #4 on: June 03, 2012, 09:26:19 PM »
Hi Louis,

You'll have the connect window etc in your app, although of course you won't use it much.

The key is to set the connection string in the WebHandler - so no connection window appears at all. For advice on the exact syntax of the connect string, take a look at one generated by the FM3 window, or check out the clarion docs.

cheers
Bruce