473,499 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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'][i].value
Cod_Parametro = document.all['hdCodParametro'][i].value
SQL = "Exec dbo_CRE.dbo.sp_IN_0029T " + session("Cod_LsPadrao") + ","
+ document.all['Cod_Presente'][i].value + "," +
document.all['txtQTD'][i].value + "," +
document.all['txtQTD'][i].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'][i].value + "," +
document.all['txtQTD'][i].value + "," +
document.all['txtQTD'][i].value + "," + session("Cod_Func");
rs.Open(SQL, conn)
}
rs.Close;
conn .close;
}
</script>
Jul 20 '05 #1
1 4765


Sandra wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4710
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
6
8263
by: Sherif ElMetainy | last post by:
Hello Are these 2 properties (please see below) thead-safe? These properties are generated in the Resources.cs and Settings.cs files in Visual Studio 2005 (whidbey beta 1). According to CLI...
1
2067
by: Steven Baeten | last post by:
Hi All, I'm running a webpage-application where, in a aspx-page,a udl is called in vbscript in an xsl-stylesheet to access a database. When I want to execute this, I receive following error...
4
2228
by: Mark | last post by:
Good morning. I recently made some changes to my Access project, and I introduced some problems that I could not resolve. So I deleted the forms that I had altered and saved the project. Then I...
35
3735
by: jeffc226 | last post by:
I'm interested in an idiom for handling errors in functions without using traditional nested ifs, because I think that can be very awkward and difficult to maintain, when the number of error checks...
4
2018
by: dancer | last post by:
I get this error if an item in a radiobutton list is not chosen when filling in a form.. I added a RequiredFieldValidator, but I still get the message. Object reference not set to an instance of...
3
2234
by: dancer | last post by:
I am using Framework 1.1.4322. Who can tell me why I'm getting this error? My code follows Compilation Error Description: An error occurred during the compilation of a resource required to...
4
25563
by: Steve Kershaw | last post by:
Hi, I have a simple web page that starts Excel and fills it with some dummy data. Using IE I can run this web page from the C: drive (IE: "C: \startexcel.htm") and it runs fine. However, when I...
5
13455
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.