Script(s)

technology as-is

June 16, 2004
by gchandra
0 comments

ASP : Vbscript – Sqlserver Connection String

Set Conn = Server.createobject(“ADODB.Connection”) Conn.Open “Provider=sqloledb;” & _ “Data Source=ServerName;” & _ “Initial Catalog=DatabaseName;” & _ “User Id=UserID;” & _ “Password=PWD”

June 16, 2004
by gchandra
0 comments

ASP : VbScript – Escape Single and Double Quotes

FUNCTION PreSubmit(p_sTargetString) PreSubmit = REPLACE(p_sTargetString,”textarea”,””) PreSubmit = REPLACE(PreSubmit,”%”,”%”) PreSubmit = REPLACE(PreSubmit,”‘”,”’”) PreSubmit = REPLACE(PreSubmit,””””,”””) PreSubmit = Trim(PreSubmit) END FUNCTION