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

vb.net Á¬½ÓSQLÊý¾Ý¿â

     'ÔÚÒýÓÃÀïÌí¼ÓADODB
Public vscn As ADODB.Connection
Public SQLString As String
SQLString = "Provider=SQLOLEDB.1;Password=ÃÜÂë;Persist Security Info=True;User ID=ÓÃ" & _
"»§;Initial Catalog=Êý¾Ý¿âÃû;Data Source=·þÎñÆ÷Ãû"
           
        vscn = New ADODB.Connection
        With vscn
            .Mode = ADODB.ConnectModeEnum.adModeReadWrite
            .CursorLocation = ADODB.CursorLocationEnum.adUseClient
            .ConnectionString = SQLString
            .ConnectionTimeout = 60
            .Open()
        End With


Ïà¹ØÎĵµ£º

sql2005 + VB6.0 ÔÚVB6.0ÖÐÆ´SQL ×¢Òâ"()"

½ñÌìÔÚµ÷ÊԵĹý³ÌÖз¢ÏÖ ÔÚvbÖÐÆ´SQLµÄʱºò·¢ÏÖ"()" ×÷Óúܴó
eg: table: T_TEST col : T_KB int ,S_CD int ,Z_SU int
dim gcstrT_1 ,gcstrT_3  as integer
gcstrT_1  = 1
gcstrT_3  = 3
 strWhere = strWhere &  "……"
 strWhere = strWhere &  "AND ((T_K ......

sqlÓï¾ä

±È½Ï³£ÓõÄSQLÓï¾äÓï·¨(Oracle)
Ò».Êý¾Ý¿ØÖÆÓï¾ä (DML) ²¿·Ö
1.INSERT  (ÍùÊý¾Ý±íÀï²åÈë¼Ç¼µÄÓï¾ä)
INSERT INTO ±íÃû(×Ö¶ÎÃû1, ×Ö¶ÎÃû2, ……) VALUES ( Öµ1, Öµ2, ……);
INSERT INTO ±íÃû(×Ö¶ÎÃû1, ×Ö¶ÎÃû2, ……)  SELECT ×Ö¶ÎÃû1, ×Ö¶ÎÃû2, …&he ......

vb.net²Ù×÷Êý¾Ý¿âÖ®ACCESS£¨3£©

ÕâһƪÎÒÔÙ˵˵ˮ¾§±¨±íµÄÇé¿ö¡£ACCESSÖжÔӦˮ¾§±¨±í·½Ã棬´ó¼Ò¿ÉÄÜ»áÓöµ½µÄ×î¶àµÄÎÊÌâÓ¦¸Ã¾ÍÊÇ´ò¿ª±¨±íºó
»á³öÏÖÐèÒªµÇ¼µÄÎÊÌâ¡£
Õâ¸öÊÇΪʲôÄØ£¿Ã÷Ã÷ÎÒûÓÐÉèÖÃÃÜÂ룬Ôõô»áÓÐÒªÊäÈëÃÜÂëÄØ£¿Èç¹ûÄã¹»³Á×Å£¬Èç¹ûÄãµÄdebug¾­Ñ鲻ȱ·¦µÄ»°£¬
Äã»á·¢ÏÖÔÚË®¾§±¨±íÌø³öÊäÈëÃÜÂëµÄµÇ¼¿òÖУ¬accessµÄ·¾¶²»ÊÇÎÒÏÖÔÚÊý¾Ý¿â· ......

¾­µäSQLÓï¾ä´óÈ«

Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4¡¢Ëµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ