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

SQL 2000·ÖÒ³ - .NET¼¼Êõ / ASP.NET

sql2000´æ´¢¹ý³Ì·ÖÒ³£¬ÄÜ·µ»Ø×ܼǼÊý
×Ô¼ºÕ¼ ɳ·¢

ÍøÉÏ´ó¶Ñ

Ò²µÃmark

create procedure procedureName
@pageIndex int,
@pageSize int,
@pageCount int output,
@count int output
as
set @count=(select count(1) from tableName)
if(@count%@pageSize=0)
begin
  set @pageCount=@count/@pageSize
end
else
begin
  set @pageCount=@count/@pageSize
end
declare @delete int
set @delete=(@pageIndex-1)*@pageSize
declare @sql nvarchar(200)
set @sql='select top '+cast(@pageSize as varchar(12))+' * from tableName where id not in (select top '+cast(@delete as varchar(12))+' id from tableName)'
execute sp_executesql @sql
Ò²¿ÉÒÔ¸ù¾Ý×Ô¼ºµÄÐèÒª¶àÉ趨һЩ²ÎÊýµÄ ÎÒÕâÀïÊÇÒ»¸ö¼òµ¥µÄ·ÖÒ³´æ´¢¹ý³Ì ²»ÊÇͨÓõÄ

ÊýÁ¿½ÏС¿ÉÒÔ²ÉÓÃsql·ÖÒ³¶ÁÈ¡£º 

  Á½¸ö²ÎÊý£º PageSize£ºÃ¿Ò³µÄÐÐÊý PageIndex£ºÒ³Êý
  string sql = select count(*) from ±íÃû;select top " + PageSize + " * from ±íÃû where id not in (select top " + (PageIndex - 1) * PageSize + " id from ±íÃ÷ order by id) order by id

  ÔÚºǫ́£º
  ViewState["pageindex"] ±£´æµ±Ç°µÄÒ³Êý ViewState["pagecount"] ±£´æ×ܵÄÒ³Êý 
  decimal Sum= decimal.Parse(ds.Tables[0].Rows[0][0].ToString()) »ñÈ¡×ܵÄÐÐÊý
  int pagecount = int.Parse(Math.Ceiling(Sum/pagesize).ToString()) »ñÈ¡×ܵÄÒ³Êý


Ïà¹ØÎÊ´ð£º

sqlССµÄÒÉÎÊ - .NET¼¼Êõ / C#

¿ÉÄÜÒòΪ¹¤×÷µÄÔ­Òò ½Ó´¥Êý¾Ý¿âÕâ¿é±È½ÏÉÙ£¬Ö®Ç°¶¼ÊÇ×ö³ÌÐòÕâ¿é£¬Êý¾Ý¿âÕâ¿é¶¼ÓÐרÃŵÄÈËÀ´×ö ·Ö¹¤¶¼ºÜÃ÷ϸ ËùÒÔ¶ÔÊý¾Ý¿âÕâÒ»¿éÍêÈ«²»Á˽⡣ǰ¶Îʱ¼ä È¥ÃæÊÔÁ˼¸¼Ò¹«Ë¾ ¼¸ºõ¶¼ÊÇÔÚÊý¾Ý¿âÕâ¿é¹ÒµôµÄ Á¬¸ö¼òµ¥µÄSQ ......

js¿ØÖÆasp¿Õ¼ädropdownlist - .NET¼¼Êõ / ASP.NET

ÎÒÓÐÁ½¸ödropdownlist¶¼°óºÃÁËÖµ£¬ÏëÑ¡ÖÐÒ»¸ödropdownlistÖеÄÖµ£¬È»ºóÔÚÁíÒ»¸ödropdownlistÖÐÑ¡ÖÐÏàÓ¦µÄÒ»Ïî¡£
²»ÊÇ´Óа󶨵ڶþ¸ödropdownlist£¬ÊÇÔÚÒѾ­°óºÃµÄÖµµ±ÖÐÑ¡ÖÐÒ»¸ö¡£
ÎÒÏëÓÃjsд
ÇóÖú
Äã¿ÉÒÔ°Ñdrop ......

AJAX ºǫ́Ôõôȡ²»µ½Ö± - .NET¼¼Êõ / ASP.NET

´úÂëÈçÏ Çë¸ßÊÖ Ö¸µãÏ лл
ajax_http.js
-------------
function getXMLHTTP() {
  var xmlhttp;
  if (window.ActiveXObject) {
  //IE
  try {
  ......

SQL·ÖÒ³ÓëOracle·ÖÒ³µÄÒÉÎÊ£¿ - Java / Web ¿ª·¢

ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......

¹ØÓÚSqlµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

½«Ò»¸ö²éѯÓï¾ä¸³¸øÒ»¸ö±äÁ¿£¬ÈçÏ£º
DECLARE @STR NVARCHAR(MAX)
SET @STR='SELECT * from SALE_PROD'
ÔõôÑù²ÅÄÜÖ´ÐÐËüÄØ£¿
Çë¸ßÊÖ£¬ÈÊÐÖ£¬ÏÀ½ã°ï°ïæ°¡


¶àл£¬¿ÉÒÔÀ²£¬¸ßÊÖ°¡

Ö±½ÓÖ´ÐоÍÐÐÁË

exec ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ