R
Rationalman
I'm new to ASP, and need to do something that should be
straightforward.
I want to access the database in my vbscript function on the
serverside, when someone clicks a button on the cient side. Originally
in my local environment it worked, as I was using createobject for
adodb (access database) in the
docalc function. However, on the webserver apparently I need to use
server.createobject, and that means running the function in the
server.
So how can that be done?
My thinking is that I'd have to repost the entire form back to the
same
web page and set some variable to indicate to the server side that
it's suppoesd to execute the database query and calculation. I've
tried
moving my function into the server code section and interrogating the
variable but so far not returning html.
I was hoping that I wouldn't have to post and redisplay all the
fields.
Is there a way around this? Can I just call a routine with the fields
that I'm concerned about?
I didn't want to belabour the details, so I'm hoping someone knows
what I'm trying to do. I'd like to keep it simple, so any pointers
appreciated.
Thanks,
Larry Knowles
*** I see that my pages start with . . .
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<%
*** THERE'S A BUNCH OF VARIABLES
*** Then some code which runs on the server
%>
*** Then the HTML
<html lang="<%=g_Language%>">
<head>
<title>Data Entry - <%=g_TableAlias%></title>
....
*** There's a javascript in the html
<script language="JavaScript" type="text/javascript">
function doSubmit()
end function
</script>
*** and a vb script (mine - no netscapers using the site)
<script language="VBscript" type="text/vbscript" RUNAT=SERVER >
Dim w
Dim oPopBody
Function doCalc
end function
</script
*** then there's a whole bunch of html which is the form
straightforward.
I want to access the database in my vbscript function on the
serverside, when someone clicks a button on the cient side. Originally
in my local environment it worked, as I was using createobject for
adodb (access database) in the
docalc function. However, on the webserver apparently I need to use
server.createobject, and that means running the function in the
server.
So how can that be done?
My thinking is that I'd have to repost the entire form back to the
same
web page and set some variable to indicate to the server side that
it's suppoesd to execute the database query and calculation. I've
tried
moving my function into the server code section and interrogating the
variable but so far not returning html.
I was hoping that I wouldn't have to post and redisplay all the
fields.
Is there a way around this? Can I just call a routine with the fields
that I'm concerned about?
I didn't want to belabour the details, so I'm hoping someone knows
what I'm trying to do. I'd like to keep it simple, so any pointers
appreciated.
Thanks,
Larry Knowles
*** I see that my pages start with . . .
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<%
*** THERE'S A BUNCH OF VARIABLES
*** Then some code which runs on the server
%>
*** Then the HTML
<html lang="<%=g_Language%>">
<head>
<title>Data Entry - <%=g_TableAlias%></title>
....
*** There's a javascript in the html
<script language="JavaScript" type="text/javascript">
function doSubmit()
end function
</script>
*** and a vb script (mine - no netscapers using the site)
<script language="VBscript" type="text/vbscript" RUNAT=SERVER >
Dim w
Dim oPopBody
Function doCalc
end function
</script
*** then there's a whole bunch of html which is the form