СµÜÎÒÓÃADOÁ¬½ÓSQL server 2000Êý¾Ý¿â£¬È»ºóÔÚDBGridÖÐÏÔʾ£¬ÏÖÔÚÏë°ÑÔÚDBGridÖвéѯµ½µÄÊý¾ÝiPlot×÷ͼ£¬ÇëÎÊÈçºÎʵÏÖÔÚDBGridÖеÄÊý¾Ý¶ÁÈ¡£¬¶Á³öµÄÊý¾ÝÊÇSTRINGÀàÐ͵ģ¬ÈçºÎÓÐЧµÄת±ä³ÉÊý¾Ý¿âÖÐËù´æ´¢µÄDOUBLEÀàÐÍ»æͼ£¬Íû¸æÖªÒ»¶þ£¬²»Ê¤¸Ð¼¤£¡ÔÚDBGridÖеÄÊý¾Ý¶ÁÈ¡£¿ DBGrid.datasource.dataset.fieldbyname('xxx').asfloat ¶Á³öµÄÊý¾ÝʱÔÀ´Êý¾Ý¿âÖж¨ÒåµÄDOUBLEÀàÐÍÂ𣿠ÎÒÏë¶Á³öÌض¨µÄÊý¾Ý£¬È»ºó»æÖÆÊý¾ÝµÄÀúÊ·ÇúÏßͼ DBGrid.datasource.dataset.fieldbyname('xxx').value ¶Á³öµÄÊý¾ÝʱÔÀ´Êý¾Ý¿âÖж¨Òå¿ÉÒÔ²»ÊÇDOUBLEÀàÐÍ£¬µ«Äãת»»³ÉdoubleÐ͵Ļ°£¬ÐèÒªÊý¾Ý¿âÖеÄÄÚÈÝÒª·ûºÏdoubleÀàÐ͵ĹæÔò£¬·ñÔò¾Í»á³ö´í DataSet.First; while Not DataSet.Eof do begin With DataSet value:=DBGrid.datasource.dataset.fieldbyname('xxx').value; end DataSet.Next; end;
ÏÖÔÚÓÐÒ»ORACLEÖеÄSQLÓï¾ä£¬ÐèÒªÒÆÖ²µ½DB2ÖУ¬ÇëÎʸÃSQL¸ÄÈçºÎд ORACLEÖУº select floor(months_between(date1,date2)) from A date1,date2·Ö±ðΪ±íÖеÄÁ½¸ö×ֶΠ£¬¶¼ÎªÈÕÆÚÐÍ DB2ÖÐÈçºÎʹÓÃÐ ......