ADO+AccessÔÚÁ½±íÖ®¼äÁ¬½Ó²éѯ - VC/MFC / Êý¾Ý¿â
ÏÖÓУº
°à¼¶±ít_clazz(Ö÷¼üid£¬°à¼¶Ãû³Æ),
ѧÉú±ít_student£¨Ö÷¼üid£¬Ñ§ÉúÐÕÃû£¬ËùÊô°à¼¶id£©£»
±í½á¹¹ÈçÏ£º
=======================================================
t_clazz£¨id,clazz_name£©
t_student(id,student_name,t_clazz_id)
========================================================
ÏÖÒª²éѯµÄ½á¹ûÈçÏÂ
id student_name clazz_name
========================================================
mysqlµÄsqlÓï¾ä²Î¿¼£º
select s.id aaa, s.student_name bbb , c.clazz_name ccc
from t_clazz c, t_student s
where s.t_clazz_id = c.id ;
========================================================
accessÊý¾Ý¿âµÄÓï¾ä²»ÖªµÀ¸ÃÔõôд£¿
SELECT s.id s.student_name c.clazz_name
from t_student AS s INNER JOIN t_clazz AS c ON s.t_clazz_id = c.id;
SELECT B.id as aa, B.name as bb, A.clazz_name as cc
from t_clazz as A
left join t_student as B on A.id = B.t_clazz_id
SELECT B.id as aa, B.student_name as bb, A.clazz_name as cc
from t_clazz as A
left join t_student as B on A.id = B.t_clazz_id
»¹¿ÉÒÔÁ½¸ö mdbÎļþ¼äÁ¬½Ó²éѯ
ACCESS²»Ö§³Ö¿Õ¸ñµÄ±ðÃû·½Ê½£¬Òª¼ÓAS¸øËüÈ¡±ðÃû¡£
Ïà¹ØÎÊ´ð£º
ÎÒÓÃAccessÊý¾Ý¿â×öÁËÒ»¸öͼÊéÊý¾Ý¿â£¬ÀïÃæÓÐÒ»¸ö×Ö¶ÎÊÇISBN£¬¾ÍÊÇISBNºÅ£¬µ«ÊÇÖ»µÄÒ»×Ü·ÖͼÊéдµÄISBNºÅ£¬ÓеÄûд£¬Ð´µÄÄÇÒ»²¿·ÖÓеÄISBNÊÇÖظ´µÄ£¬ÄÜ·ñÓÃSQLÓïÑÔ°ÑÖظ´µÄ¹ýÂ˵ô£¬µ«Ã»Ð´ISBNºÅµÄͼÊé²»ÄܹýÂ˵ô£¬È ......
rt£¬ÎÒÊÔÁËÍøÉÏÖ±Á¬AccesÊý¾Ý¿âµÄ·½·¨,windowsÏÂûÓÐÎÊÌâ,µ«ÊÇÔÚlinuxϲ»ÐУ¬ËÄܸøµãÌáʾ£¿Ð»Ð»
ÄãÔõôÁ¬µÄ£¿
AccesÊý¾Ý¿â..
ÄãÔõôÁ·µÄÄØ£¿
Java code:
static String DBDRIVER = "sun.jd ......
ÔõÑùʵÏÖµã»÷Ò»¸ö°´Å¥£¬¾Í½«µ±Ç°´°ÌåÖ¸¶¨ÊäÈë¿òÀïµÄÊý¾Ý¸´ÖƵ½Windows¼ôÇаåÄØ£¿ÎÒÊÔ¹ýÓÃClipboard£¬µ«²»ÐУ¬ËƺõûÓÐÕâ¸öº¯Êý
ÓÐÕâ¸ö¹¦ÄÜ°¡¡£²éÒ»ÏÂmsdn¾Í¿ÉÒÔÁË°¡¡£
Private Sub mnuCopy_Click ()
Cli ......
ÒÑÖªAccessÊý¾Ý¿â a.mdb´æÔÚÒ»¸ö±í£ºcc£¬¼ÙÈçccµÄ±í½á¹¹ÈçÏ£º
×Ö¶ÎÃû³Æ Êý¾ÝÀàÐÍ ËµÃ÷
tName Îı¾ Ö¸¶¨ÈËÔ±µÄÐÕÃû
tAge Êý×Ö ......
ÓÉÓÚ×éºÏ¿òµÄÐÐÀ´Ô´Êý¾ÝºÜ¶à,ËùÒÔÎÒдÁËÒÔÏ´úÂë:
Private Sub F_NAME_Change()
Me.F_NAME_±êÇ©.SetFocus
Me.F_NAME.Requery
Me.F_NAME.SetFocus
If Nz(F_NAME) <& ......