Include file problem

Results 1 to 2 of 2

Thread: Include file problem

  1. #1
    Join Date
    Dec 1969

    Default Include file problem

    I am very new to use include files, I am writing following function and it is not running, any help ?<BR><BR>Function GetZM(BU,Month,Year,Con)<BR>Dim MySQL<BR>Dim rsList<BR>Dim PartRec<BR>Dim PartShip<BR><BR>set rsList=server.CreateObject("ADODB.Recordset")<BR>< BR>MySQL="Select * from zm Where BU=&#039UI AND Month=&#03901&#039 AND Year=&#039 1999&#039 "<BR><BR>rsList.Open MySQL, Con<BR>rsList.MoveFirst<BR><BR>PartShip =rslist("partsh")<BR>PartRec =rslist("partre")<BR>GetZM = (PartShip/PartRec) * 1000000<BR><BR>End Function

  2. #2
    Join Date
    Dec 1969

    Default RE: Include file problem

    Are you calling the function from the ASP page that is including the function?<BR><BR>When you include a file in an ASP page, it is as if you cut and paste the text from the one file into the other before running the ASP page. Just having a function doesn&#039t automatically execute it, you need to call it.<BR><BR>So, if we had:<BR><BR>Function blah<BR>&#039do something<BR>End Function<BR><BR>blah would not run unless in our code, where we wanted it to run, we did:<BR><BR>blah<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