Error 80004005

Results 1 to 3 of 3

Thread: Error 80004005

  1. #1
    Martin Guest

    Default Error 80004005

    I am using a script to connect and get data from a SQL-server. The script is activated by a web-form where you type what data you want. The connection to the db seems to work ok (tested it with another script), however I cant seem to get this one to work. <BR><BR>I get an error message saying:<BR><BR>error 80004005<BR>inkall.asp, line 7<BR><BR>The code for inkall.asp looks like this (where avd & datum are the data sent to the script by the web-form):<BR><BR>&#060;%@ LANGUAGE="VBScript" %&#062;<BR>&#060;!--#include file="../includes/ADOVBS.inc"--&#062;<BR>&#060;!--#include file="../includes/IASUtil.asp"--&#062;<BR>&#060;%<BR><BR><BR>avd = Trim(Replace(Request("avd"), "&#039", "&#039&#039"))<BR>datum = Trim(Replace(Request("date"), "&#039", "&#039&#039")) <BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR><BR>Con n.Open "servreg2","www_admin",""<BR>SQLStmt = "SELECT tblServreg.fldKst, tblServreg.fldId, tblRegTypnr.fldBen, tblRegTypnr.fldFab, tblRegTypnr.fldTypn, tblRegStatus.fldStat, tblServreg.fldLage, tblServreg.fldAn, tblServreg.fldP1, tblServreg.fldP2, tblServreg.fldP3, tblServreg.fldP4 "<BR>SQLStmt = SQLStmt & "FROM tblRegStatus RIGHT JOIN (tblRegTypnr RIGHT JOIN tblServreg ON tblRegTypnr.fldID = tblServreg.fldTypID) ON tblRegStatus.fldSn = tblServreg.fldStat "<BR>SQLStmt = SQLStmt & "WHERE fldKst like &#039" & avd & "&#039 AND fldP4 like &#039" & datum & "&#039 OR fldKst like &#039" & avd & "&#039 AND fldP3 like &#039" & datum & "&#039 OR fldKst like &#039" & avd & "&#039 AND fldP2 like &#039" & datum & "&#039 OR fldKst like &#039" & avd & "&#039 AND fldP1 like &#039" & datum & "&#039 "<BR><BR>Set RS = Conn.Execute(SQLStmt)<BR>%&#062;<BR><BR>Any help/suggestions would be highl appriciated<BR><BR>Martin

  2. #2
    Join Date
    Dec 1969
    Posts
    672

    Default RE: Error 80004005

    This is line 7 correct?:avd = Trim(Replace(Request("avd"), "&#039", "&#039&#039"))If it is, you may want to change request(" to request.querystring(" or request.form(" (get or post)
    ________
    Shaved ***** Cam
    Last edited by Jay; 04-16-2011 at 01:32 AM.

  3. #3
    Martin Guest

    Default Thank you Jay!!!!

    First I changed the request to "request.querystring", this fixed the strange error msg I got, but no data was retrieved from the db. So then I tried to write "request.form" and it worked beautifully!<BR><BR>Thanks alot, you really saved my day!<BR><BR>Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •