Thanks Bill W. One more question please :)

Results 1 to 3 of 3

Thread: Thanks Bill W. One more question please :)

  1. #1
    Join Date
    Dec 1969

    Default Thanks Bill W. One more question please :)

    I have this function now:<BR><BR>function cntRespAtty()<BR>{<BR><BR><BR>var info = new Array(<BR>&#060;%<BR>&#039;database connection<BR>Set connCorp = Server.CreateObject("ADODB.Connection")<BR>connCor p.Open connectstring<BR><BR>&#039; DATA TO POPULATE ATTORNEY COMBO BOX<BR>SQLCorp = "Select p.emplid as udvalue, as tklast " & _<BR>"from Corporate..person_tbl p, Corporate..jobs_attorney_map_tbl j " & _<BR>"where p.job_code = j.job_code " & _<BR>"order by"<BR><BR>Set rs = connCorp.Execute(SQLCorp)<BR><BR>recPrefix = " new Array(&#039;"<BR>recSuffix1 = "&#039;)"<BR>recSuffix2 = "," & vbNewLine<BR>recSuffix = recSuffix1 & recSuffix2<BR>colSep = "&#039;,&#039;"<BR><BR>&#039; convert rs to a string<BR>jsdata = rs.GetString(,,colSep,recSuffix & recPrefix)<BR><BR>&#039; fix string<BR>jsdata = recPrefix & Left(jsdata,Len(jsdata) - Len(recPrefix) - Len(recSuffix2))<BR>%&#062;)<BR>var info=new Array<BR>(&#060;%=jsdata%&#062;);<BR>alert(recSuff ix1);<BR>}<BR><BR><BR>I&#039;m trying to invoke it with this button:<BR>&#060;input type="button" value=ra name=ra id=ra onClick=&#039;cntRespAtty();&#039;&#062;<BR><BR>I keep getting a Runtime Error that says Object Expected on the onClick Event. Do you know why?<BR><BR>Also, a syntax question...could you tell me the syntax to use the " " in place of the &#039; &#039; - there&#039;s a record that has a name with something like B&#039;exx, but there are no " anywhere in the data. Thanks<BR><BR>Rich

  2. #2
    Join Date
    Dec 1969

    Default RE: Thanks Bill W. One more question please :)

    did you ever define what rs was?<BR><BR>Set rs = server.createobject("ADODB.Recordset")<BR><BR>you set your connection object, but not the rs? <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Answered in original thread...

    Don&#039;t start new threads if you hope for me to answer quickly.<BR><BR>I *always* first look for threads where I have a message, to see if they are continued. Long before I get around to "browsing" other messages.<BR><BR>

Posting Permissions

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