Çó½â£ºQT4.5.3 Á¬½ÓMSSQL³É¹¦£¬Ö´ÐÐÓï¾ä³ö´í
´úÂëÈçÏ£º
QSqlDatabase dbconn = QSqlDatabase::database( "sqltest ", false);
if(!dbconn.isValid()) {
dbconn = QSqlDatabase::addDatabase( "QODBC ", "sqltest ");
QString dsn = QString( "Driver={sql server};server=localhost;database=Test;uid=sa;pwd=sa ");
dbconn.setDatabaseName(dsn);
dbconn.setHostName(QString( "localhost "));
dbconn.setPort(1433);
dbconn.setDatabaseName(QString( "Test "));
dbconn.setUserName(QString( "sa "));
dbconn.setPassword(QString( "sa "));
}
bool r = dbconn.open();
if (r) {
 
Ïà¹ØÎÊ´ð£º
±ÈÈç
Ò»¸öÊÇÓû§Áбí
UserID
1
2
3
4
Ò»¸öÊÇ´ÎÊýÁбí(ÿÌì·ÃÎÊÒ»´ÎNum+1)
UserID Day Num
1 2009-09-22 10
2 2009-09-22 20
4 2009-09-22 8
......
MYSQLÖÐÔ¶³ÌIP·ÃÎÊÏÞÖÆÊÇ:GRANT ALL PRIVILEGES ON *.* TO username'@'IPµØÖ· IDENTIFIED BY 'ÃÜÂë ' WITH GRANT OPTION
ÓÐËÖªµÀÔÚMSSQLÖÐÔõôÉèÖÃIP·ÃÎÊÏÞÖÆ
ÒýÓÃ
MYSQLÖÐÔ¶³ÌIP·ÃÎÊÏÞ ......
mssql ÀïµÄsystem_user ÔÚoracleÀïÓÐʲôµÈ¼Ûº¯Êý£¿
system_userÊä³öÊǵÄʲô£¿
µ±Ç°²Ù×÷µÄÓû§£¬ÄãÓÃʲôµÇ¼SQL Query Analyzer ¾ÍÊÇʲô
²»Á˽âmsqsl£¬Õâ¸öº¯ÊýÊÇÈ¡µ±Ç°Á¬½ÓuserµÄÂð£¿
Èç¹ûÊǵĻ° ......
ÈçÌ⣬Ï뽫ÎÒÒÔÇ°×ö¹ýµÄÍøÕ¾·ÅÔÚÍøÉϸøÈË¿´£¬ÓÉÓÚÊÇms sqlµÄ£¬´ó¶àÊýÍøÂçÉ̵ÄÐéÄâÖ÷»úÊÇÒªÊշѵģ¬
Ïë´ò°üºó·ÅÔÚһЩÃâ·ÑµÄ¿Õ¼ä£¬ÈÃÈ˼Ò×Ô¼ºÏÂÔØÈ¥¿´£¬ËùÒÔÏ£Íû´ò¹ý°üºóµÄÊý¾Ý¿âµÄ±í²»Èÿͻ§¿´µ½£¬
»òÕßÊǼӹý ......
===================================
ÎÞ·¨Á¬½Óµ½ .¡£
===================================
ÔÚ½¨Á¢Óë·þÎñÆ÷µÄÁ¬½Óʱ³ö´í¡£ÔÚÁ¬½Óµ½ SQL Server 2005 ʱ£¬ÔÚĬÈϵÄÉèÖÃÏ SQL Server ²»ÔÊÐí½øÐ ......