How do I fix this error code?

Results 1 to 5 of 5

Thread: How do I fix this error code?

  1. #1
    Augusto` Guest

    Default How do I fix this error code?

    Hi<BR><BR>I have one table that has data entered through a form which has the parameters from another table. It is for a company director and the variable is "role" being their position in the company such as director, chairman etc..<BR><BR>The problem is that I was wanting to display teh full decription such as "Director", "Chairman" etc but the table which contain the data (not the table which contains the role names) has the datasave using the RoleID and I was wanting the display the full name. I tried the code below but I get the following error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.<BR><BR><BR>This is the relevant code and you can see that the data is stored in tDirectorInCompany and the role description is taken from ltRole:<BR><BR>SqlText = "SELECT tCompany.CompanyID, tCompany.CompanyName, tPerson.PersonID, tPerson.Addressee, tDirectorInCompany.Ceased, tDirectorInCompany.RoleID, tRole.Role"<BR>SqlText = SqlText & " FROM (tPerson LEFT JOIN tDirectorInCompany ON tPerson.PersonID = tDirectorInCompany.PersonID)"<BR>SqlText = SqlText & " LEFT JOIN tCompany ON tDirectorInCompany.CompanyID = tCompany.CompanyID"<BR><BR>If Len(request("T0PersonID")) &#062; 0 then<BR>SqlText = SqlText & " WHERE tPerson.PersonId = " & request("T0PersonID")<BR>End If<BR><BR>If Len(request("T0CompanyID")) &#062; 0 then<BR>SqlText = SqlText & " WHERE tCompany.CompanyId = " & request("T0CompanyID")<BR>End If<BR><BR>Rs14.Open SqlText, DnsText,3,1<BR><BR>Do While Not(Rs14.EOF)<BR><BR>Response.Write "&#060;P&#062;&#060;a href=""cdnps_T1Show.asp?T1CompanyId=" & Rs14("CompanyId") & """&#062;" & Rs14("CompanyName") & "&#060;/a&#062;"<BR><BR>if Rs14("RoleID") &#060;&#062; "" then<BR>Response.Write " - " & Rs14("Role") & "<BR>"<BR>else<BR>Response.Write " "<BR>end if<BR><BR><BR>etc<BR><BR>Thanks in advance<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, Errors

    The link to the ASPFAQs is at the top right corner of this page.<BR>

  3. #3
    Join Date
    Dec 1969

    Default In the past couple of hours how many times

    have you said "I am off to bed" ? :)

  4. #4
    Join Date
    Dec 1969

    Default I still cant do it can someone please help me!


  5. #5
    Join Date
    Dec 1969

    Default RE: How do I fix this error code?

    Have you done a response.write SqlText to see what you are asking for ussually that error means that you are passing an empty string parameter or you are calling a field thats doesn&#039;t exist

Posting Permissions

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