Code inside database

Code inside database

am 10.10.2006 18:02:05 von Hugo Tavares

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

Re: Code inside database

am 10.10.2006 18:13:24 von Mike Brind

"Hugo" wrote in message
news:O%23cCQXI7GHA.4996@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

Re: Code inside database

am 10.10.2006 18:28:04 von McKirahan

"Hugo" wrote in message
news:O#cCQXI7GHA.4996@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?

Re: Code inside database

am 10.10.2006 18:32:42 von Hugo Tavares

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" wrote in message
news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d@comcast.com...
> "Hugo" wrote in message
> news:O#cCQXI7GHA.4996@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?
>
>

Re: Code inside database

am 10.10.2006 18:33:43 von Mike Brind

"McKirahan" wrote in message
news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d@comcast.com...
> "Hugo" wrote in message
> news:O#cCQXI7GHA.4996@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

Re: Code inside database

am 10.10.2006 18:48:54 von McKirahan

"Hugo" wrote in message
news:ujrxrqI7GHA.4476@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.

Re: Code inside database

am 10.10.2006 18:59:59 von McKirahan

"McKirahan" wrote in message
news:z-qdnc_aee-yUrbYnZ2dnUVZ_oSdnZ2d@comcast.com...
> "Hugo" wrote in message
> news:ujrxrqI7GHA.4476@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

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.

Re: Code inside database

am 10.10.2006 19:37:12 von Patrice

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" a écrit dans le message de news:
ujrxrqI7GHA.4476@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" wrote in message
> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d@comcast.com...
>> "Hugo" wrote in message
>> news:O#cCQXI7GHA.4996@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?
>>
>>
>
>

Re: Code inside database

am 10.10.2006 21:14:05 von Mike Brind

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

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

--
Mike Brind


"Hugo" wrote in message
news:ujrxrqI7GHA.4476@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" wrote in message
> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d@comcast.com...
>> "Hugo" wrote in message
>> news:O#cCQXI7GHA.4996@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?
>>
>>
>
>

Re: Code inside database

am 10.10.2006 21:38:28 von Mike Brind

"Mike Brind" wrote in message
news:OIzG$AK7GHA.1252@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" wrote in message
> news:ujrxrqI7GHA.4476@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" wrote in message
>> news:0KWdnXvh6I_RV7bYnZ2dnUVZ_o2dnZ2d@comcast.com...
>>> "Hugo" wrote in message
>>> news:O#cCQXI7GHA.4996@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?
>>>
>>>
>>
>>
>
>