Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sql ÎÊÌâ

PBÖпª·¢µÄ¡£

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime < '"+endTime+"')"

ÕâÑùдÓÐÎÊÌâÂð£¬StartTime, EndTimeÔÚÊý¾Ý¿âÖÐÊÇdatetimeÀàÐÍ
×îºÃÓòÎÊý»¯µÄÐÎʽд.

PB²»¶®£¡Â¥Ï¼ÌÐø

ÄܾٸöÀý×ÓÂð£¬Ð»Ð»
ÒýÓÃ
×îºÃÓòÎÊý»¯µÄÐÎʽд.


C# code:
string sql = xx + " where startTime > @startTime and EndTime < @endTime";
SqlCommand cmd = new SqlCommand(sql,con);
cmd.Parameters.Add("@startTime",SqlDbType.DateTime);
cmd.Parameters.Add("@endTime",SqlDbType.DateTime);

cmd.Parameters["startTime"].Value = xx;
cmd.Parameters["endTime"].Value = xx;

cmd.ExecuteNonQuery();


PBÀïÃæ¿ÉÒÔÕâôÓÃô£¿/СÁº´ó´ó

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

--MSSQL
string sql
sql = dw_1.GetSQLSelect()+" Where (StartTime> '"+em_1.Text+"') and (EndTime < '"+em_2.Text+"')"

SQL code



Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.


Ïà¹ØÎÊ´ð£º

SQL serverÊý¾Ý¼¯³ö´íÇóÖú

Á½ÖÖ´íÎó£º
1.Èç¹ûÎÒÕâÑùÉêÃ÷£ºResultSet rs;´íÎóÌáʾÈçÏ£º

An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48:    ......

ÇóÒ»ÌõSQLÓï¾ä¡£

ID  ²Í±ð    ʱ¼ä
1  ÖÐ²Í 2009-10-25
2  ÖÐ²Í 2009-10-26
3  Íí²Í 2009-10-26
4  Ôç²Í 2009-10-27

½á¹û
1  ÖÐ²Í 2009-10-25
3  Íí²Í ......

pl/sqlµ¼ÈëÊý¾ÝÎÊÌâ

ÎÒEXCELÖÐÒ»¸öµ¥Ôª¸ñµÄÊý¾ÝÈç  "2009-01","8949-232"

½«Õâ¸öÊý¾ÝÕ³Ìùµ½PL/SQLÖеÄÒ»¸ö±íÖкó,Êý¾ÝÈ·ÊdzÉΪÁË 2009-01,8949-232 ,°ÑËùÓеÄ""¶¼Ã»ÁË,
ÈçºÎÅªÄØ?Çë´ó¼ÒÊÔ ......

ÇóÒ»¸ö¸ßÄѶȵÄSQLͳ¼ÆÃüÁî

Ô­À´±í½á¹¹Îª£º

  ʱ¼ä    Àà ÐÍ  ÊýÁ¿
2009-1-2  ëÒ  23 
2009-1-2  ëÒ  11 
2009-1-2  ÃÞÒ  3 
2009-1-3  ......

Microsoft SQL Server 2005 JDBC Driver °æ±¾ÎÊÌâ

Microsoft SQL Server 2005 JDBC Driver  Õâ¸öÇý¶¯´ó¼ÒÓÐÓùýÂð£¿ÓÃʲô°æ±¾ºÅ¡£Î¢Èí¹ÙÍøÓÐ1.1µÄ»¹ÓÐ2.0µÄ£¬ÎÒÓõÄIDEÊÇJBuilder9
ÏÖÔÚÓÃ2.0µÄ°É£¬È¥Î¢ÈíÍøÕ¾ÏÂÔØ¼´¿É¡£Á¬½Ó×Ö·û´®ºÍÒÔǰÉÔÓв»Í¬£¬¿ÉÒÔËÑÒ»ÏÂÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ