Oracle¶¯Ì¬SQLÓï¾ä
ÔÚʹÓÃODP.NET½øÐÐOracle±à³Ìʱ£¬ÓÐʱºòSQLÓï¾ä·Ç³£¸´ÔÓ£¬ÐèÒª²ÉÓö¯Ì¬¹¹Ôì²éѯÓï¾äµÄÇé¿ö£¬ÓÐÁ½ÖÖ·½·¨¿ÉÒÔ¹¹Ô춯̬µÄSQLÓï¾ä£¬²¢Ö´Ðзµ»Ø½á¹û¼¯¡£
1¡¢ÔÚÊý¾Ý·ÃÎʲ㹹ÔìSQLÓï¾ä
ÀýÈçÏÂÃæµÄÓï¾ä£¬½«¹¹ÔìÍêÕûµÄSQLÓï¾ä¸³Öµ¸øCommandText£¬ÔÙ´«µÝµ½Êý¾Ý¿â½øÐÐÖ´ÐУ¬·µ»Ø½á¹û¼¯¡£
loadCommand.CommandType = CommandType.Text
loadCommand.CommandText = "Select * from Users"
dataAdapter .SelectCommand = loadCommand
dataAdapter . Fill(data)
dataAdapter .SelectCommand = loadCommand
dataAdapter . Fill(data)
¸Ã·½·¨ÐèÒª½«Õû¸öSQLµÄ¹¹Ôì¹ý³Ì·ÅÔÚDataAccess²ã£¬ÒµÎñÂß¼·¢Éú±ä»¯£¬Ð޸IJ»·½±ã£¬¶øÇÒÿ´Î²éѯÐèÒª´«µÝ¸øÊý¾Ý¿âºÜ³¤µÄ²éѯ×Ö·û´®£¬´«µÝ²ÎÊýµÄЧÂÊÒ²²»¸ß¡£
2¡¢ÔÚ´æ´¢¹ý³ÌÖй¹Ô춯̬SQLÓï¾ä²¢Ö´ÐÐ
ÒÔÏÂΪһ¸öÍêÕûµÄÊÂÀý£¨¾¹ýɾ¼õ£©£¬ÆäÖÐRefCursor Ϊ×Ô¶¨ÒåÓαêÀàÐÍ
PROCEDURE G_Search(P_YearNO IN NUMBER,
P_ControlType IN NUMBER,
P_Progress IN CHAR,
P_DepartID IN VARCHAR2,
P_ProjectName IN NVARCHAR2,
&n
Ïà¹ØÎĵµ£º
1.µ½http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/htdocs/winsoft.htmlÏÂÔØ
11.1.0.7.0 °æµÄ¼´Ê±¿Í»§¶Ë³ÌÐò°ü — Basic£¨²»ÊÇBasic Lite£©
2.½«ÏÂÔص½µÄÎļþ½âѹ£¬½âѹºóÎÒ½«Ä¿Â¼instantclient_11_1ÀïµÄÈ«²¿Îļþ¿½±´µ½ÁËÒ»¸öеÄĿ¼£ºE:\programs\OracleClient¡£ÄãÒ²¿ÉÒÔ²»¿½±´£¬Ö ......
Òý:ÏÖÔÚһЩÖÐСÆóÒµ¶¼¹ã·ºÊ¹ÓÃMS Windows NT ΪÍøÂç²Ù×÷ϵͳƽ̨£¬SQL Server Ϊºǫ́Êý¾Ý¿â¹¹½¨ÆóÒµÄÚ²¿µÄ¸÷ÖÖ¹ÜÀíϵͳ£¬¸Ã³ÉÊì¼¼ÊõµÄÆÕ¼°£¬ÄÜÓÐЧµØ°ïÖúÆóÒµ¶ÔÄÚ²¿Êý¾Ý½øÐйÜÀí¡£ÕâÀàÓ¦ÓÃÖУ¬¶ÔÊý¾Ý¿âµÄ±¸·ÝÊǺÜÖØÒªµÄÒ»Ï×÷£¬ÆäÖØÒªÐÔ²»±Ø¶àÑÔ¡£
¡¡¡¡Æ䱸·ÝµÄ·½·¨ºÜ¶à£¬È磺ÔÚһЩ¹æÄ£½Ï´ó¡¢×ʽðÐÛºñµÄÆóÒµ£¬ÍùÍùÊÇ ......
½ñÌì¸ø´ó¼Ò·ÖÏíÒ»ÏÂÈçºÎ±¸·ÝºÍ»Ø¸´sql server Êý¾Ý£¬
Ê×ÏÈÈ·±£Äã¾ßÓÐDBµÄ×î¸ßȨÏÞ
ÔÚJAVA´úÂëÖÐ Äã¿ÉÒÔÕâÑùдpublic class Opp extends TestCase{
public void test1()
{
try
{
Connection con = DBUtils.getConn();
String sql="backup database tdzl to disk='d:\\tdzl.bak'";
Statement st = con.c ......