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

ASP.NET2.0Á¬½ÓORACLE½â¾ö·½°¸

½çÃæ: Default.aspx
 
½çÃæÉÏÌí¼ÓµÄ¿Ø¼þ:
Á½¸öTextBox: tEmail(ÓÃÓÚÊäÈëÓû§email),tPassword(ÓÃÓÚÊäÈë×¢²áÃÜÂë)
Ò»¸öButton: bReg
Ò»¸öLabel: lLable(ÓÃÓÚ×¢²á³É¹¦ºóÏÔʾӦ´ð)
DemoµÄ´úÂë: Default.aspx.cs
ÎÒÃÇÏÈ°ÑÊý¾ÝµÄÁ¬½Ó×Ö·û´®Ð´ÔÚWeb.configÀï:
<appSettings>
<add key="oracleconn" value="User ID=Óû§Ãû;Password=ÃÜÂë;Data Source=Êý¾Ý¿â·þÎñÃû;"/>
</appSettings>
ÏÂÃæÊÇDemoµÄÔ´´úÂë:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OracleClient; //Ìí¼ÓOracleClientµÄÒýÓÃ
public partial class _Default : System.Web.UI.Page
{
public System.Data.OracleClient.OracleConnection objConn; //ÉùÃ÷Ò»¸öOracleConnection¶ÔÏó
public System.Data.OracleClient.OracleCommand objCmd; //ÉùÃ÷Ò»¸öOracleCommand¶ÔÏó
protected void Page_Load(object sender, EventArgs e)
{
lLable.Text = "";
string strcon = System.Configuration.ConfigurationManager.AppSettings["oracleconn"];
//´ÓWeb.config ÎļþÀïµ÷ÓÃÊý¾Ý¿âÁ¬½Ó×Ö·û´®
objConn = new OracleConnection(strcon);
}
protected void bReg_Click(object sender, EventArgs e)
{
string strSQL = "INSERT INTO TEMP(EMAIL,PASSWORD) values ('";
strSQL+=tEmail.Text.Replace("'","''").ToString()+"','";
strSQL+=tPassword.Text.Replace("'","''").ToString()+"')";
objCmd = new OracleCommand(strSQL, objConn);
objConn.Open();
objCmd.ExecuteNonQuery();
objConn.Close();
lLable.Text = "×¢²á³É¹¦£¬ÄúµÄÓʼþµØÖ·ÊÇ:"+tEmail.Text.ToString();
}
}
×¢Òâ:
Æäʵֱ½ÓдÉÏÃæµÄ´úÂë»á³ö²»ÉÙ´íÎóµÄ£¬Òª×öÁ½¸ö¹¤×÷²Å¿ÉÒÔ¡£
1. ASP.NET2.0ÀïĬÈϲ»ÄÜÖ±½ÓÌí¼Óusing System.Data.OracleClient;ÐèÒªÔÚÌî¼ÓÒýÓõÄ.NET×é¼þ¿òÀïÑ¡ÔñSystem.Data.OracleClientÌí¼Óºó²ÅÄÜÓá£
2. ÔÚASP.NET1.1Öе÷ÓÃWeb.configÖеÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®Ê±Ê¹ÓÃÓï¾äSystem.Configuration.ConfigurationSettings.AppSettings["oracle"];,ÔÚ2.0ÀïÐëҪʹÓÃSystem.Configuration.ConfigurationManager.AppSettings


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

¡¾ÊÕ²ØÕûÀí¡¿OracleÊý¾Ý¿âÌåϵ¼Ü¹¹

 Ô­Îļûhttp://blog.csdn.net/kele1121/archive/2009/10/30/4742051.aspxÓëhttp://www.itpub.net/thread-1105403-1-1.html
 Ëùν
Oracle
µÄÌåϵ¼Ü¹¹£¬ÊÇÖ¸
Oracle
Êý¾Ý¿â¹ÜÀíϵͳµÄµÄ×é³É²¿·ÖºÍÕâЩ×é³É²¿·ÖÖ®¼äµÄÏ໥¹Øϵ£¬°üÀ¨
ÄÚ´æ½á¹¹¡¢ºǫ́½ø³Ì¡¢ÎïÀíÓëÂß¼­½á¹¹µÈ¡£
Oracle
Êý¾Ý¿âµÄÌåϵºÜ¸´ÔÓ£¬¸´Ô ......

ORACLE¸ÅÒªÎļþ

¼ÇµÃÒÔÇ°ÉÏOCP¿Î³ÌµÄʱºòÄǸöÀÏʦ½ÌÎÒÃÇʹÓÃPROFILEÀ´ÏÞÖÆÓû§µÄһЩ²Ù×÷£¬ÄǸöʱºò¹À¼ÆÊÇÀÏʦ͵ÀÁ°É£¬ËùÓÐʵÑ鶼ÊÇͨ¹ýOEMµÄÐÎʽÀ´²Ù×÷£¬¸ù±¾²»»áÉæ¼°µ½ÃüÁîÐС£
ƽʱÔÚѧϰORACLEµÄ¹ý³ÌÖкÃÏñÒ²ºÜÉÙÅöµ½¹ØÓÚPROFILEµÄÎÊÌ⣬½ñÌì¹äÒ»¸öÅóÓѵÄBLOGµÄʱºò·¢ÏÖÕâƪÎÄÕ£¬¾õµÃͦºÃµÄ£¬ÄÚÈݲ»¶à£¬¼ò½àÃ÷ÁË£¬ºÃ´õÒ²ËãÊǸöÃüÁîÐÐ ......

ORACLE Íâ¼üÔ¼Êø¶ÔNULLµÄ´¦Àí

¸Õ²ÅÔÚÍøÉÏËÑÕâ¸öÎÊÌâµÄʱºòËѵ½ITPUBÉÏyangtingkun²©¿ÍÀïµÄһƪÎÄÕ£¬Ð´µÄͦºÃµÄ£¬×Ô¼º¸´ÖÆÁËÒ»ÏÂËûµÄʵÑé¹ý³Ì£¬¼ÓÁ˵㲽ÖèÑéÖ¤ÁË×Ô¼ºµÄÏë·¨£¬Ò²½â¾öÁËÒÉÎÊ¡£
Ç°Ãæд¹ýһƪÎÄÕ£¬½éÉܹýΨһԼÊøµÄÇé¿öÏ£¬Oracle´¦ÀíNULLµÄÌص㡣¼òµ¥µÄ˵£¬¾ÍÊÇÈç¹û¶à¸öÁй¹³ÉÁËΨһ£¬ÇÒÆäÖаüº¬Ò»¸öÒÔÉϵÄNULL£¬ÄÇôOracle»áÒªÇó²»ÎªNULL ......

asp.net¿Í»§¶Ë½Å±¾µ÷ÓÃwebservice

 ÓÉÓÚ asp.net ajax ·â×°Á˺ܶàºÜºÃµÄ·½·¨£¬ËùÒÔʹÓÃÕâ¸ö¿ò¼Üµ÷ÓÃwebwervice±äµÄ·Ç³£¼òµ¥¡£
µÚÒ»²½
webservice ÀàµÄ·½·¨ÐèÒªÓÐscriptServiceµÄ  attribute.
 namespace ServiceTest
{
/// <summary>
///WebService µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tem ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ