Page 5 of 6 FirstFirst ... 23456 LastLast
Results 41 to 50 of 52
  1. #41

    Quote Originally Posted by tynum View Post
    tnx bro... i appreciate ur help.... basta ang thought ra jud ani bro kay bale mo monitor ni xa sa mga scripts na ni run...

    steps:
    1. run scripts...... from scripts table...
    2. log script being run to script_run table..... logs script_id, starts(datetime), ends(datetime)..
    3. if there is an error while running the script( like server down, poor coding, etc. ) logs script_id, reason, date_created(datetime when error ocurred) to script_error table...


    my job:
    1. get script_id from scripts table
    2. looks into script_run table where script_id is equal to script_id in no.1
    3. for every match in no.2 look into script_error table if there is an error while running that script at that time (starts, ends)
    4, displays script_error_id, starts, ends, error(yes/no) via gridview in asp.net... script_error_id column kay hyperlinks ni sila na ma click aron ma view ang reason of error if any....

    my problem:

    unsaon jud nku para ma display nku c error column as either YES or NO... depending if that script errored on the time when it was run...

    OK ba ako explaination nka sabot na jud error column ra ako problema... its for the end users....
    hear me out , if the script(based on script id)has more than one occurance then that script has an error?

    looks like script run table is the occurance table(has scripts_id as a FK)and scripts table has the script_id as the PK.

    i would in the script table where script_id(PK) has 2 fields in the table(suggestion) IsError, IsOK..

    when SQL runs check Occurance Table is more than 1 then update Script table with IsError marked 1 for false and IsOk 0

    but since your table is based on finding out when the script run occurance is the error. you might have an field for marking it as error =1 , error = 0 would be no, it will be easier when binding it sa datagrid to know if its a yes or no.

    another idea would be to use join nalang with each statement to findout kinsa ang YES or NO, which just a declared field sa SQL to have YES or NO,

  2. #42
    ani ra nah bro... ang script can be executed/run many times... naa scheduled time and day for a certain script to be run... mao na nid ang logs every runtime sa script to see if kana nga runtime kay nag error... and i see ur point bro.. na mag butang ka ug lain column na error either mo 1 or 0 xa para mu determine kung nag error ba ang script pag run ana nga time.. peru we have a WORKING tool na mu look into the database for scripts and run that script.. nya mu log xa sa database if ever naay error.. for now i log nya into another table in the database...

    i think mu propose ko nila na ako lang i revise ang kato nga tool para mu apil nlng sad xa ug log sa database if ni error ba or wala... dba?? try nku na ug ask ugma sa work...

  3. #43
    ani ra nah bro... ang script can be executed/run many times... naa scheduled time and day for a certain script to be run... mao na nid ang logs every runtime sa script to see if kana nga runtime kay nag error... and i see ur point bro.. na mag butang ka ug lain column na error either mo 1 or 0 xa para mu determine kung nag error ba ang script pag run ana nga time.. peru we have a WORKING tool na mu look into the database for scripts and run that script.. nya mu log xa sa database if ever naay error.. for now i log nya into another table in the database...

    i think mu propose ko nila na ako lang i revise ang kato nga tool para mu apil nlng sad xa ug log sa database if ni error ba or wala... dba?? try nku na ug ask ugma sa work...

  4. #44
    I see you have a working tool na, since its logging stuff too, maybe like you said ask if ipa apil ang IsError Flagging mas saun sya,

    pero with the already existing process naa paman ta ma buhat it will take hinuon much of your time in the datagrid binding with your current sql.

    Im also thinking of temp column during on SQL execute time na will contain "yes" in one statement and joined with another statement that has temp value of "no'.

    I bet if kayahun sa asp.net code lang i think it can be done, but i cant picture it yet

  5. #45
    Quote Originally Posted by bryanarzaga View Post
    Im also thinking of temp column during on SQL execute time na will contain "yes" in one statement and joined with another statement that has temp value of "no'.

    I bet if kayahun sa asp.net code lang i think it can be done, but i cant picture it yet
    i cant picture out your idea bro... paki explain daw in details.... nindot ni kay mka learn sad ta ug mga tactics ba... hehe..

  6. #46
    its like sql statment na tuyoon ug pangita sa error and another statement na mu find sa dli error,

    in the first statment sa imu where kai ma ngita man ka ug error, define a column that is not in the database(this will be created in runtime) and have it store the value 'yes'

    in another separate statement sa 'where' will look for the non erroneous records and again define a column that will have the default value of 'no'

    but these defined fields should have matching field names para sa join nimu ok na pag taput, human ana its easy just binding those fields sa datagrid

  7. #47
    bro i get ur idea... peru ask lang ko kung unsaon pag bind sa duha ka sql queries into 1 gridview
    correct me if im wrong bro ha...

    first is to bind the first query to the gridview..
    then bind the second query to the gridview...

    sakto ba?? kung sakto gani... unsaon man pag bind the second time?? assuming that the two separate queries returns the same exact columns... unsaon na bro?? pwede if mu hatag ka ug simple example?? bsag kanang gamay lang... ty..

  8. #48
    unsa man bro ma-append lang ang result dataset sa second query ngadto sa query first or it will replace the entire data in the datagrid view?

  9. #49
    Quote Originally Posted by tynum View Post
    bro i get ur idea... peru ask lang ko kung unsaon pag bind sa duha ka sql queries into 1 gridview
    correct me if im wrong bro ha...

    first is to bind the first query to the gridview..
    then bind the second query to the gridview...

    sakto ba?? kung sakto gani... unsaon man pag bind the second time?? assuming that the two separate queries returns the same exact columns... unsaon na bro?? pwede if mu hatag ka ug simple example?? bsag kanang gamay lang... ty..
    Dim mds As String
    Session("pullTypeName") = Me.ddlPullType.SelectedItem.Text
    Session("pullTypeNum") = Me.ddlPullType.SelectedItem.Value
    Session("pullDate") = Me.txtDay.Text
    Session("pullDate2") = Me.txtbox2.Text
    Dim da As New SqlDataAdapter("SELECT TBL_Transactions.theThirdPartyAccName,TBL_Transact ions.MemberNumberForUpload,theThirdPartyAccType, TBL_Transactions.theThirdPartyAccName, TBL_AmountID.Amount,TBL_Transactions.theThirdRouti ngNumber,TBL_Transactions.theThirdAccNumber,TBL_Tr ansactions.LcuTranacCode,TBL_Transactions.LcuRouti ngNumber FROM TBL_Transactions INNER JOIN TBL_AmountID ON TBL_Transactions.TransactionID = TBL_AmountID.TransactionID WHERE (TBL_Transactions.TransStatus <> 'Stopped') AND (TBL_AmountID.APullKey = '" & Session("pullTypeNum") & "') AND (DAY(TBL_AmountID.AmountDate) = '" & Session("pullDate") & "') AND (DAY(TBL_Transactions.pDate01) = '" & Session("pullDate") & "') AND(DAY(TBL_Transactions.pDate02) = '" & Session("pullDate2") & "'AND TBL_Transactions.PrepNum<>666)

    UNION

    SELECT TBL_Transactions.theThirdPartyAccName,TBL_Transact ions.MemberNumberForUpload,theThirdPartyAccType, TBL_Transactions.theThirdPartyAccName, TBL_AmountID.Amount,TBL_Transactions.theThirdRouti ngNumber,TBL_Transactions.theThirdAccNumber,TBL_Tr ansactions.LcuTranacCode,TBL_Transactions.LcuRouti ngNumber FROM TBL_Transactions INNER JOIN TBL_AmountID ON TBL_Transactions.TransactionID = TBL_AmountID.TransactionID WHERE (TBL_Transactions.TransStatus <> 'Stopped') AND (TBL_AmountID.APullKey = '" & Session("pullTypeNum") & "') AND (DAY(TBL_AmountID.AmountDate) = '" & Session("pullDate2") & "') AND (DAY(TBL_Transactions.pDate01) ='" & Session("pullDate") & "') AND(DAY(TBL_Transactions.pDate02) = '" & Session("pullDate2") & "')AND TBL_Transactions.PrepNum<>666", " data source= myServer ;initial catalog=myDB ; user id=myUsrNme ; password = MyPW")
    Dim ds As New DataSet
    da.Fill(ds, "TBL_Transactions")
    Session("myds") = ds
    DataGrid1.DataSource = ds
    DataGrid1.DataBind()

  10. #50
    tnx bro... karon ra ko kahibaw na pwede diay ka mka JOIN ug 2 select statements.... will try this method.... tnx...

  11.    Advertisement

Page 5 of 6 FirstFirst ... 23456 LastLast

Similar Threads

 
  1. Help With ASP.Net User Controls
    By Deathnote in forum Programming
    Replies: 1
    Last Post: 03-15-2012, 07:52 PM
  2. asp.net c# newbie..pls help..
    By shawn87chau in forum Programming
    Replies: 15
    Last Post: 11-26-2008, 10:44 AM
  3. Need help on ASP.NET
    By shawn87chau in forum Programming
    Replies: 3
    Last Post: 08-08-2008, 05:25 AM
  4. Help with events in VB.NET
    By DeathFox in forum Programming
    Replies: 5
    Last Post: 12-17-2007, 08:07 PM
  5. vb.net/asp.net
    By Drksrvnt in forum Programming
    Replies: 0
    Last Post: 08-30-2006, 01:36 PM

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