NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on April 05, 2017, 05:25:01 AM

Title: Busyhandling MARS p_web.sqlsync , where
Post by: Alberto on April 05, 2017, 05:25:01 AM
Hi,
I have a dct with many files, noone of them has a driver option in the dct
All tables are MSSQL
Where in the NT server do I have to set Bussyhandling, Mars and sqlsync to be active for all procs and threads?
Thanks
Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: osquiabro on April 05, 2017, 06:30:11 AM
in your connection string ex:

;DRIVER={SQL Server Native Client 11.0};VERIFYVIASELECT=True;MARS_Connection=Yes
Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: Alberto on April 05, 2017, 09:58:28 AM
No matter what I do I allways get "THe connection is busy with another......" running hits code:

Sql and Sql1 are both stupid tables
The forst select run ok and when looping and trying to select or insert in another table, sql1 or a non stupid table I get the error.

    !generate all specialities browse
    DO OpenFiles
    SQL{PROP:SQL}='SELECT e.ID FROM EXAM_GROUPS e '&|
            'left outer join Users2ExaGr u on u.id_user='&P_WEB.GSV('LOGIN_ID')&' and id_exa_group=e.id '&|
            'where e.name<>'''' and u.id is null '   
    LOOP
       next(sql)
        IF ERROR() THEN BREAK end
        SQL1{PROP:SQL}='SELECT ISNULL(mAX(ID),0)+1 FROM Users2ExaGr'
       if errorcode()=90 then MESSAGE('MAX: '&SQL1:C1&' '&fileerror()) end
        NEXT(SQL1)
        SQL1{PROP:SQL}='INSERT INTO Users2ExaGr (ID,ID_USER,ID_EXA_GROUP) VALUES ('&SQL1:C1&','&P_WEB.GSV('LOGIN_ID')&','&SQL:C1&')'
        SETCLIPBOARD(SQL1{PROP:SQL})
       if errorcode()=90 then MESSAGE(Sql:c1&' '&fileerror()) end
!       clear(u2e:record)
!       U2E:ID_USER      = P_WEB.GSV('LOGIN_ID')
!       U2E:ID_EXA_GROUP = Sql:c1
!        MESSAGE('intento U2E:ID_EXA_GROUP= '&Sql:c1)
!       Access:Users2ExaGr.Insert()
       !if errorcode()=90 then MESSAGE(U2E:ID_EXA_GROUP&' '&fileerror()) end
    end
Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: Bruce on April 05, 2017, 10:10:20 PM
Hi Alberto,

>> Where in the NT server do I have to set Bussyhandling, Mars and sqlsync to be active for all procs and threads?

It needs to be on for the _first_ table that your program uses. ie it needs to be set when it makes the initial connection.
If you are using FM3 then there are settings for that there.

cheers
Bruce

Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: Alberto on April 10, 2017, 04:40:16 PM
Im still having problems.

I have fm3 but I dont see any setting in any of the examples.

Please give me more info

Thanks
Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: Bruce on April 10, 2017, 10:21:05 PM
For FM3 support you are best off emailing Geoff.
However I found something in the FM3 docs;
http://www.capesoft.com/docs/fm3/fm3.htm#SQ24

Cheers
Bruce
Title: Re: Busyhandling MARS p_web.sqlsync , where
Post by: terryd on April 11, 2017, 03:31:13 AM
Hi Alberto
We use this string in that field with no problems

/MULTIPLERESULTSETS=TRUE /BUSYHANDLING=2