Why Sub Procedure Does Not Work
I am trying to construct a sub procedure that concects to db , executes a stored procedure and returns a recordset. Connection to db and executing the stored procedure works fine.
The problem is that when I call the sub in the asp page to be executed the recordset is refused to be returned from the sub and the recordset itself does not appear to be constructed. or in another words the error displayed is: 'object required' --> refering to my recordset --> 'rs'
I do not know why, can any one tell me the reason, I tried much but with no result.
NOTE: For testing puropses I looped through the recordset isnide the sub itself and it worked fine Code:
View Replies
ADVERTISEMENT
i use a IIS 5.1 with win XP with the newest updates etc.
its possible to start aspx and html files but not asp files
what could it be ? what can i check ?
View Replies
View Related
Can a ASP work like a CGI.(Email Scripts) ? Can a ASP script for email will work, if a Script is on 1 server and form(html.form) is on another server and a thank you page is on 3rd server. Like if u don't know about a CGI there are many websites who give you permission to use their script by editing little bit in yours form and place them on yours server website, there are number of site.
And 1 more thing I want to ask is if some one use a windows server he have a form html on that server, can he run asp script which is on Linux server to get form result on his desired email id.
View Replies
View Related
I have the following code:
<%
Sub makeSafe(theString)
theString = Replace(theString, "'", "''")
theString = Replace(theString, chr(34), chr(34))
theString = Replace(theString, "=", "-")
theString = Replace(theString, "_", "-")
theString = Replace(theString, "../", "")
theString = Replace(theString, "--", "")
theString = Replace(theString, ";", "")
theString = LCase(theString)
End Sub
%>
I then call it using Code:
thePassword = Trim(request.Form("password"))
thePassword = makeSafe(thePassword)
but i then get an error message saying Quote: Type mismatch: 'makeSafe'
View Replies
View Related
I'd like to write an ASP routine that builds a table and is called when a button is clicked (not a submit button). Is there a way to do this? Everytime the button is clicked, I want to call the procedure so another table is built. Dynamically building a new table. Code:
View Replies
View Related
cannot using onAfterPrint in IE 6.0, the page can print but cannot close.
Why??
my code like as below
<body
:
<script language="javascript" type="text/javascript">
<!--
window.print();
//-->
</script>
</body>
View Replies
View Related
<!--#Include Virtual="/bug/adovbs.inc"-->
<title>Bug Status Board</title>
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =
techsupportBT; User Id = sa; Password="
Set rs = server.CreateObject("ADODB.Recordset")
sSQL="SELECT T.BugIndex, T.[Date Entered], T.DESCRIPTION,"
sSQL= ssql &" T.Company, T.Technician, T.Developer, T.PROGRAM, "
sSQL= ssql &" T.Status, T.PRIORITY, T.[Version Fix], n.noc"
sSQL= ssql &"FROM TSHIGHISSUES INNER JOIN noc ON T.BugIndex =
n.bugindex "
set rs=conn.Execute(ssql)
and this is the error message that I get Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'INNER'
I cannot find an example anywhere that helps with this situation. This works fine in SQL, but for some reason asp is being a pain.
View Replies
View Related
I copied ASP/VBScript code from several sources and adapted it to my page and variables. Here is my current code for implementing CDO:
View Replies
View Related
Is there somebody who can explain to me how I can use a Global.asa to store Functions and Variables in it? I understand that there are 4 events that can be used in a global.asa : Application_OnStart, Application_OnEnd, Session_OnStart, Session_OnEnd
But still i don't get how i can CALL functions of variables. Because with those 4 things they start all in the beginning or in the end of a session or application.
For example i use an encrypt function in different pages, can i just put it in de global.asa and call it when i need it?
View Replies
View Related
I've just moved all asp file from IIS4/5 to IIS6(2003), but they don't work.It there any trick?
View Replies
View Related
I need to provide a pulldown with work weeks displayed.Is there any easy way to do this?
I would like to go 6 months from the current date and show a week as Oct. 11- 15.Which is Monday to Friday.
View Replies
View Related
I have an asp page. In this there is a form when submit it have to chech if the fields are not emtpy.When it not empty it wil insert into a database an a mail.If a field is empty it send it anyway, it doens't do the validation. Here is a part of my code:Code:
<% if request("action") = "Verzenden" then
datum = request("dtmmeldinghelp")
if datum <>"" then
'I have tried also: if len(datum) <0 then
response.Write("<html>" & "<body>" & "Fout" & "</body>" & "</html>")
else
' here come my sql insert to code and the code for email
' this works fine
%>
View Replies
View Related
i built this test program:
<HTML>
<HEAD><TITLE>Test</TITLE></HEAD>
<BODY>
the time is <% = Time %>
</BODY>
</HTML>
It does not show the time! very basic probably but not for me.
View Replies
View Related
I am trying to add a button to a menu which it's action is conditioned by a session variable. The button shows up fine but I get no action from the button being clicked . The variable does have a valid value. If anyone can help me out with this it would be greatly appreciated. The code follows:
<input TYPE="submit" NAME="Button1" VALUE="Quote Generator">
<SCRIPT LANGUAGE="VBScript" FOR="Button1" EVENT="onClick">
If Session("RVQuoteAuthority") = "Y" then
Response.Redirect(Quote.asp)
else
MsgBox "No Authority"
End If
</SCRIPT>
View Replies
View Related
Talking about the cdonts objects.. i want to send the email in windows xp..
i downloaded cdonts.dll and registered it.. but still i am not able to send
the mail.. is it so that i need to set the settings in the Virtual SMTP server
in IIS ?
View Replies
View Related
I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP. I have searched for articles on the following question but
not come up with any definite answers. Code:
View Replies
View Related
I am trying to get ASP to work with IIS and i keep getting page cannot be displayed when i try to open asp pages? Do i have some settings wrong somewhere?
View Replies
View Related
how to write store procedure in asp?
View Replies
View Related
I'm trying to access a stored procedure on our AS400 that is written in RPG. I know that the stored procedure works (I've called it from an RPG program on the AS400), and I know that the connection to the AS400 is good, because this same ASP page is reading data via SQL. However, when I try to call the stored procedure, I can't tell if anything is actually happening. All that I know is that the end result is not being changed, so I suspect that the procedure isn't being called correctly.
My stored procedure is used to encrypt/decrypt data. It has 3 parameters - a 1 character flag telling it whether to encrypt or decrypt, a 25 character field for the plaintext data, and a 50 character field for the encrypted data. The last two parameters are used for either input or output, depending on the value of the first
flag (if the flag is "E", then the plaintext is used as input and the program fills the encrypted data field. If the flag is "D", then vice - versa).
Here is the code where I call my stored procedure. I'm trying to decrypt data from the queryString and place it in some program variables. I'm new to ASP, and can't find any good examples for my situation, so I pieced this together from what examples I found
online. Can anyone tell me what I'm missing?
View Replies
View Related
I have a problem with input parameter which has Decimal DataType. Stored procedure works but it rounds all
values, i.e 5.555 input becomes 6 and 1.3 input becomes 1.
In table QTY has data type decimal(5) - precision(8) scale(3).
Please, suggest what's wrong with this:
newqty = Request.Form("quantity")
..........
cmd.Parameters.Append(cmd.CreateParameter("qty", adDecimal, adParamInput, 5, newqty))
cmd.Parameters("qty").Precision = 8
cmd.Parameters("qty").NumericScale = 3
View Replies
View Related
I've created a procedure/query in an Access 2000 database using the
following code:
<%
strAppend = "ProcName"
strSQL = "Create Procedure [qry" & strAppend & "] AS Select * From Stories
ORDER BY StoryID DESC;"
cn.execute(strSQL)
%>
I know I have successfully created the procedure/query, because when I run
the code again, it gives me the following error:
Microsoft JET Database Engine (0x80040E14)
Object 'qryProcName' already exists.
I look in the Access database and can't find qryProcName as a query, macro
or any other object.How do I access it?
View Replies
View Related
this question is not about SQL exactly
so, I am asking here.
how to get output from sql procedure ?
my sql p. like below
Code:
if not exists(select .....................)
set @result=0
else
set @result=1
so, how can I get @result in ASP
View Replies
View Related
i am stuck with the following error message
"Application uses a value of the wrong type for the current operation."
did anyone know the reson this occur?
just because of my store procedure....
View Replies
View Related
when do u use property procedure for example
PublicProperty CompanyName() AsString
Get
Return strCompany
EndGet
Set(ByVal Value AsString)
strCompany = Value
EndSet
EndProperty
View Replies
View Related
I populate my checkboxes in a table written in asp. Each checkbox has the same value but a different name. I want to say for checkbox in the asp table, call a procedure that will do the changes. Code:
View Replies
View Related
I have an ASP page and a Store Procedure but I keep getting this error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'sp_searchresultsZIP' expects parameter '@xDateTo', which was not supplied. Code:
View Replies
View Related
how to use LIKE in a Stored Procedure ?I can use it as "where tbl LIKE @string"but it doesn't work truly.how can I use % ' & ?you know, we use LIKE in classic asp and sql as '%"&YYY&"%'.but how can it be used in Stored Procedure ?
View Replies
View Related
What I'm looking to doing is having three input boxes on a page. As an example I would like for the user to input a employee ID in the first input box and then wither press enter or onblur it would call a proceedure that would get data from an access DB and display the employees first and last name in the other two input boxes.
I know the code I need to get the data from the DB but I don't know how to call the proceedure. I'm also assuming that the only way to get and display data from the input boxes is to have them in a form. Is it possible to call a asp proceedure by pressing enter or onblur?
View Replies
View Related
Can I create a sub procedure in global.asa file? If YES then Will that be Local to global.asa or Global for website? And can I CALL that Sub from the Session_Onstart ?
View Replies
View Related
I have a stored procedure that I am executing with this SQL
osp_instrument_swap @InstrumentFrom = 'testname', @InstrumentIDTo = 37,
@Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604, 605, 606,
607, 608, 609, 610, 611, 612, 613, 616'
the @Schedules are ID fields in a table that are integers. I would like to do an Update blah, Where ScheduleID in (@Schedules) instead of looping. How can I do this? I have to sent the values to the sproc as text, right? Where do I covert to the int data type and how?
View Replies
View Related
I have to code a sub procedure to do the further processing. I dont know how to call a VBScript sub procedure on the click event of a button. I tried a lot of thing but it is not working. Can any help me out or give a me tip on how to go to subprocedure on button click on an ASP page.
View Replies
View Related
My below given code is running 100% but now i have to pass this SQL Query from stored procedures...
I have created the stored procedure in my database and give the parameter to the student_id
can any one temme that how can i implement this stored procedure code in my given code:
View Replies
View Related
why we use Stored procedure in VB/ASP? Why i am asking is we can do the same with SQL Query? What does this do the differnce?I need the main difference bet. these?
View Replies
View Related