Home

Results 1 to 3 of 3

Thread: MSSQL Collector Problem

  1. #1
    ibasaran NNTP User

    MSSQL Collector Problem


    Hi All,

    i am getting trouble with my custom mssql collector. My collector
    below;

    Collector.prototype.initialize = function(){

    this.PARSER.getOffsetData = function(input){
    if (typeof input.RXMap != "undefined") {
    return input.RXMap.col_safahatid;
    }
    }
    conn.addParser(this.PARSER.getOffsetData);
    return true;
    }

    when i debug saying always "input is undefined"

    Connector.prototype.sendQuery = function(){
    if (this.CONNECTION_STATUS == "NEED-QUERY") {
    conn.send(instance.CONFIG.DBQuery);
    }
    return true;
    };

    Record.prototype.preParse = function(e){
    if (this.CONNECTION_ERROR != null) {
    return false;
    }
    if ((this.CONNECTION_METHOD == "DATABASE" && this.CONNECTION_MODE ==
    "map")) {
    for (var field in this.RXMap) {
    this[field] = this.RXMap[field];
    }
    }
    return true;
    };

    Every time "this.CONNECTION_ERROR" saying "NODATA" and it not resuming
    to parse metot.

    My sqlquery.base below

    SELECT
    TOP %d
    SAFAHAT_ID as SAFAHATID,
    SAFAHAT_ADI as SAFAHATADI,
    SAFAHAT_ACIKLAMA as SAFAHATACIKLAMA
    FROM TEST_SAFAHAT
    WHERE SAFAHAT_ID > %s
    ORDER BY SAFAHAT_ID


    i am giving 20 to max row.

    When i try open raw data trap always coming first 20 record and
    looping. first 20 record coming again and again. What is my problem ?


    --
    ibasaran
    ------------------------------------------------------------------------
    ibasaran's Profile: https://forums.netiq.com/member.php?userid=2826
    View this thread: https://forums.netiq.com/showthread.php?t=45043


  2. #2
    Norbert Klasen NNTP User

    Re: MSSQL Collector Problem

    Hi ibasaran,
    in the raw data tap, do your records have the field "col_safahatid" in this
    exact form?

    Norbert

    P.S.: Question regarding custom collector should be posted to the
    novell.devsup.plugin-sdk fourm.

    >>> On 27.10.2012 at 16:44, ibasaran<ibasaran@no-mx.forums.netiq.com>

    wrote:

    > Hi All,
    >
    > i am getting trouble with my custom mssql collector. My collector
    > below;
    >
    > Collector.prototype.initialize = function(){
    >
    > this.PARSER.getOffsetData = function(input){
    > if (typeof input.RXMap != "undefined") {
    > return input.RXMap.col_safahatid;
    > }
    > }
    > conn.addParser(this.PARSER.getOffsetData);
    > return true;
    > }
    >
    > when i debug saying always "input is undefined"
    >
    > Connector.prototype.sendQuery = function(){
    > if (this.CONNECTION_STATUS == "NEED‑QUERY") {
    > conn.send(instance.CONFIG.DBQuery);
    > }
    > return true;
    > };
    >
    > Record.prototype.preParse = function(e){
    > if (this.CONNECTION_ERROR != null) {
    > return false;
    > }
    > if ((this.CONNECTION_METHOD == "DATABASE" && this.CONNECTION_MODE ==
    > "map")) {
    > for (var field in this.RXMap) {
    > this[field] = this.RXMap[field];
    > }
    > }
    > return true;
    > };
    >
    > Every time "this.CONNECTION_ERROR" saying "NODATA" and it not resuming
    > to parse metot.
    >
    > My sqlquery.base below
    >
    > SELECT
    > TOP %d
    > SAFAHAT_ID as SAFAHATID,
    > SAFAHAT_ADI as SAFAHATADI,
    > SAFAHAT_ACIKLAMA as SAFAHATACIKLAMA
    > FROM TEST_SAFAHAT
    > WHERE SAFAHAT_ID > %s
    > ORDER BY SAFAHAT_ID
    >
    >
    > i am giving 20 to max row.
    >
    > When i try open raw data trap always coming first 20 record and
    > looping. first 20 record coming again and again. What is my problem ?



  3. #3
    ibasaran NNTP User

    Re: MSSQL Collector Problem


    thnks for reply Norbert i changed "col_safahatid" to "col_SAFAHATID" and
    working truly.


    --
    ibasaran
    ------------------------------------------------------------------------
    ibasaran's Profile: https://forums.netiq.com/member.php?userid=2826
    View this thread: https://forums.netiq.com/showthread.php?t=45043


Posting Permissions

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