ÎÒÔÚÆóÒµ¹ÜÀíÆ÷Öн«sqlserver µÄÒ»¸öÊý¾Ý¿âµ¼³öΪaccess£¬ÒªÓû§ÃûºÍÃÜÂë,
ÎÒÊäÈëÁËsqlÊý¾Ý¿âµÄ²»ÐÐ
accessĬÈϵÄadminÓû§ÃûÒ³²»ÐС£
Ôõô°ì£¿
µÇ¼Êý¾Ý¿âµÄÃû×ÖºÍÃÜÂë,²»Í¬·þÎñÆ÷,ÏȽ¨Á¢Á´½Ó·þÎñÆ÷
SQL code:
Transact-SQLÓï¾ä½øÐе¼Èëµ¼³ö£º
1.ÔÚSQL SERVERÀï²éѯaccessÊý¾Ý:
-- =========================== ......
ÈçºÎÉèÖÃsqlserverij¸öÓû§Ö»ÄÜÔËÐд洢¹ý³Ì£¬±ðµÄʲôȨÏÞ¶¼Ã»ÓÐ
GRANT all on dbo.proc_1 to user
http://wz.cnblogs.com/question/7030/
SQL code:
use testdb
go
--ÐÂÔöÓû§
exec sp_addlogin 'testuser' --Ìí¼ÓµÇ¼
exec sp_grantdbaccess N'testuser' --ʹÆä³ÉΪµ±Ç°Êý¾Ý¿âµ ......
º¯ÊýʵÏÖÈçÏ£º
GO
CREATE FUNCTION dbo.fn_Sum(@code varchar(50))
RETURNS varchar(8000)
AS
BEGIN
DECLARE @values varchar(8000)
SET @values = ''
SELECT @values = @values + ',' + values from test WHERE code=@code
RETURN STUFF(@values, 1, 1, '')
END
GO
DROP FUNCTION dbo.fn_Sum
ÎÒÏëÖªµÀµÄÊÇ£¬ ......
sqlserverÊý¾Ý¼Ó×ÜÅÅÐòµÄÓï¾äÔõôд£¿
ÈçÏÂÊý¾Ý±ítable
id
a
a
a
b
b
c
ÎÒÒªµÃµ½µÄΪ£º
a 3
b 2
c 1
ÕâÑù¼Ó×ÜidÃû³ÆÒ»ÑùµÄ²¢½øÐÐÅÅÐòÓ¦¸ÃÔõôд£¿
SQL code:
select id,count(1) from tb group by id
SQL code:
SELECT *,(SELECT COUNT(1) from TB WHERE ID=T.ID)AS NUM
from TB T ORDER BY ......
loatÀàÐ͵Äֵת»¯ÎªÊ±¼äÊÇ—>
C# code:
DateTime dt = DateTime.fromOADate(40277.4927000525);
MessageBox.Show(dt.ToString());
MessageBoxÏÔʾµÄʱ¼äÊÇ—>2010-4-9 11:49:29
µ«ÊÇͬÑùµÄÊý×Ö£¨¼È40277.4927000525£©£¬Èç¹û´ÓÊý¾Ý¿âÖÐÈ¡³öÀ´ÏÔʾµÄdatagridviewÖУ¬¾Í»á±ÈÉÏÃæµÄʱ¼ä¶àÁ½Ìì¡£
C# co ......
jspÍùsqlserver2000Àï²åÈëÖÐÎÄʱ£¬×ÜÊÇÂÒÂ룬Ôõô½â¾ö°¡£¿
SQL code:
insert tb(col) values(N'ÖÐÎÄ')
²åÈëʱÔÚÖÐÎÄ×Ö·ûÇ°¼Ó¸ö´óдµÄN
²»ÐÐѽ£¬String sql="insert into news values(N'+title+"',N'"+contents+"')";
²»¾ÍÊÇÕâÑùô£¿²»ÐеÄ
ÒýÓÃ
²»ÐÐѽ£¬String sql="insert in ......
×ܼǼÊý:322; ×ÜÒ³Êý:54; ÿҳ6 Ìõ;
Ê×Ò³ ÉÏÒ»Ò³ [1] [2] [3] [4] 5
[6] [7] [8] [9] [10] ÏÂÒ»Ò³ βҳ