Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Did you find a solution to this problem? I'm researching and debating about trying to do something similar.
Copy link to clipboard
Copied
I would advise against using global temporary table across multiple CF pages. CF data sources don't give you the fine control you would need to guarantee that connections across separate page requests will use the same database connection session. Global temporary tables will be dropped (in MS SQL) as soon as the session which created them is closed, assuming they are not currently in use by another session. In CF the underlying server controls the closing of connections, not the developer.
An alternate approach, as previously suggested, would be to use standard tables.
Copy link to clipboard
Copied
@ Bob, agreed.
In the end I decided to store the search string in a session.sql.var so it could be called as requested and cleared. It does the most important thing making a real table doesn't - delete when the session closes.
I tinkered with SP's for a while, but these suffer from the same problem: once the session connection is broken, the temptable is dumped.
If speed actually becomes an issue, then I'll look at building and removing tables with the OnSessionStart, populating as queries are run, then dropping OnSessionEnd events. This seems messy to me, but I'll think about it if I have to.
I also wondered about CreateTimeSpan() to keep the query data alive for a while... this may work in certain circumstances, but not I don't think its best form my needs.
Thanks again for responding... hopefully this brainstorming will prove useful to others later.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more