Need genius to solve odd runtime error

Results 1 to 3 of 3

Thread: Need genius to solve odd runtime error

  1. #1
    Join Date
    Dec 1969

    Default Need genius to solve odd runtime error

    Great, I knew you were out there!! Can you solve this for me. I&#039m trying to update a record in an Access 97 table. Precceding pages list records for an employee, then list individual record that is chosen for update. In the code below, all the DB fields are named correctly, as are the form input fields.<BR><BR>However i keep getting the following error:<BR><BR>Error 438: Object doesn&#039t support this property or method<BR>Source: Microsoft VBScript runtime error<BR><BR>I can get the error displayed to the client using basic error handling, or on the server in MS Script Debugger. When I search MS Knowledge Base, references to the error deal with the use of parentheses and variables in Excel!!<BR><BR>Anyway here&#039s the code:<BR><BR>&#060;%<BR>On Error Resume Next<BR><BR><BR><BR>If IsObject(Session("Web_conn")) Then<BR> Set conn = Session("Web_conn")<BR>Else<BR> Set conn = Server.CreateObject("ADODB.Connection")<BR> "Web","",""<BR> Set Session("Web_conn") = conn<BR>End If<BR>%&#062;<BR>&#060;%<BR><BR><BR> sql="SELECT Contacts.ContactID, Contacts.RD,Contacts.OrganizationName, Contacts.State, CmpInfo.CampDate, CmpInfo.[3Balls], CmpInfo.[4Balls], CmpInfo.[5Balls],CmpInfo.YMT, CmpInfo.YLT, CmpInfo.AST, CmpInfo.AMT, CmpInfo.ALT, CmpInfo.XLT, CmpInfo.ShinY, CmpInfo.ShinA"<BR> sql=sql & " FROM Contacts INNER JOIN CmpInfo ON Contacts.ContactID = CmpInfo.ContactID"<BR> sql=sql &" WHERE (((Contacts.CampYear)=&#039 2000&#039) AND ((Contacts.Status)=&#039Soccer Coordinator&#039) AND ((Contacts.OrganizationName)=&#039"&Request.QueryS tring("org")&"&#039))"<BR><BR><BR> Set rs = Server.CreateObject("ADODB.Recordset")<BR> rs.Open sql, conn<BR><BR> If Request.Form("update") ="Update Numbers" Then<BR><BR> rs("3Balls")=Request.Form("three")<BR> rs("4Balls")=Request.Form("four")<BR> rs("5Balls")=Request.Form("five")<BR> rs("YMT")=Request.Form("ym")<BR> rs("YLT")=Request.Form("yl")<BR> rs("AST")=Request.Form("as")<BR> rs("AMT")=Request.Form("am")<BR> rs("ALT")=Request.Form("al")<BR> rs("XLT")=Request.Form("xl")<BR> rs("ShinY")=Request.Form("sy")<BR> rs("ShinA")=Request.Form("sa")<BR><BR> rs.Update<BR><BR> End If<BR><BR> Response.Redirect="equipform.asp"<BR><BR>HandleErr or()<BR>%&#062;<BR><BR>Any ideas?? Of course you do - you&#039re a genius. C&#039mon do me a favor and help me out!!<BR><BR>Thanks.<BR><BR>

  2. #2
    Ben Jones Guest

    Default RE: Need genius to solve odd runtime error

    I wasn&#039t going to reply to your e-mail (I took a quick glance at your code and decided I didn&#039t want to figure it out), but YOU&#039RE IN LUCK, because the problem isn&#039t in your database statement! I caught it at the end:<BR><BR>Response.Redirect="equipform.asp"<BR>< BR>Take out the "="!<BR><BR>response.redirect "equipform.asp"<BR><BR>That&#039s it.<BR><BR><BR>Ben

  3. #3
    Join Date
    Dec 1969

    Default You tha man!!

    Cheers Ben - great spot. DB still not getting updated, but the error message has gone and the program flows. Guess I&#039ll just spend another day figuring out why it&#039s not updating!! <BR><BR>Thanks for the help.

Posting Permissions

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