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

Oracle´óÎı¾ÔÚASPÖдæÈ¡ÎÊÌâµÄ½â¾ö


ÔÚÎÒ¿ª·¢BS½á¹¹³ÌÐòÖУ¬ÓÉÓÚ¾­³£ÐèÒªÔÚORACLEÖд¦ÀíһЩÈÝÁ¿½Ï´óµÄÎı¾Êý¾Ý£¬ËùÒÔ¾­¹ý·´¸´²âÊÔÖÕÓÚÓÃASP³É¹¦½â
¾öÁË´óÎı¾Êý¾ÝÔÚORACLEÏ´æÈ¡ÎÊÌâ¡£
¡¡¡¡
¡¡¡¡Ò»¡¢ÔËÐл·¾³£º
¡¡¡¡1¡¢Microsoft Windows 2000 Server + IIS 5.0
2¡¢Oracle8iÖÐÎıê×¼°æ
¡¡¡¡
¡¡¡¡¶þ¡¢½¨Á¢Êý¾Ý±í£º
¡¡¡¡CREATE TABLE SYSTEM.TEST(
BLOB LONG,
ID NUMBER)
/
¡¡¡¡Èý¡¢Ô´³ÌÐò£º
1¡¢Êý¾Ý´æÈë³ÌÐò£ºtest.asp
£¼%
'±íµ¥Ìá½»´¦Àí²¿·Ö
'--------------------------------------------------
If request("ok")=1 then
'×Ö·ûת»»º¯Êý
function tansstr(sstr)
sstr=replace(sstr," "," ")
sstr=replace(sstr,chr(13) & chr(10),"£¼br£¾")
tansstr=sstr
end function
'Ìá½»Êý¾Ý¸³Öµ
a=lenb(request("text"))
b=len(request("text"))
c=tansstr(request("text"))
'´ò¿ªÊý¾Ý¿â£¬´ò¿ªtestÊý¾Ý±íÒÔRsΪ¼Ç¼¼¯
Set OraSession=CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase=OraSession.DbOpenDatabase("autop","system/manager",0)
Set rs=OraDatabase.CreateDynaset("select * from test order by id desc",0)
'ÇóIDÖµ
if rs.eof then
id=1
else
id=rs("id")+1
end if
'ÒòΪÊÜSQLÓï¾ä³¤¶È´óСÏÞÖÆËùÒÔ£¬ÒÔ·ÇSQLÓï¾ä´æÈëÊý¾Ý
'--------------------------------------------------------
'н¨¼Ç¼
rs.DbAddNew
'¾­µä¾ÍÔÚ±¾¾ä£ºÒÔRS¼Ç¼¼¯µÄFields¶ÔÏóµÄDbAppendChunk·½·¨´¦Àí´ó×ֶδæÈëÎÊÌâ¡£
rs.Fields("blob").DbAppendChunk(c)
'´æÈëIDÖµ
rs("id")=id
'ˢмǼ¼¯
rs.DbUpdate
'ÏÔʾ½á¹û²¿·Ö
'---------------------------------------------------------
Response.write "Êý¾ÝÒѾ­´æÈëÊý¾Ý¿âÖС££¼br£¾"
Response.write "×ܼÆÕ¼ÓÃ×Ö·ûÊý£º £¼font color=blue£¾" & formatnumber(b,2,-2,-2,-1) & "£¼/font£¾ ×Ö£¼br£¾
"
Response.write "×ܼÆÕ¼ÓÃ×Ö½ÚÊý£º £¼font color=blue£¾" & formatnumber(a,2,-2,-2,-1) & "£¼/font£¾ Byte£¼br
£¾"
Response.write "£¼a href='view.asp'£¾Çëµ÷ÔÄ……£¼/a£¾"
'¹Ø±ÕÊý¾ÝÁ¬½Ó¡£
rs.close
set rs=nothing
Set OraSession=nothing
Response.end
End If
%£¾
£¼html£¾
£¼body£¾
£¼form method="POST" action="test.asp"£¾
£¼p£¾£¼font color="#FF0000"£¾£¼b£¾Oracle´ó×Ö¶ÎÔÚASPÖдæÈ¡ÎÊÌâµÄ½â¾ö£º£¼/b£¾£¼/font£¾£¼/p£¾
£¼


Ïà¹ØÎĵµ£º

oracleÁ·Ï°£¨mldnÊÓƵ¿Î³Ì£©ËÄ

ÊÓͼ
´´½¨ÐÂ±í£ºcreate table emp2 as select * from emp;
create view empv20 as select empno,ename,job,hiredate,deptno from emp where deptno=20 with check option;
Óï·¨£ºcreate or replace view ÊÓͼÃû³Æ as ×Ó²éѯ£¨ÐÞ¸ÄÖ®ºóµÄ×Ó²éѯ£©
Ìæ»»ÊÓͼ(ÐÞ¸Ä)
create or replace view empv20 as select empno,ename, ......

oracle Óû§¹ÜÀí

ϵͳȨÏÞ£º »ØÊÕʱ²»»á²úÉú¼¶Áª»ØÊÕ
conn / as sysdba;
create user t1 identified by t1;
create user t2 identified by t2;
grant connect to t1,t2;
grant create table, create view to t1 with admin option;
conn t1/t1
grant create table to t2;
conn / as sysdba;
select * from dba_sys_privs where gra ......

Oracle²Ù×÷ϵͳÈÏÖ¤

ĬÈÏÇé¿öÏ£¬ÔÚOracleµÄÖ÷»úÉÏ£¨linuxϵͳ£©µÄOracle²Ù×÷ϵͳÓû§Ï£¬ÒÔsysÓû§µÇ½Êý¾Ý¿âʱ¿ÉÒÔ²»ÓÃÊäÈëÃÜÂëÖ±½ÓµÇ¼¡£Êµ¼ÊÉÏ£¬Ö»ÒªÊÇÊôÓÚdba×飨linux£©»òosdba×飨windows£©Ï£¬¶¼¿ÉÒÔ²»ÓÃÃÜÂë½øÐеǼ¡£ÕâÊÇÈÏÖ¤·½Ê½³ÆΪOSÈÏÖ¤¡£
ÕâÖֵǼ·½Ê½µÄ¿ØÖÆ£¬ÊÇͨ¹ý$ORACLE_HOME/network/admin/sqlnet.oraÖеģº
SQLNET.AUTH ......

Oracle PL/SQLÖÐÈçºÎʹÓÃ%TYPEºÍ%ROWTYPE

¡¡
¡¡¡¡1. ʹÓÃ%TYPE
¡¡¡¡ÔÚÐí¶àÇé¿öÏ£¬PL/SQL±äÁ¿¿ÉÒÔÓÃÀ´´æ´¢ÔÚÊý¾Ý¿â±íÖеÄÊý¾Ý¡£ÔÚÕâÖÖÇé¿öÏ£¬±äÁ¿Ó¦¸ÃÓµÓÐÓë±íÁÐÏàͬµÄÀàÐÍ¡£ÀýÈ磬students±íµÄfirst_nameÁеÄÀàÐÍΪVARCHAR2(20),ÎÒÃÇ¿ÉÒÔ°´ÕÕÏÂÊö·½Ê½ÉùÃ÷Ò»¸ö±äÁ¿£º
¡¡¡¡DECLARE
¡¡¡¡ v_FirstName VARCHAR2(20);
¡¡
¡¡µ«ÊÇÈç¹ûfirst_nameÁеĶ¨Òå¸Ä±äÁ ......

CodeSmithÁ¬½ÓAccess,Sql,Oracle,mysql

ACCESSÊý¾Ý¿â
1:CodeSmithÑ¡ÖÐÁ´½ÓÀàÐÍÊÇ£ºADOXSchema
2:ÎÞÃÜÂëµÄAccessÁ´½ÓΪ£º
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\hh\db.mdb;
3:ÓÐÃÜÂëµÄAccessÁ´½Ó£º
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\hh\db.mdb;
Jet OLEDB:Database Password=1111
SqlÊý¾Ý¿â
server=192.1.1.14;User ID=test; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ