Situation: in an ASP page i have created i read a table and i display an ID
from the table then i have a button and when i click on a run a new query and
then the window has to be closed. (This page is an example page made it to
specify my problem)
The problem: when i click the button the btnsave_onclick proc is executed
but if i insert the commands to open my table it is non completely executed.
If i leave only a msgbox("HELLO") and a window.close commands there are non
problem. If i insert all the rows to create a connection i don't see the
msgbox("HELLO") ; another problem is that i have set some Application
variables in Global.ASA and normally i can read them from vbscript code buto
in this proc i can't read them. Where is my error ?
I put my asp page code.
Thanks in advance for help.
<script LANGUAGE="vbscr ipt">
Sub btnsave_onclick
dbconn = CreateObject("A DODB.Connection ")
' from here commands are not executed
'and variables are non read
dbconn.Connecti onString = "Provider=VFPOL EDB;Data
Source=c:\inetp ub\wwwroot\acut \database\Aupd\ ;Collating Sequence=Machin e"
dbconn.Open "",""
'dbConn.Connect ionString = Application(Aup d_connectionstr ing")
'dbconn.Open
Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword")
SQLQuery= "Select * From Usrs"
msgbox("HELLO")
window.Close
End Sub
</script>
<%
cId = Request.QuerySt ring("Id")
Set dbconn = Server.CreateOb ject("ADODB.Con nection")
dbconn.Connecti onString =Application("A upd_connections tring")
dbconn.Open
Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword")
SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo,
Usrs.Area, Usrs.Act " & _
"From Usrs " & _
"Where Id='" & cId & "' " & _
"order by Id"
Set RS=dbconn.Execu te(SQLQuery)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Test</title>
</head>
<body>
<% Response.Write( Rs("Id"))%>
<p><STRONG><FON T face=Tahoma color=dimgray size="2">
<INPUT id=btnsave type=submit value="Conferma "></FONT></STRONG></p>
</body>
</html>
<%
dbconn.Close
Set RS=Nothing
%> 3 1646
Application variables exist on the server. You're trying to access them
from the client and run client side database code. ASP is a server-side
technology.
Ray at work
"Indiana" <In*****@discus sions.microsoft .com> wrote in message
news:23******** *************** ***********@mic rosoft.com... Situation: in an ASP page i have created i read a table and i display an ID from the table then i have a button and when i click on a run a new query and then the window has to be closed. (This page is an example page made it to specify my problem) The problem: when i click the button the btnsave_onclick proc is executed but if i insert the commands to open my table it is non completely executed. If i leave only a msgbox("HELLO") and a window.close commands there are non problem. If i insert all the rows to create a connection i don't see the msgbox("HELLO") ; another problem is that i have set some Application variables in Global.ASA and normally i can read them from vbscript code buto in this proc i can't read them. Where is my error ? I put my asp page code. Thanks in advance for help.
<script LANGUAGE="vbscr ipt"> Sub btnsave_onclick
dbconn = CreateObject("A DODB.Connection ")
' from here commands are not executed 'and variables are non read dbconn.Connecti onString = "Provider=VFPOL EDB;Data Source=c:\inetp ub\wwwroot\acut \database\Aupd\ ;Collating Sequence=Machin e" dbconn.Open "","" 'dbConn.Connect ionString = Application(Aup d_connectionstr ing") 'dbconn.Open Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword") SQLQuery= "Select * From Usrs"
msgbox("HELLO")
window.Close
End Sub </script>
<% cId = Request.QuerySt ring("Id")
Set dbconn = Server.CreateOb ject("ADODB.Con nection") dbconn.Connecti onString =Application("A upd_connections tring") dbconn.Open Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword")
SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo, Usrs.Area, Usrs.Act " & _ "From Usrs " & _ "Where Id='" & cId & "' " & _ "order by Id"
Set RS=dbconn.Execu te(SQLQuery) %>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Test</title> </head> <body> <% Response.Write( Rs("Id"))%> <p><STRONG><FON T face=Tahoma color=dimgray size="2"> <INPUT id=btnsave type=submit value="Conferma "></FONT></STRONG></p> </body> </html> <% dbconn.Close Set RS=Nothing %>
Ok, but if i need to read these variables how can i read them. Is it correct
to use post data to server and use another asp page to save my data using
request to read objects' values.
Thanks for help...
"Ray Costanzo [MVP]" wrote: Application variables exist on the server. You're trying to access them from the client and run client side database code. ASP is a server-side technology.
Ray at work
"Indiana" <In*****@discus sions.microsoft .com> wrote in message news:23******** *************** ***********@mic rosoft.com... Situation: in an ASP page i have created i read a table and i display an ID from the table then i have a button and when i click on a run a new query and then the window has to be closed. (This page is an example page made it to specify my problem) The problem: when i click the button the btnsave_onclick proc is executed but if i insert the commands to open my table it is non completely executed. If i leave only a msgbox("HELLO") and a window.close commands there are non problem. If i insert all the rows to create a connection i don't see the msgbox("HELLO") ; another problem is that i have set some Application variables in Global.ASA and normally i can read them from vbscript code buto in this proc i can't read them. Where is my error ? I put my asp page code. Thanks in advance for help.
<script LANGUAGE="vbscr ipt"> Sub btnsave_onclick
dbconn = CreateObject("A DODB.Connection ")
' from here commands are not executed 'and variables are non read dbconn.Connecti onString = "Provider=VFPOL EDB;Data Source=c:\inetp ub\wwwroot\acut \database\Aupd\ ;Collating Sequence=Machin e" dbconn.Open "","" 'dbConn.Connect ionString = Application(Aup d_connectionstr ing") 'dbconn.Open Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword") SQLQuery= "Select * From Usrs"
msgbox("HELLO")
window.Close
End Sub </script>
<% cId = Request.QuerySt ring("Id")
Set dbconn = Server.CreateOb ject("ADODB.Con nection") dbconn.Connecti onString =Application("A upd_connections tring") dbconn.Open Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword")
SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo, Usrs.Area, Usrs.Act " & _ "From Usrs " & _ "Where Id='" & cId & "' " & _ "order by Id"
Set RS=dbconn.Execu te(SQLQuery) %>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Test</title> </head> <body> <% Response.Write( Rs("Id"))%> <p><STRONG><FON T face=Tahoma color=dimgray size="2"> <INPUT id=btnsave type=submit value="Conferma "></FONT></STRONG></p> </body> </html> <% dbconn.Close Set RS=Nothing %>
Yes, make the form post, execute code on the server, and present the page
with the data you need.
Since you're just beginning, you may want to jump into ASP.Net instead of
the 20th century ASP. But if not, I suggest you read some ASP tutorials. http://www.google.com/search?hl=en&q=asp+tutorials
Ray at work
"Indiana" <In*****@discus sions.microsoft .com> wrote in message
news:DE******** *************** ***********@mic rosoft.com... Ok, but if i need to read these variables how can i read them. Is it correct to use post data to server and use another asp page to save my data using request to read objects' values.
Thanks for help...
"Ray Costanzo [MVP]" wrote:
Application variables exist on the server. You're trying to access them from the client and run client side database code. ASP is a server-side technology.
Ray at work
"Indiana" <In*****@discus sions.microsoft .com> wrote in message news:23******** *************** ***********@mic rosoft.com... > Situation: in an ASP page i have created i read a table and i display > an > ID > from the table then i have a button and when i click on a run a new > query > and > then the window has to be closed. (This page is an example page made it > to > specify my problem) > The problem: when i click the button the btnsave_onclick proc is > executed > but if i insert the commands to open my table it is non completely > executed. > If i leave only a msgbox("HELLO") and a window.close commands there are > non > problem. If i insert all the rows to create a connection i don't see > the > msgbox("HELLO") ; another problem is that i have set some Application > variables in Global.ASA and normally i can read them from vbscript code > buto > in this proc i can't read them. Where is my error ? > I put my asp page code. > Thanks in advance for help. > > <script LANGUAGE="vbscr ipt"> > Sub btnsave_onclick > > dbconn = CreateObject("A DODB.Connection ") > > ' from here commands are not executed > 'and variables are non read > dbconn.Connecti onString = "Provider=VFPOL EDB;Data > Source=c:\inetp ub\wwwroot\acut \database\Aupd\ ;Collating > Sequence=Machin e" > dbconn.Open "","" > 'dbConn.Connect ionString = Application(Aup d_connectionstr ing") > 'dbconn.Open > Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword") > SQLQuery= "Select * From Usrs" > > msgbox("HELLO") > > window.Close > > End Sub > </script> > > <% > cId = Request.QuerySt ring("Id") > > Set dbconn = Server.CreateOb ject("ADODB.Con nection") > dbconn.Connecti onString =Application("A upd_connections tring") > dbconn.Open > Application("db conn_RuntimeUse rName"),Applica tion("DbConn_Ru ntimePassword") > > SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo, > Usrs.Area, Usrs.Act " & _ > "From Usrs " & _ > "Where Id='" & cId & "' " & _ > "order by Id" > > Set RS=dbconn.Execu te(SQLQuery) > %> > > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=windows-1252"> > <title>Test</title> > </head> > <body> > <% Response.Write( Rs("Id"))%> > <p><STRONG><FON T face=Tahoma color=dimgray size="2"> > <INPUT id=btnsave type=submit value="Conferma "></FONT></STRONG></p> > </body> > </html> > <% > dbconn.Close > Set RS=Nothing > %> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dan R Brown |
last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to
break up this form into several "tabbed" sections, I break up the form using <div>
tags. Each <div style="display:none"> can be displayed by setting the style attribute
to "display:", or hidden with "display:none". This gives the illusion that the person
filling out the form is switching from page to page...without the overhead of extra
hits on the server,...
|
by: 3f |
last post by:
Hello;
We have made a web application that people can download from our web site
and installed on:
Windows XP
Windows 2000 Professional
Windows 2003 Server
Windows 2000 Server
|
by: drhowarddrfine |
last post by:
I'm working on a web site that could use some control using js but am
concerned about what problems I may have with potential users having
their js turned off. Has anyone had any serious problems with this
sort of thing? I know some of these potential users are with big
companies and am wondering if anyone had real problems with that.
|
by: robert.waters |
last post by:
Hello,
I am dynamically editing the contents of a page and using
document.write() to reload the new, edited content. However, on the
new page, any calls to functions located in external .js files (fyi:
same domain) fail with 'object expected' (IE6). If I subsequently
reload the page, everything works. Also, if I inline this code,
everything works.
Here is an example: (called from body onload event)
(This just rewrites the page with...
|
by: Lloyd Sheen |
last post by:
This IDE is driving me nuts. I needed another button so I copied an
existing one, changed the Text and the id and position by drag and drop.
Well then I run and get the following:
Control 'Button19' of type 'Button' must be placed inside a form tag with
runat=server
Can the IDE not do what it is supposed to do. It seems that it is a fight
to make it do anything or did I do something wrong? It would seem silly to
have to create a...
| |
by: PCgeek |
last post by:
sorry moved this over to javascript forum, didn't mean to post 2x!
Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
|
by: Noel S Pamfree |
last post by:
Problem 1
=======
I need to create a page for a friend who operates a school website. She
needs to set up a page so that only the Governors can access it. I thought
I'd try to use JavaScript to prompt for a password. (I am only an amateur at
writing JavaScript).
It works fine in my tests when using Firefox but when I load the page in
Internet Explorer it causes an error. (I am using the newest version 7 - the
|
by: Newbie |
last post by:
Hi All
Trying to create a mini-ASP web dev with a couple of PCs at school. When
the teachers are happy with the site on the LAN then going to upload it to
the school site. Problem is having real problems with the ASP side of
things.
Timeline of events is as follows:
1) Added IIS (via Add/Remove Windows Components) on WinXP Pro machine (6
|
by: webhead74 |
last post by:
Hi,
I'm having intermittent problems with queries from my php script to a
postgresql database.
I have a form where I can enter a search query - for instance a last
name. This leads to a results page with a brief bit of information
about each of the matching results. From there, I can click a link
associated with any of the results which takes me to a page with all of
the details. Pretty standard stuff.
|
by: jodleren |
last post by:
Hi
I know, that there are a lot of people having problems with orkut.com,
errors like "object expected" and named objects missing. When loading
the site can generate some 10 errors, and still just leave a blue page
- seems like it heavily rely on JS.
Still, me and friends having problems and orkut seems just to ignore
it.
I am sure, that other poeple have problems, and I really wonder what
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |