Code inside database

Hi:

Is it possible to keep code inside a database row, for example, a
response.write or something

The idea is to keep a recordset opening command inside the db so when i use
that db the code is processed.

Thanks
Hugo Tavares [ Di, 10 Oktober 2006 18:02 ] [ ID #1495388 ]

Re: Code inside database

"Hugo" <hmt [at] imaginew.pt> wrote in message
news:O%23cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
> Hi:
>
> Is it possible to keep code inside a database row, for example, a
> response.write or something
>
> The idea is to keep a recordset opening command inside the db so when i
> use that db the code is processed.
>
> Thanks


No.

--
Mike Brind
Mike Brind [ Di, 10 Oktober 2006 18:13 ] [ ID #1495389 ]

Re: Code inside database

"Hugo" <hmt [at] imaginew.pt> wrote in message
news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
> Hi:
>
> Is it possible to keep code inside a database row, for example, a
> response.write or something
>
> The idea is to keep a recordset opening command inside the db so when i
use
> that db the code is processed.

Then how would you open the database to read the command?

Are you're talking about stored procedures or parameterized queries?
McKirahan [ Di, 10 Oktober 2006 18:28 ] [ ID #1495390 ]

Re: Code inside database

"McKirahan" <News [at] McKirahan.com> wrote in message
news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d [at] comcast.com...
> "Hugo" <hmt [at] imaginew.pt> wrote in message
> news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
>> Hi:
>>
>> Is it possible to keep code inside a database row, for example, a
>> response.write or something
>>
>> The idea is to keep a recordset opening command inside the db so when i
> use
>> that db the code is processed.
>
> Then how would you open the database to read the command?
>
> Are you're talking about stored procedures or parameterized queries?
>

He could be talking about SQL statements. You can store those easily
enough.

--
Mike Brind
Mike Brind [ Di, 10 Oktober 2006 18:33 ] [ ID #1495391 ]

Re: Code inside database

I'm talking about parameterized queries.

Let me explain better what i want:

I have a part of a website wich has several articles and thi articles came
from a database wich is working ok

But one of the articles should get a list of names from another table, the
idea was to keep the recordset open and when the article need to it display
the list of names from the recordset

Thanks


"McKirahan" <News [at] McKirahan.com> wrote in message
news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d [at] comcast.com...
> "Hugo" <hmt [at] imaginew.pt> wrote in message
> news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
>> Hi:
>>
>> Is it possible to keep code inside a database row, for example, a
>> response.write or something
>>
>> The idea is to keep a recordset opening command inside the db so when i
> use
>> that db the code is processed.
>
> Then how would you open the database to read the command?
>
> Are you're talking about stored procedures or parameterized queries?
>
>
Hugo Tavares [ Di, 10 Oktober 2006 18:32 ] [ ID #1495392 ]

Re: Code inside database

"Hugo" <hmt [at] imaginew.pt> wrote in message
news:ujrxrqI7GHA.4476 [at] TK2MSFTNGP04.phx.gbl...
> I'm talking about parameterized queries.
>
> Let me explain better what i want:
>
> I have a part of a website wich has several articles and thi articles came
> from a database wich is working ok
>
> But one of the articles should get a list of names from another table, the
> idea was to keep the recordset open and when the article need to it
display
> the list of names from the recordset

[snip]

It shouldn't be a problem.

We just don't have enough details to guide you.
McKirahan [ Di, 10 Oktober 2006 18:48 ] [ ID #1495393 ]

Re: Code inside database

"McKirahan" <News [at] McKirahan.com> wrote in message
news:z-qdnc_aee-yUrbYnZ2dnUVZ_oSdnZ2d [at] comcast.com...
> "Hugo" <hmt [at] imaginew.pt> wrote in message
> news:ujrxrqI7GHA.4476 [at] TK2MSFTNGP04.phx.gbl...
> > I'm talking about parameterized queries.
> >
> > Let me explain better what i want:
> >
> > I have a part of a website wich has several articles and thi articles
came
> > from a database wich is working ok
> >
> > But one of the articles should get a list of names from another table,
the
> > idea was to keep the recordset open and when the article need to it
> display
> > the list of names from the recordset
>
> [snip]
>
> It shouldn't be a problem.
>
> We just don't have enough details to guide you.

One thought is to embed something like
<list of names goes here>
inside of the article then, before displaying any
article, search for the string via InStr() and, if
found, then trigger a function call that will
access, format, and return the list of names
which will then be used to replace the tag.
McKirahan [ Di, 10 Oktober 2006 18:59 ] [ ID #1495394 ]

Re: Code inside database

Looks like it could be done using a SQL JOIN or by having in your code an
inner loop that retrieve associated data (that would be find just for the
record you are talking about).

Typically those data re stored either as a list in a field or in a "child"
table...

I don't see the need for storing code inside the db.

--
Patrice

"Hugo" <hmt [at] imaginew.pt> a écrit dans le message de news:
ujrxrqI7GHA.4476 [at] TK2MSFTNGP04.phx.gbl...
> I'm talking about parameterized queries.
>
> Let me explain better what i want:
>
> I have a part of a website wich has several articles and thi articles came
> from a database wich is working ok
>
> But one of the articles should get a list of names from another table, the
> idea was to keep the recordset open and when the article need to it
> display the list of names from the recordset
>
> Thanks
>
>
> "McKirahan" <News [at] McKirahan.com> wrote in message
> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d [at] comcast.com...
>> "Hugo" <hmt [at] imaginew.pt> wrote in message
>> news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
>>> Hi:
>>>
>>> Is it possible to keep code inside a database row, for example, a
>>> response.write or something
>>>
>>> The idea is to keep a recordset opening command inside the db so when i
>> use
>>> that db the code is processed.
>>
>> Then how would you open the database to read the command?
>>
>> Are you're talking about stored procedures or parameterized queries?
>>
>>
>
>
Patrice [ Di, 10 Oktober 2006 19:37 ] [ ID #1495397 ]

Re: Code inside database

This is what you want (watch for the stupidly long url wrapping):

http://www.aspfaq.com/show.asp?id=2241

--
Mike Brind


"Hugo" <hmt [at] imaginew.pt> wrote in message
news:ujrxrqI7GHA.4476 [at] TK2MSFTNGP04.phx.gbl...
> I'm talking about parameterized queries.
>
> Let me explain better what i want:
>
> I have a part of a website wich has several articles and thi articles came
> from a database wich is working ok
>
> But one of the articles should get a list of names from another table, the
> idea was to keep the recordset open and when the article need to it
> display the list of names from the recordset
>
> Thanks
>
>
> "McKirahan" <News [at] McKirahan.com> wrote in message
> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d [at] comcast.com...
>> "Hugo" <hmt [at] imaginew.pt> wrote in message
>> news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
>>> Hi:
>>>
>>> Is it possible to keep code inside a database row, for example, a
>>> response.write or something
>>>
>>> The idea is to keep a recordset opening command inside the db so when i
>> use
>>> that db the code is processed.
>>
>> Then how would you open the database to read the command?
>>
>> Are you're talking about stored procedures or parameterized queries?
>>
>>
>
>
Mike Brind [ Di, 10 Oktober 2006 21:14 ] [ ID #1495403 ]

Re: Code inside database

"Mike Brind" <paxtonend [at] hotmail.com> wrote in message
news:OIzG$AK7GHA.1252 [at] TK2MSFTNGP04.phx.gbl...
> This is what you want (watch for the stupidly long url wrapping):

That was before I found the short version :-)

>
> http://www.aspfaq.com/show.asp?id=2241
>
> --
> Mike Brind
>
>
> "Hugo" <hmt [at] imaginew.pt> wrote in message
> news:ujrxrqI7GHA.4476 [at] TK2MSFTNGP04.phx.gbl...
>> I'm talking about parameterized queries.
>>
>> Let me explain better what i want:
>>
>> I have a part of a website wich has several articles and thi articles
>> came from a database wich is working ok
>>
>> But one of the articles should get a list of names from another table,
>> the idea was to keep the recordset open and when the article need to it
>> display the list of names from the recordset
>>
>> Thanks
>>
>>
>> "McKirahan" <News [at] McKirahan.com> wrote in message
>> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d [at] comcast.com...
>>> "Hugo" <hmt [at] imaginew.pt> wrote in message
>>> news:O#cCQXI7GHA.4996 [at] TK2MSFTNGP03.phx.gbl...
>>>> Hi:
>>>>
>>>> Is it possible to keep code inside a database row, for example, a
>>>> response.write or something
>>>>
>>>> The idea is to keep a recordset opening command inside the db so when i
>>> use
>>>> that db the code is processed.
>>>
>>> Then how would you open the database to read the command?
>>>
>>> Are you're talking about stored procedures or parameterized queries?
>>>
>>>
>>
>>
>
>
Mike Brind [ Di, 10 Oktober 2006 21:38 ] [ ID #1495406 ]
Webserver » microsoft.public.inetserver.asp.db » Code inside database

Vorheriges Thema: Speeding up multiple updates
Nächstes Thema: AzMan non-admin problem under Win XP