vb.net Á´½ÓAccessÊý¾Ý¿â
Imports System.Data.OleDb
Inherits System.Windows.Forms.Form
Dim myconnection As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\student0.mdb") ‘------------------------- Á´½ÓÊý¾Ý¿â
Dim mycommand As OleDbCommand
Dim mydatareader As OleDbDataReader
ÔÚ±ðµÄʼþÖдò¿ª±í
myconnection.Open()
mycommand = New OleDbCommand("SELECT * from ¹ÜÀíÔ±±í where username='" & Trim(Txt_Username.Text) & "'and password='" & Trim(Txt_pwd.Text) & "'", myconnection)
mydatareader = mycommand.ExecuteReader()
Ïà¹ØÎĵµ£º
ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......
ÈçºÎÔÚ Access ÖвåÈëÒ»ÌõеļǼʱ,Ô¤ÏÈÖªµÀËûµÄ×Ô¶¯±àºÅIDÄØ?
Õâ¸öÎÊÌâÀ§ÈÅÁËÎҺܾÃ
ºóÀ´ÎÒÏëÁËÒ»¸öºÜ±¿°ì·¨
¾ÍÊÇÏȲåÈëÒ»Ìõ ËæÒâµÄÊý¾Ý µ±È»ÀïÃæÓÐÓÐÒ»¸öÄãʵÏÖÔ¤¶¨ºÃµÄ±êʶ
±ÈÈç
insert into cmd (classID,cmdType,cmd) values('temp','temp','temp')
È»ºóÕÒµ½Ëü ¶ÁÈ¡ËüµÄID
select * from cmd where classID ......
¹ÊÕÏÏÖÏó:
Windows 2008 64λϵͳ,aspÍøÒ³·ÃÎÊaccessÊý¾Ý¿â±¨ÈçÏ´íÎó.
Ïà¹Ø´úÂë
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
connstr="provider=microsoft.jet.oledb.4.0;data source="&server.mappath("db/db.mdb")
conn.open connstr
sql="select * fr ......
Èí¼þÃû³Æ: EA2A(Excel/Access to Access)
Èí¼þ°æ±¾: beta2
ÊÚȨÐÎʽ: Ãâ·ÑÈí¼þ
ÔËÐÐƽ̨: Win9x/Me/NT/2000/XP/2003
Êý¾Ý¿âÉý¼¶ºóÔÓбíÖÐ×ֶλáÔö¼Ó£¬´ËʱÎÒÃǾÍÐèÒªµ¼È루ǨÒÆ£©Êý¾Ý£¬´Ë³ÌÐòΪʵÏִ˹¦Äܶø±àд¡£
ͨ³£Èí¼þÉý¼¶ºó£¬Êý¾Ý¿âÒ²»áÓÐËù¸Ä±ä£¬´Ëʱ¾ÍÐèÒª¶Ô¿Í»§Ê¹ÓõÄÊý¾Ý¿â½øÐÐÉý¼¶¡£Éý¼¶¿Í»§Êý¾Ý¿âµÄ·½Ê½Ó ......