Home
Extended ECM
CSIDE and OScript
SQL query for Favorites
Joe_Ehrenfeld
I am not using Builder but thought mayber this would be good place to post this problem. I want to be able to query the kuafprefs table to get a list of favorites for a user. The problem is the prefsvalue column is with a LONG datatype. We are using Oralce. Does anyone now how I can get that data out of the table and onto my ASP.NET web page?
Find more posts tagged with
Comments
Donna Nalls
Hi Joe,You are correct that the data is stored in an associative array in the kuafprefs table...unless you have some sort of parsing routine in the asp that could extract the the ids from the contents element, you might be out of luck.The only other option would be to customize the utility scripts that add/remove items in the kuafprefs table to also add the ids into a stand-alone table in your db schema. then you could write queries against that.....best of luck,donna
Janusz_Frydecki
I did this function to be able to to searches on long fields when testing with PL/SQL Developer. What it does is it converts long to VarChar2. This is definetly not the best way to do it but while waiting for the real answer.create or replace function MRQ_LongToVarchar2(In_TableName in VarChar2, In_ColumnName in Varchar2, In_RowID in RowID) return varchar2 is Result LONG;begin EXECUTE IMMEDIATE 'select TB.' || In_ColumnName || ' from ' || In_TableName || ' TB WHERE TB.RowId=:1' INTO Result USING In_RowID; return(Result);end MRQ_LongToVarchar2;cheers,Louis
Janusz_Frydecki
Also, as stated by Donna, you will have to parse the Assoc. An "easy" way of doing it is to use LAPI. This not really documented but fuctions are public. Basically, what you have to do is feed the fuction that normally receives callback from livelink with your own string.As you'll see, one of the problem of directly using database fields like that is that ressources are not parsed. This was done in .NET. Was your page in standard ASP? If so, I suppose you could do something similar by figuring what to pass to the LLInputStream.For this to work in .NET, you'll need a ref to LAPI_NETp and to vjslib.Louis