|
Thanks for the reply. But I am not using CDONTS. I know my site doesnt support that stuff. I do use ASPMail.
Thanks for ur reply!!!
I was born intelligent Education ruined me!.
|
|
|
|
|
yes, but both ASPMail and CDONTS talks to SMTP... so, if the problem comes from SMTP, you and I may be on the same boat.
norm
|
|
|
|
|
NO my friend.
If you can see my FIRST message of this thread, you can see that my code is working fine with ASPMail. And I was trying to do the same at different interface, and it fails to send the mail. Thats the code I posted.
Finally I changed my code as a generic one by directing to the already 'working' mail part. But still, I have no idea of why and how the code wasnt working there.
I was born intelligent Education ruined me!.
|
|
|
|
|
o, sorry about that. i hijacked your session.
norm
|
|
|
|
|
Finally.... did u got a method to run ur mail from the site??
I was born intelligent Education ruined me!.
|
|
|
|
|
no, i spent the weekend at some cybercafe slaughtering my friends playing warcraft 3
anyway, I had a new problem which I need to resolve first. damn, it's near the end and i am stuck watching the screen wondering if it would take me another year to fix these small bugs.
norm
|
|
|
|
|
norm wrote:
I had a new problem which I need to resolve first
I guess... U HAD already solved it. Else post it here in CP. People are here to help u out!
I was born intelligent Education ruined me!.
|
|
|
|
|
it's too weird to post it here. i have a page that used to work. than, i broke another page. and this page stopped working properly and i cant really post it here until i narrow it down more.
norm
|
|
|
|
|
I was born intelligent Education ruined me!.
|
|
|
|
|
Hello,
I am wondering if anybody may know how to see if a textarea has been scrolled all the way down. I cannot seem to find anything on it. If there was some way to get the text that the user is currently viewing into a string then I could check to see if it is at the end.
Any ideas?
Jonathan
|
|
|
|
|
I have written a vb class module which simply writes a string to a file and compiled this as a dll.Now when I registered this dll using regsvr32.exe from the system32 folder under WINNT directory in the win2k server,I can access this dll from my ASP code simply by using Server.CreateObject("dll name").
1>Is this dll a com?
2>Whats the difference between a com and a dll?
3>So if it is possible to access this dll through ASP by registering the component in the server registry,then what is the utility of using MTS in IIS?
Since I am a beginner in web development,I would also like to know about the other functionalities and advantages of using MTS with IIS.Address of any relevant web site dealing in similar topics will also help me a lot....
Thanking u all in advance...
Anirban
|
|
|
|
|
It's very weird.
<%
Response.Write( "bExistingLogin: " & bExistingLogin & " " )
Response.Write( "bSuspended: " & bSuspended & " " )
Response.Write( "bEMailPrevReg: " & bEMailPrevReg & " " )
If bExistingLogin="1" Or bSuspended="1" Or bEMailPrevReg="1" Then
Request.Form("bLoginStatus")="1" PROBLEM HERE!
Server.Transfer("login_gui.asp")
End If
%>
That's all I'm doing, but apparently the script engine is not happy that I reference 'Form' property of the Request Object:
Request.Form("bLoginStatus")="1"
The error message:
"Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Form'
/submit_changed_profile.asp, line 23"
Thanks a bunch!
norm
|
|
|
|
|
You're getting that error because you are trying to write to a member of the Request.Form collection which is read-only.
If I were you I would first assign Request.Form("bLoginStatus") to a variable i.e.
bLoginStatus = Request.Form("bLoginStatus")
then you can update the variable and use that.
It will save you some typing as well
|
|
|
|
|
yea, i figured that out after a few hours of debugging, that's the problem when u're noew to a language =)
norm
|
|
|
|
|
Thanks, my mistake =)
norm
|
|
|
|
|
Hi, I am having problem with the following ADO error:
"ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/check_past_record.inc, line 90"
I wish to know if I oRS.Close() will close the associated oConn (connection object)?
Here's the code snippet:
Set oConn = Server.CreateObject("ADODB.Connection")
'Connecting to Microsoft SQL Server:
oConn.ConnectionString = "Provider=sqloledb; Data Source=(local); Initial Catalog='DummyDB'; User ID=sa; Password=sa"
oConn.Open
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.Open "SELECT * FROM passwords WHERE login <>'" & Trim(Request.Form("txtOldLogin")) & "'", oConn, 2, 3
oRS.Find "login = '" & fldLogin & "'"
If oRS.EOF Then
bExistingLogin="0"
Else
bExistingLogin="1"
End If
oRS.Close() QUESTION: Is THIS NECESSARY?? What am I doing here exactly? Just closing the recordset? Or recordset PLUS oConn in ONE statement?
oRS.Open "SELECT * FROM passwords", oConn, 2, 3
oRS.Find "login = '" & Request.Form("txtOldLogin") & "'"
Alrite, I think this should be enuf to illustrate my...
Thanks!
norm
|
|
|
|
|
norm wrote:
QUESTION: Is THIS NECESSARY?? What am I doing here exactly? Just closing the recordset? Or recordset PLUS oConn in ONE statement?
You are closing the recordset not the connection. As to whether it is necessary or not, I always do for the sake of keeping everything tidy, but if you are executing a new query ADO will close the recordset for you. I haven't tried, but I suspect closing the connection when you have a recordset open may close the recordset then too, and assigning "Nothing" to it may as well. I would always specifically close the recordset though and not rely on any of that. If nothing else then at least you know when things are open and closed which helps if you are tracking down a problem like this.
As to the "Operation is not allowed when the object is closed" error, do you get an error code, something like -000000000? I haven't checked yet, but there may be different codes for different failed operations. Is the select query returning any records? (I think it should throw a different error if it was, but it's worth checking) Where is the error being thrown? When you open the recordset again or when you call the Find member? If the former, try using oRS = oConn.Execute "sql..." to open your recordset and see if it makes any difference. If not, try creating a new ADODB.RecordSet object. If it still fails, try closing and re-opening the connection too. If an error isn't immeadiately obvious you can usually get a good idea what is triggering it if through trial and error like this.
Also, check you have the latest version of MDAC installed.
|
|
|
|
|
|
Just for curiosity's sake, if it's not trouble, what was the problem in the end?
|
|
|
|
|
here it is:
If some condition Then
oRS.Open .....
Do something with oRS
End If
oRS.Close Depending on whether the above if-block was executed or not, this close statement may generate the error. My mistake!
oRS.Open NewSQLStatement
...
...
...
Thanks!
norm
|
|
|
|
|
I would be grateful if folk could spare a few moments to visit my newest website.
It is designed to be local to one area of Scotland but as the logs show we are getting hits from around the world I would love some feedback!
http://www.angusblog.co.uk[^]
Thanks,
Davy
Weblog, Ramblings and more...
www.latedecember.com
|
|
|
|
|
Wait( ) for VBScript?
I need something that do this:
Wait(2000) --- wait 2000 ms before executing next line of code.
anyone? Thanks.
norm
|
|
|
|
|
There isn't any such function in VBScript.
You can get around it though by using SetTimeout. This allows you to designate a delay before executing a sub or function.
So if you structure your code suitably you can do this
sub myFirstSub()
'Do whatever
MsgBox("test1")
Call SetTimeout("mySecondSub", 2000)
end sub
sub mySecondSub()
MsgBox("test2")
'Do something else
end sub
the first parameter to SetTimeout is the name of the function or sub you want to execute, the second is the delay in milliseconds that you want. So in my
example when i call myFirstSub I will get a messagebox with "test1" then 2 seconds later I get another messagebox with "test2".
HTH
|
|
|
|
|
|
Can I use object.Sleep instead? I tried it.. no error, but it seems that it didnt work:
SetTimer... hum, I dont think it post/submit the form variables.
I need to do this, but for some reason it seems that it didnt "Sleep" as instructed. Here's the fragment:
<% Response.Write "It takes time to read this message" %> HERE: This message need to stay on screen.
Object.Sleep 5000 PROBLEM: No error, but it seems like the page didnt actually waited 5000 millisec? The page just got redirected right away it seems. the user didnt get a chance to read the above msg at all.
<% If (bExistingLogin="1" Or bSuspended="1" Or bEMailPrevReg="1") Then %>
window.history.go(-1)
<% Else %>
Login()
<% End If %>
Thanks.
norm
|
|
|
|