function in sql

hi
i create sql function like this:

function select_snif (snif )

if snif <> "" then SQLstr = "SELECT * FROM SWITCH where snif like '" &
snif & "'order by snif,id "

end function
i want to call this function in onchange tag how i can do it?
if i must to change this function to a java script how i do it?
thanks
@discussions.microsof [ Di, 22 August 2006 10:43 ] [ ID #1439933 ]

Re: function in sql

?????.? wrote:
> hi
> i create sql function like this:

Actually, this looks like a vbscript function designed to create, and I
presume, execute a sql statement
>
> function select_snif (snif )
>
> if snif <> "" then SQLstr = "SELECT * FROM SWITCH where snif like
> '" & snif & "'order by snif,id "
>
> end function
> i want to call this function in onchange tag how i can do it?
> if i must to change this function to a java script how i do it?
> thanks

Ordinarily, I would send you to a client-side scripting newsgroup such
as m.p.scripting.vbscript or m.p.scripting.jscript, but ....

Don't do this in client-side code!!! Hackers would love you!
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
http://www.nextgenss.com/papers/advanced_sql_injection.pdf

Submit the data in the snif variable to a server-side page, validate it
and run the statement there. Don't reveal details about your database
structure to potential hackers, let alone giving them the ability to
execute any sql statement they want.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
reb01501 [ Di, 22 August 2006 14:45 ] [ ID #1439934 ]
Webserver » microsoft.public.inetserver.asp.db » function in sql

Vorheriges Thema: Speeding up retrieval for CMS system
Nächstes Thema: Entire recordset not being exported to excel