Click to See Complete Forum and Search --> : ASP Problem


Hacken
September 22nd, 2003, 11:42 PM
I have facing a problem with ASP :(
i have write the following code:-
<%
Response.Cookies("String")=Request.Form("Search")
Response.Cookies("String").Expires=Date +365
Response.Cookies("Engine")=Request.Form("Engine")
Response.Cookies("Engine").Expires=Date +365

Select Case Request.Form("Engine")
Case "Google"
Response.Redirect("http://www.google.com/search?q=" + Request.Form("Search"))

Case "Hotbot"
Response.Redirect("http://www.hotbot.com/?SW=web&SM=MC&MT=" + Request.Form("Search"))

Case "Alltheweb"
Response.Redirect("http://www.alltheweb.com/search?utf-8&q=" + Request.Form("Search"))

Case "Lycos"
Response.Redirect("http://www.lycos.com/cgi-bin/pursuit?adv=%26adv%3B&cat=lycos&matchmode=and&query=" + Request.Form("Search"))

End Select

set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db/memberdatabase.mdb")
conn.Open

SearchString=Request.Form("Search")
SearchEngine=Request.Form("Engine")

conn.Execute "INSERT INTO tbltracking (UserID,SearchString,SearchEngine,Browser,Software,AccessTime, AccessDate) values ('" _
& Request.Cookies("userid") & "','" _
& SearchString & "','" _
& SearchEngine & "','" _
& Request.ServerVariables("http_user_agent") & "','" _
& Request.ServerVariables("server_software") & "','" _
& Time() & "','" _
& Date() & "')"

conn.close
%>

after the code compile it run well in my local PC with PWS support, but when the time I upload the page to host, it course me the problem with can't insert data in to table. The Web Hosting I use is Brinkster, is that any solution???

Thanks for advice... =)

hspc
September 24th, 2003, 07:11 AM
try enabling write permissions for:
the folder that contains the asp page
the folder that contains the access DB (\db in your case)

you better send us the error you get so we can give more accurate solutions :)