Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WIN 98 vs. WIN 2K! Please help!

Status
Not open for further replies.

chassid

MIS
Aug 27, 2000
58
US
B"H
All,

When I run the script below in WIN 98 on my machine it works. When I run the same script on WIN 2K on the server it gives me the message: HTTP 500 Internal Server Error!

The script is to add fields from a form to an access database. Any help will be greatly appreciated.

Daniel

<%
If Request.Form(&quot;Submit&quot;)=&quot;Submit&quot; Then

'Get Form details
first=Request.Form(&quot;first&quot;)
last=Request.Form(&quot;last&quot;)
email=Request.Form(&quot;email&quot;)
pnew=Request.Form(&quot;new&quot;)
prenew=Request.Form(&quot;renew&quot;)

'Check that user supplied fields are completed
If first=&quot;&quot; OR last=&quot;&quot; OR email=&quot;&quot; OR pnew=&quot;&quot; or prenew=&quot;&quot; THEN
response.redirect(&quot;passw3.asp&quot;)

ELSE
'update e-mail address
Dim con, sql_insert, data_source
If pnew <> prenew then
response.redirect(&quot;passw2.asp&quot;)
else
sql_insert = &quot;insert into vamos (access_firstname, access_username, email, access_password) values ('&quot;& first &&quot;', '&quot;& last &&quot;', '&quot;& email &&quot;', '&quot;& prenew &&quot;')&quot;
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
'Set RS=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
'RS.Open con, 1, 1
conn.Open &quot;odbc&quot;
set rsquery = conn.Execute(sql_insert)
'conn.Close
Set con = Nothing
set rsquery = Nothing
Response.redirect(&quot;done2.asp&quot;)

end if
END IF


End If
%>

Do you know the Chabad Lubavitch Sheliach in your area?
He is waiting for you!
 
I'm just going to take a guess at this (btw why are you even running it off Win98, you are usally supposed to use NT4 or Win2k when hosting ASPs)

when you use a .Redirect command, you must have Response.buffer = true, set at the top, the reason being is that if you send any data back to the client before redirectly, you'll always get a server error.
Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)

 
B&quot;H

Karl,

Thanks for your help but I still get a server error. I am running it on win98 at my local computer. I do that so that I can debug all the problems with the asp script at my local station before I add it to the server. I can't seem to figure out what is the problem with this! I've checked the dsn and all the table names I use and they all seem to be correct.

Well, if you have any other guess please send them to me!

Thanks,
Daniel Do you know the Chabad Lubavitch Sheliach in your area?
He is waiting for you!
 
Daniel,

Is your database setup on the Win98 machine?

> conn.Open &quot;odbc&quot;

Does that DSN exist?

> sql_insert = &quot;insert into vamos (access_firstname, access_username, email, access_password) values ('&quot;& first &&quot;', '&quot;& last &&quot;', '&quot;& email &&quot;', '&quot;& prenew &&quot;')&quot;

Does that sql statement run on your Win98 machine?

-pete

 
B&quot;H

Pete,

Yes the database was setup on windows 98. odbc does exist as a dsn. The sql statement I wrote runs on the win 98 machine but not on the win 2k.

Any suggestions?
Daniel Do you know the Chabad Lubavitch Sheliach in your area?
He is waiting for you!
 
just to make sure this is covered, I know it's a &quot;duh&quot; situation, but I want to check, is the Database a Access DB, since you are not using a DSN , does the database connection exist if you were to run it off the Win2k webserver, if not, you need to make that connection exist.
Karl
kb244@kb244.com
Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top