Hi All
I have to create a very generic procedure that can accept 2 data sets.
These data sets will typically be:
1) Lines of HTML code saved into a table for frequent use but having
variable fields which have to be replaced with data depending on the request
made to the database
2) Variable name, variable data records to be used to replace the variables
in the first data set
e.g.
1) table1 (HTML varchar(8000))
rows:
<HTML>
<UL>
<LI>%%Fld1</LI>
<LI>%%Fld2</LI>...
2) table 2 (VarName varchar(100), VarValue varchar(2000))
rows:
VarName VarValue
%%Fld1 MyData1
%%Fld2 MyData2
Since it has to be generic and is going to be used by different systems on
dirrent server, etc, I would like to pass the entire data sets to my
procedure.
I would not prefer to use temporary or permanent tables as this would
possibly complicate the use of the procedure by multiple users at the same
time.
I also have to consider performance. I've written the basic parser code for
inside the procedure but need advice on how would be the best way of getting
the 2 data sets into the procedure.
Any advice would be greatly appreciated.Hi
You may want to consider using XML instead of HTML.
John
"Chan" wrote:
> Hi All
> I have to create a very generic procedure that can accept 2 data sets.
> These data sets will typically be:
> 1) Lines of HTML code saved into a table for frequent use but having
> variable fields which have to be replaced with data depending on the reque
st
> made to the database
> 2) Variable name, variable data records to be used to replace the variable
s
> in the first data set
> e.g.
> 1) table1 (HTML varchar(8000))
> rows:
> <HTML>
> <UL>
> <LI>%%Fld1</LI>
> <LI>%%Fld2</LI>...
>
> 2) table 2 (VarName varchar(100), VarValue varchar(2000))
> rows:
> VarName VarValue
> %%Fld1 MyData1
> %%Fld2 MyData2
> Since it has to be generic and is going to be used by different systems on
> dirrent server, etc, I would like to pass the entire data sets to my
> procedure.
> I would not prefer to use temporary or permanent tables as this would
> possibly complicate the use of the procedure by multiple users at the same
> time.
> I also have to consider performance. I've written the basic parser code f
or
> inside the procedure but need advice on how would be the best way of getti
ng
> the 2 data sets into the procedure.
> Any advice would be greatly appreciated.
>|||No go, unfortunately. There's a strict architecture in our environment
"John Bell" wrote:
> Hi
> You may want to consider using XML instead of HTML.
> John
> "Chan" wrote:
>|||Then you will probably have to resort to string manipulation. This may help
http://www.sommarskog.se/arrays-in-sql.html
John
"Chan" wrote:
> No go, unfortunately. There's a strict architecture in our environment
> "John Bell" wrote:
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment