Results 1 to 3 of 3
  1. #1

    Default ASP-recordset invalid return in function


    kindly chk guys...

    function return

    case: table Billings has no records and yet the function return BILL EXIST (response.write("bill exist") that supposedly return "CREATE NEW BILL.... any idea saon pag fix? ty..




    <%
    option explicit
    dim strBillingperiod, strPeriodCovered, _
    conBill, rsChkBill, strChkBillQuery

    strBillingperiod= Request.Form("cboBillingPeriod")
    strperiodcovered= Request.Form("cboPeriodCovered")

    'if Trim(strBillingperiod) = "" OR Trim(strperiodcovered) = "" Then _
    'Response.Write("error") 'Response.Redirect("Loginfailureform.asp")

    set conbill = Server.CreateObject("ADODB.Connection")
    conbill.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db/IAccnt.mdb")

    if isvalidbilling(strBillingperiod,strPeriodCovered) =true then Response.Write("Create New Bill") else Response.Write("bil exist")


    'some codes here...






    function isvalidbilling(byval argBillPeriod, byval argPeriodCover)
    isvalidbilling=false

    strChkBillQuery = "SELECT BillingPeriod, periodcover FROM Billings WHERE billingperiod='" & argBillPeriod & "' AND periodcover ='" & argPeriodCover & "'"
    Set rsChkBill = conBill.Execute(strChkBillQuery)

    if rsChkBill.bof=false and rschkbill.eof=false then isvalidbilling=true

    rsChkBill.close:set rsChkBill=nothing

    end function


    %>


  2. #2

    Default Re: ASP-recordset invalid return in function

    suwayi daw ni?.
    if not rschkbill.eof then isvalidbilling = true

    ako tanaw is
    rschkbill.bof = 0
    &&
    rschkbill.eof = 1
    = 0
    mao ni return siya og false.


  3. #3

    Default Re: ASP-recordset invalid return in function

    tnx bro jst figured it out aftr a mins of i post...

    anywy killaz right [if not rschkbill.eof then isvalidbilling = true]

    peace bro

  4.    Advertisement

Similar Threads

 
  1. Bonnie Bailey returns in Cebu
    By Peenut in forum Parties & Events
    Replies: 57
    Last Post: 10-18-2011, 07:38 PM
  2. Kris Aquino will return in SNN!
    By mark_012590 in forum TV's & Movies
    Replies: 4
    Last Post: 05-07-2010, 09:19 PM
  3. ASP.Net: Problem on runtime checkboxes in panel
    By janjerell in forum Programming
    Replies: 1
    Last Post: 04-15-2008, 12:58 PM
  4. word automation in asp
    By hybrid_X in forum Programming
    Replies: 2
    Last Post: 11-09-2006, 09:46 PM
  5. Posts count not functioning in other categories?
    By nseven in forum Support Center
    Replies: 2
    Last Post: 03-30-2006, 06:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top