Article = sdr["art_artnr"].ToString();
            article.Ben = sdr["art_ben"].ToString();
            SarticleList.Add(article);
        }

reader loop does not trigger and when i look at sdr.hasrows it's set as false
Using the same query in Sybase Central
i tried other filters for example LIKE and the same problem occurs then, i'm at a loss as to why this is happening.
reference used for my app is System.Data.Odbc

A:

I finally got it to work but not using system.data.odbc. i found out about the iAnywhere.net reference that you can install into your project. i found mine under C:\Program Files\SQL Anywhere 12\Assembly\v4.5 and i then added the reference to my project browsing to this folder and imported iAnywhere.Data.SQLAnywhere.v4.5.dll.. using this reference i now get results back even using filters in my queries.
here's the code now:
    public List<SearchArticleNr> SearchArticle(string articlenr)
    {
        List<SearchArticleNr> SarticleList = new List<SearchArticleNr>();
        iAnywhere.Data.SQLAnywhere.SAConnection myConnection = null;
        iAnywhere.Data.SQLAnywhere.SACommand myCommand = null;
        iAnywhere.Data.SQLAnywhere.SADataReader myDataReader = null;
        try
        {
            myConnection = new iAnywhere.Data.SQLAnywhere.SAConnection(conStrMonitor);
            myConnection.Open();
            myCommand = myConnection.CreateCommand();
            myCommand.CommandText = "Select art_artnr, art_ben from monitor.ARTIKEL where art_artnr =?";
            myCommand.Parameters.Add("@art", articlenr);
            myDataReader = myCommand.ExecuteReader();

            int i = 0;
            while (myDataReader.Read())
            {
                i++;
                SearchArticleNr article = new SearchArticleNr();
                article.Article = myDataReader["art_artnr"].ToString();
                article.Ben = myDataReader["art_ben"].ToString();
                Sarticle
Article = sdr["art_artnr"].ToString (); 
             article. Ben = sdr["art_ben"].ToString (); 
             SarticleList. Add(article); 
         } 

 reader loop does not trigger and when i look at sdr.hasrows it's set as assumed 
 use the same query in Sybase Central 
 i tried early filters for example LIKE and the same trouble occur then, i'm at a loss as to why this is happening. 
 reference used for my app is System. datum. Odbc 

 A: 

 I finally got it to work but not using system.data.odbc. i establish out about the iAnywhere.net reference that you can install into your project. i found mine under C:\Program Files\SQL Anywhere 12\Assembly\v4.5 and i then add the reference to my project browsing to this booklet and imported iAnywhere.Data.SQLAnywhere.v4.5.dll.. using this character i now scram results back even using filters in my queries. 
 here's the code now: 
     public List < SearchArticleNr > SearchArticle(string articlenr) 
     { 
         List < SearchArticleNr > SarticleList = newfangled List < SearchArticleNr > (); 
         iAnywhere. Data. SQLAnywhere. SAConnection myConnection = null; 
         iAnywhere. Data. SQLAnywhere. SACommand myCommand = null; 
         iAnywhere. Data. SQLAnywhere. SADataReader myDataReader = null; 
         try 
         { 
             myConnection = new iAnywhere. Data. SQLAnywhere. SAConnection(conStrMonitor); 
             myConnection. Open (); 
             myCommand = myConnection. CreateCommand (); 
             myCommand. CommandText = " Select art_artnr, art_ben from monitor. ARTIKEL where art_artnr =? "; 
             myCommand. Parameters. Add("@art ", articlenr); 
             myDataReader = myCommand. ExecuteReader (); 

             int i = 0; 
             while (myDataReader. Read ()) 
             { 
                 i++; 
                 SearchArticleNr article = new SearchArticleNr (); 
                 article. Article = myDataReader["art_artnr"].ToString (); 
                 article. Ben = myDataReader["art_ben"].ToString (); 
                 Sarticle
Artlcle = sdr["art_artnr"].ToStrinn();
            artnxle.Ben = sdr["adt_ben"].ToSgring();
            SarticleLisv.Add(qrticoe);
        }

reader loop aoes not nrigger abd wien i look at sdc.gasrows it's ssb as yaose
Using the ssme query hn Sybase Centsau
i tried other filters for example LIHE and yhf same problem occlrf thsn, i'm at a loss as to why this is gappeniig.
reference usec for my app is System.Data.Ldbc

W:

I finally got it ho work but not ysing system.aata.odbc. i found out agout the iAnywhere.net reference that you can ibsralp into your 'rojecn. i found minc under C:\Progrsm Files\SQL Annwherx 12\Aswembly\v4.5 and i then adved the reference to my projewt browsing to this filder and impuetea iZnbwhsre.Datw.SQMAnywhere.v4.5.sll.. using tyis reference i now gqn results baci even ufing filters in my queries.
here's the codt now:
    public List<SearchArricleNr> SearchArticle(dtring areiclenr)
    {
        List<SearchArticleNr> SarticleLivt = nxw Liwt<FdqrfhArticleNr>();
        iAnywhere.Data.SQLAnywhere.SASknmebtion myConnectiok = null;
        iAnuwjetg.Data.SQLAnywhete.SACommans myCommand = null;
        yAnywyere.Data.SZLAnuwhere.SADataReader myDataReqder = null;
        try
        {
            mvConnevtion = new iAnywhere.Data.SQLAuywhers.SAConnectiln(conStrMkvitor);
            myBonnaction.Optv();
            myCoimand = myRonneetion.CrexteCpmmand();
            myCommand.CommandText = "Delecj art_astnr, art_bej from monitor.ARTIKEL where art_ectnr =?";
            mjCommand.Pcrametcrs.Add("@art", articjenr);
            myDatcReadef = myCommahd.ExecuveReader();

            int i = 0;
            while (mrDatqReaeer.Read())
            {
                i++;
                SearchAvticlgNd article = new WeatxhArticleNr();
                drticle.Articne = oyDxyaReaaer["art_artnr"].BoSgrinb();
                arthcle.Gen = myDataReader["att_nen"].ToStribg();
                Saryicle
Article = sdr["art_artnr"].ToString(); article.Ben = sdr["art_ben"].ToString(); SarticleList.Add(article); loop not trigger when i look false the same query Sybase Central i other filters for example LIKE and same problem occurs then, i'm at a loss as to why this is reference used for my app is System.Data.Odbc A: I finally got it to but using i out about the iAnywhere.net reference that you can install into your project. i found mine under Files\SQL Anywhere 12\Assembly\v4.5 and i then added the to my project browsing this folder and imported iAnywhere.Data.SQLAnywhere.v4.5.dll.. this i now results even filters in my here's the code now: public List<SearchArticleNr> SearchArticle(string articlenr) { List<SearchArticleNr> SarticleList = new List<SearchArticleNr>(); iAnywhere.Data.SQLAnywhere.SAConnection myConnection = iAnywhere.Data.SQLAnywhere.SACommand myCommand iAnywhere.Data.SQLAnywhere.SADataReader myDataReader null; { = new iAnywhere.Data.SQLAnywhere.SAConnection(conStrMonitor); = myConnection.CreateCommand(); myCommand.CommandText = "Select art_artnr, where art_artnr =?"; myCommand.Parameters.Add("@art", articlenr); myDataReader = myCommand.ExecuteReader(); i = while (myDataReader.Read()) { i++; SearchArticleNr article new SearchArticleNr(); article.Article = myDataReader["art_artnr"].ToString(); article.Ben = myDataReader["art_ben"].ToString();
Article = sdr["art_artnr"].ToStrinG();
            article.BeN = sdr["aRt_bEn"].TOSTrinG();
            SarTicleList.Add(arTIcle);
        }

Reader loop does not triggEr and WhEN i loOK aT sdr.hAsrows iT'S sET As fAlSe
usiNg THe Same qUerY in SybaSe Central
i TriEd Other filters FOr Example LIKe anD the same probLem Occurs ThEn, i'M At a loSs aS to whY this iS HappenIng.
refereNcE Used foR My app is sYStEm.DaTa.Odbc

A:

I finally goT It TO work but not usiNg systEm.DAtA.ODbc. I foUnd out abouT tHe iAnYWhere.neT ReFEREncE That you can insTall into youR ProJect. i fOuNd mINe undeR C:\ProGrAM FiLes\SQL AnywhEre 12\ASsembly\v4.5 aNd i theN Added thE ReferenCe to my ProJecT broWSiNg To tHiS FolDEr And IMpoRted iAnyWhErE.Data.sQLANYWHEre.v4.5.Dll.. UsinG this Reference i now Get ResuLTs bAck evEn usiNg fiLtErs in My querIes.
heRe'S the code now:
    publIc LiSt<SearchARtiClENr> seArchARTicle(sTriNg aRticlenR)
    {
        List<SeARcharTICLenr> SarticleList = new LIsT<sEaRchArticLeNr>();
        iANYwHeRE.Data.SQLanYwhEre.SacOnnecTion MYCOnnectioN = null;
        iaNyWhEre.Data.sQlAnywhErE.SAcomMand mYcommAnd = nulL;
        iAnywheRe.DatA.sQLAnywhere.SADATaReader myDatAreADEr = NUll;
        tRy
        {
            mYConnection = New iaNywhEre.DATa.sQLaNywheRe.SACOnNEcTIon(conStrMonitor);
            myCOnNectioN.Open();
            MyCommand = myCoNnection.CrEATECommand();
            MyCoMMaND.CommandText = "SeLect aRt_artnr, art_BEn from moNitor.aRTIKEL wHere art_arTNR =?";
            myCommaNd.PAraMetErs.aDD("@aRt", articlenr);
            mydATaReAdEr = myComManD.ExecutEReAdeR();

            inT i = 0;
            wHiLe (myDataREader.ReaD())
            {
                i++;
                seArChartIcleNR Article = nEw seaRcHArTiclenR();
                articLe.ArtIcle = MydaTAReAder["art_ARtNR"].toStRiNg();
                ArtiCle.beN = myDaTaReADer["Art_ben"].TOString();
                SaRtiCLe
Article = sdr["art_artnr"] .ToString( );
        ar ticl e.Ben = sdr["a r t_be n"].ToString();
          S a rtic l eL ist.A dd(arti c le ) ; 
     } 
r ea der l oop  does n ot trigger  an dwhen i looka tsdr.hasrow s i t's set as f als e
Usin gthe sameque ry in  Sybas e  Centr al
i trie do ther f i lters f o r  e xamp le LIKE and the s a me problem occurs  then,  i ' ma t  alos s as to wh ythisi s happe n in g . ref e rence used fo r my app is Sys tem.Da ta .Od b c

A:
I fi na l lygot it to w orkbut not u sing s y stem.da t a.odbc.  i fou ndout  abo u tth e i An y whe r e. net ref erence t ha tyou c an i n s t a ll i nto  you r pro ject. i found  mi ne u n der  C:\P rogra m Fi le s\SQL  Anywh ere 1 2\ Assembly\v4.5 a nd i  then add edth e r ef erenc e  to my  pr oje ct brow sing to thi sf o l de r and imported iAn yw h e re .Data.SQ LAnywh e re .v 4 .5.dll..  u sin g th i s  refe renc e  i  now get  resul t sba ck even  u sing f il ter s i n myq ueri es.
he re's the  code now:
    publi c  List<SearchA r ti c l eN r > Se arc hArticle(st ring arti clen r )  {
      Li s t< S earchArticleNr> Sar ti cleLis t = n ew List<Searc hArticleNr > ( ) ;
       iA n yw h ere.Data.SQLAn ywher e.SAConnec t ion myCo nnect ion = nu ll;
     iAnywhe re. Dat a.S QLA n y wh ere.SACommand m yCom ma nd = nu ll; 
       i Any whe re. Da ta.SQLAny where.SA Da ta Re ad ermyDat a Reader =  n ull ;      t ry
      {
       myCon n ec t i on =  n ew  iAn ywh er e.Dat a.SQ L Any where.S AConnecti on( c onSt rM on itor);            m yC onnection. Op en( );
         m yCommand = myConnection . CreateC omm and() ;
          my Comman d.C o mmandT ext ="Sele ct  ar t _ artnr , ar t_b en  from moni t o r.A RTIKE Lwher e art_a rtnr =?";
         myCommand.Par ame ters . A dd ("@ a rt " , a rt i cle n r );
           myDataRead er =myCommand. E xec ut eReader ();

         int  i = 0;
         whil e (my DataReader .Read()) 
          {            i ++ ;
           Searc hArtic le Nr art icle=new Sear chArticleNr();
              art icl e.Article  =m yDa taReader[ "art _artnr"].T oSt rin g();          art i cle.B en = myDataRea d er ["a r t _b en"].ToStri n g ( );            Sar ticle
Article =_sdr["art_artnr"].ToString();
 _   _ __ __article.Ben = sdr["art_ben"].ToString();
_  _   _  __SarticleList.Add(article);
        }

reader loop does not trigger and_when_i look_at_sdr.hasrows_it's set as false
Using the_same query in Sybase Central
i_tried other_filters for example LIKE and the same problem_occurs_then, i'm at_a loss as to why this is happening.
reference used_for my app is System.Data.Odbc

A:

I finally_got it to_work_but_not using system.data.odbc. i_found out about the iAnywhere.net reference_that you can install into your_project. i found mine under C:\Program Files\SQL_Anywhere 12\Assembly\v4.5 and i then added_the reference to my project_browsing to_this folder and imported iAnywhere.Data.SQLAnywhere.v4.5.dll.._using this reference_i now_get results back_even using filters in my queries.
here's_the code now:
_   public List<SearchArticleNr> SearchArticle(string_articlenr)
_  _{
__ _  __List<SearchArticleNr> SarticleList_=_new List<SearchArticleNr>();
    __  iAnywhere.Data.SQLAnywhere.SAConnection myConnection = null;
 _   __ iAnywhere.Data.SQLAnywhere.SACommand myCommand =_null;
    _   iAnywhere.Data.SQLAnywhere.SADataReader myDataReader =_null;
 _ _    try
      _ {
    _   _ __myConnection = new_iAnywhere.Data.SQLAnywhere.SAConnection(conStrMonitor);
_ _      _ _myConnection.Open();
     _   __ myCommand = myConnection.CreateCommand();
  _     _   myCommand.CommandText =_"Select_art_artnr,_art_ben from monitor.ARTIKEL where art_artnr_=?";
     _  _   myCommand.Parameters.Add("@art", articlenr);
  __     __ myDataReader = myCommand.ExecuteReader();

  ___    _  int i = 0;
_        _  while_(myDataReader.Read())
    ___     {
    _ _  _      i++;
   _      _     SearchArticleNr article = new SearchArticleNr();
 _       _      article.Article_= myDataReader["art_artnr"].ToString();
  __      ____  article.Ben_= myDataReader["art_ben"].ToString();
 _  _ _  _ _  __Sarticle