error....Safety settings.....

S

Sandra

Hi all,

I´m new on these stuf and....
I´m running this JAVASCRIPT code in my ASP page and I´m getting the
error: Safety settings on this computer prohibit accessing a data
source on another domain.

....on my asp page I have the connection like that..

Thanks
<%
Application("sqlserver") = "CLESIO"
Application("strcn") = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=sa;Data Source=" + Application("sqlserver") +
";Initial Catalog=DBO_CRE"
%>

....and I´m trying to connect in the JAVASCRIPT to execute a
procedure.... How do I do that? Is this a correct code ? Is there
anyway to use the Application("strcn")declared in VBSCRIPT straight on
the Javascript?

<script language='JavaScript'>

function ValidaProdutos()
{
alert("Aqui");
var conn = new ActiveXObject("ADODB.Connection") ;

var connectionstring = "Provider=SQLOLEDB.1; Data Source=CLESIO;
Initial Catalog=DBO_CRE; User ID=sa;Password="

conn.Open(connectionstring)

var rs = new ActiveXObject("ADODB.Recordset");

var Valor_Solic;
var Cod_Parametro;

if( document.all['txtdias'].length )
{

for(i=0; i < document.all['txtdias'].length ; i++)
{
Valor_Solic = document.all['txtdias'].value
Cod_Parametro = document.all['hdCodParametro'].value
SQL = "Exec dbo_CRE.dbo.sp_IN_0029T " + session("Cod_LsPadrao") + ","
+ document.all['Cod_Presente'].value + "," +
document.all['txtQTD'].value + "," +
document.all['txtQTD'].value + "," + session("Cod_Func");
rs.Open(SQL, conn)

}
}
else
{
Valor_Solic = document.all['txtdias'].value
Cod_Parametro = document.all['hdCodParametro'].value
SQL = "Exec dbo_CRE.dbo.sp_IN_0029T " + session("Cod_LsPadrao") + ","
+ document.all['Cod_Presente'].value + "," +
document.all['txtQTD'].value + "," +
document.all['txtQTD'].value + "," + session("Cod_Func");
rs.Open(SQL, conn)
}
rs.Close;
conn .close;
}
</script>
 
M

Martin Honnen

Sandra said:
I´m running this JAVASCRIPT code in my ASP page and I´m getting the
error: Safety settings on this computer prohibit accessing a data
source on another domain.

...on my asp page I have the connection like that..

Thanks
<%
Application("sqlserver") = "CLESIO"
Application("strcn") = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=sa;Data Source=" + Application("sqlserver") +
";Initial Catalog=DBO_CRE"
%>

...and I´m trying to connect in the JAVASCRIPT to execute a
procedure.... How do I do that? Is this a correct code ? Is there
anyway to use the Application("strcn")declared in VBSCRIPT straight on
the Javascript?

<script language='JavaScript'>

function ValidaProdutos()
{
alert("Aqui");
var conn = new ActiveXObject("ADODB.Connection") ;

var connectionstring = "Provider=SQLOLEDB.1; Data Source=CLESIO;
Initial Catalog=DBO_CRE; User ID=sa;Password="

Use a HTML <form> to post the data to your ASP page and then in the ASP
page connect to the data base and store the data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top