Need a little direction

Results 1 to 2 of 2

Thread: Need a little direction

  1. #1
    Join Date
    Dec 1969

    Default Need a little direction

    I was wondering if there is a code that will pull from a single database table that contains the entire companys phone numbers. I would like the code, based on the department&#039s homepage,to trigger the correct department phonelist to be displayed. Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default RE: Need a little direction

    &#060;%<BR>set dbcn=server.createobject("adodb.connection")<BR>db "dsn=mydsn"<BR>set dbrs=server.createobject("adodb.recordset")<BR>dbr s.activeconnection=dbcn<BR> "select * from mytable where companyfield=&#039company&#039"<BR> elds("companyfield")<BR>phone1=dbrs.fields("phone1 ")<BR>phone2=dbrs.fields("phone2")<BR>response.wri te company & ": " & phone1 & ", " & phone2<BR>dbrs.close<BR>dbcn.close<BR>set dbrs=nothing<BR>set dbcn=nothing<BR>%&#062;<BR><BR>hope this helps!

Posting Permissions

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