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

asp.netÁ¬½ÓaccessÊý¾Ý¿â½øÐÐÌí¼Ó¸üÐÂɾ³ý²éѯ²Ù×÷

Á¬½ÓaccessÊý¾Ý¿â´úÂ룬дÔÚÒ»¸öµ¥¶ÀµÄÀàÀï
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace AppWebDLL
{
    public class ConnApp
    {
        public OleDbConnection getCon() {
          
            string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+System.Web.HttpContext.Current.Server.MapPath("App_Data\\UserDB.mdb")+";Jet OLEDB:Database Password=admin";
            OleDbConnection objConnection = new OleDbConnection(strConnection);
            return objConnection;
        }
    }
}
ÎÒÕâÏ°¹ßÕâÑùдµÄ£¬ÔÚÕâÀïSystem.Web.HttpContext.Current.Server.MapPathÊÇÓÃÀ´È¡µÃaccessµÄÏà¶Ô·¾¶µÄ£¬ÔÚÕâ¸öÀàÀïÏëҪʹÓÃSystem.Web.HttpContext.Current.Server.MapPath£¬ÏÈÒªÒýÓÃsystem.webÕâ¸öÀà¡£
Ôöɾ¸Ä²é´úÂ룬ÒÔÎÒµÄÀàдµÄ£¬ÕâÀïҪעÒâÒ»¸ö£¬Èç¹ûÄãµÄ×ֶκÍaccessµÄ¹Ø¼ü×ÖÒ»Ñù£¬ÄÇôÄã¾ÍÒªÔÚÄãµÄ×Ö¶ÎÉÏ¼Ó [ ]£¬ÈçpasswordÊÇaccessµÄ¹Ø¼ü×Ö£¬Èç¹ûÄãµÄ×Ö¶ÎÓÐÕâ¸ö£¬ÄãÔÚ×ö²Ù×÷µÄʱºò¾ÍÒªÕâÑùд[password]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppWebDLL;
using System.Data;
using System.Data.OleDb;
using System.Collections;
namespace AppBLL
{
public class Land
{
ConnApp capp = new ConnApp();
OleDbConnection db;
OleDbCommand olecom = null;
//²éѯËùÓÐÓû§
public ArrayList GetAllUser() {
ArrayList alluserlist = new ArrayList();
db = capp.getCon();
try
{
string sql = "select USERNAME from userinfo";
olecom = new OleDbComman


Ïà¹ØÎĵµ£º

asp.netÎÊÌ⣬Çë½Ì£¬¼±£¡£¡£¡

asp.net  »ùÓÚvb¡£net±à³ÌÓïÑÔ   sqlÊý¾Ý¿â
±í1                                         ......

ASP.NETÒ³Ãæ¼äµÄ´«ÖµµÄ¼¸ÖÖ·½·¨£¨×ªÔØ£©

ASP.NETÒ³Ãæ¼äµÄ´«ÖµµÄ¼¸ÖÖ·½·¨£¨×ªÔØ£©
 ASP.NET¡¡WEB¡¡FORMS¡¡¡¡¸ø¿ª·¢ÕßÌṩÁ˼«ºÃµÄʼþÇý¶¯¿ª·¢Ä£Ê½¡£È»¶øÕâÖÖ¼òµ¥µÄÓ¦ÓóÌÐò¿ª·¢Ä£Ê½È´¸øÎÒÃÇ´øÀ´ÁËһЩСÎÊÌ⣬¾Ù¸öÀý×Ó£¬ÔÚ´«Í³µÄASPÓ¦ÓóÌÐòÖУ¬ÄãÄܹ»Í¨¹ýPOST·½·¨ºÜÈÝÒ׵İÑÒ»¸öÖµ»ò¶à¸öÖµ´ÓÒ»¸öÒ³Ãæ´«Ë͵½ÁíÒ»¸öÒ³Ã棬ÓÃͬÑùµÄ·½·¨ÔÚASP.NETÖÐʵÏÖÓеãÂé·³ ......

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; ......

asp.net ĸ°æ³ö´íÎÊÌâ

vs2008½¨ÍøÕ¾ÊÇǧÍò±ðÔÚ±£´æ·¾¶Öк¬ÓБ#’£¬±ÈÈçÔÚ‘C#’µÄÎļþ¼ÐÀïÃæÔÙ½¨ÍøÕ¾£¬Èç¹û·¾¶Öк¬ÓБ#’£¬½«Ê¹Ä¸°æ½¨Á¢ÊÇÓдíÎ󣬶øÇÒ×ÓÒ³½¨Á¢ºóÒ²ÎÞ·¨Ê¹ÓÃÉè¼ÆÒ³Ã棬»¹»áÓÐÆäËû·¾¶ÎÊÌ⣨±ÈÈçCSSÎļþÎÞ·¨¼ÓÔØ£©¡£Õâ¸öÎÒ½ñÍí¸Õ¸Õ½â¾ö£¬À§ÈÅÎÒÁËÒ»ÏÂÎ磬¶àлÍøÉÏÖÚÈ˵ÄÖ¸µã£¬ÌØ´Ëд³ö£¬ÌáÐÑ×Ô¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ