Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: datasession

$
0
0
Re: datasession
FoxInCloud
Re: datasession
06/08/2012
12:56:49 AM
3IS0209ZE Show this entire thread in new window
Gratar Image based on email address
From:
Thierry Nivelet (FoxInCloud)
To:
Attachments:
None
You can USE tables the same as you've always done.
The only difference is that 'global' dataSession is awAppHost's instead of 1

Thanks for the info. I had looked in the code, but I guess I did not get it.

I always used Stonefield's DT in my apps to manage data. For FiC I stopped using the SDT functions like opentable, etc. because the functions are scoped to a data session and I was not sure if that would work. Sounds like if I scope to apphost (or a form's private session) I could use STD or similar.


'public' datasession is actually 'default'
'default' is the datasession a form is called from
awAppHost Session is where your application works in

Whatever this problem is, it affects generation of grids if the data source is opened before the form.

if I put a grid on a form and give a view as a controlsource, say View1, then assign data to some columns, then generate, I will get error that "record xxx cannot instantiate becaiuse it cannot find recordouirce='View1'

1. Happens about 60%of the time, no pattern seen.
2. If suspend when prompted to debug, if the view was opened by the calling form, it is clearly there.
3. public or prvate datasession no different
4. not matter if view opened in xxsets, in calling form, or in child form. (this is a child form)

However it seems that if I make a private data session and put everything in there, it will generate.

Shouldn't it generate OK and run OK from a table or view opened by the calling form in a public data session?


From a form that has a public data session, I call OPENDBFS(), a function of mine that opens 200 tables. At first it opened them in the apphost datasession, which was bad, so I added SET DATASESSION TO before opening them. Now they open in datasesion 1.

But that also does not work. Now if I call a child form, still in the same public data environment, the grids cannot load because they cannot find any of the open tables - they are looking in some other datasession, not sure why.

What I did temporarily is put into the Load of the child form SET DATASESSION TO, but that helps only for loading initially.






Thierry Nivelet (FoxInCloud)


Viewing all articles
Browse latest Browse all 10393

Trending Articles