ÔÝʱ½â¾öPHPÁ¬½ÓSQLserver2005ÂÒÂëÎÊÌâ.
Êý¾Ý¿âÊÇsqlserver2005,Êý¾Ý´æ´¢µÄ¾ßÌå±àÂë²»Ïê. µ½ÍøÉÏÕÒÁ˶ÎתÂ뺯Êý /* ¶¨Òå×Ö·ûת»»º¯Êý£¬½â¾ömssqlÖÐÎÄÂÒÂëÎÊÌâ */
function convert2utf8($string)
{
return iconv("gbk","utf-8",$string);
}
function convert2gbk($string)
{
return iconv("utf-8","gbk",$string);
} ½â¾öÖÐÎÄÂÒÂëÎÊÌâ.µ«ÊDz»ÖªµÀsqlserver ÖÐÓÐûÓÐ ÀàËÆ mysqlÖÐµÄ set names utf8 ÕâÖÖÀàËƵÄÓï¾ä..ÕýÔÚѧϰÖÐ...
Ïà¹ØÎĵµ£º
Èç¹ûÄã¾³£Óöµ½ÏÂÃæµÄÎÊÌ⣬Äã¾ÍÒª¿¼ÂÇʹÓÃSQL ServerµÄÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾äÁË£º
SQL³õѧÕß¡£
¾³£Íü¼Ç³£ÓõÄDML»òÊÇDDL SQL Óï¾ä¡£
ÔÚ¶àÈË¿ª·¢Î¬»¤µÄSQLÖУ¬Ã¿¸öÈ˶¼ÓÐ×Ô¼ºµÄSQLÏ°¹ß£¬Ã»ÓÐÒ»Ì×ͳһµÄ¹æ·¶¡£
ÔÚSQL Server Management StudioÖУ¬ÒѾ¸ø´ó¼ÒÌṩÁ˺ܶೣÓõÄÏÖ³ÉSQL¹æ·¶Ä£°å¡£
SQL Server Management ......
ÈçºÎ²é¿´SQL SERVERÊý¾Ý¿âµ±Ç°Á¬½ÓÊý
1.ͨ¹ý¹ÜÀí¹¤¾ß
¿ªÊ¼->¹ÜÀí¹¤¾ß->ÐÔÄÜ£¨»òÕßÊÇÔËÐÐÀïÃæÊäÈë mmc£©È»ºóͨ¹ýÌí¼Ó¼ÆÊýÆ÷Ìí¼Ó SQL µÄ³£ÓÃͳ¼Æ È»ºóÔÚÏÂÃæÁгöµÄÏîÄ¿ÀïÃæÑ¡ÔñÓû§Á¬½Ó¾Í¿ÉÒÔʱʱ²éѯµ½Êý¾Ý¿âµÄÁ¬½ÓÊýÁË¡£²»¹ý´Ë·½·¨µÄ»°ÐèÒªÓзÃÎÊÄÇ̨¼ÆËã»úµÄȨÏÞ£¬¾ÍÊÇҪͨ¹ýWindowsÕË»§µÇ½½øÈ¥²Å¿ÉÒÔÌí¼Ó´Ë¼ÆÊ ......
package com.wfy.system.dao;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
......
¡¡¡¡¶ÔÊý¾Ý¿â½øÐжà±í²Ù×÷£¬Èç¹û±íÓë±íÖ®¼ä´æÔÚÒÀÀµ£¬ÄÇôÏÔʽµÄʹÓÃÊÂÎñ£¬¿ÉÒÔ±£³Ö¶ÔÊý¾Ý¿â²Ù×÷µÄÔ×ÓÐÔ¡£ÓÃPython·ÃÎÊSqlServerÊý¾Ý¿â£¬ÎÒʹÓÃpymssql¿â¡£½ñÌìÔÚʹÓÃÕâ¸ö¿âµÄʱºò£¬·¢ÏÖÒ»¸öÎÊÌâ¡£
ÎÊÌâ´ó¸ÅÊÇÕâÑùµÄ£º
¡¡¡¡ÎÒÓÐÁ½ÕÅ±í£¬Ò»ÕÅÖ÷±í£¨ClassInfo£©£¬Ò»ÕÅ´Ó±í£¨Student£©£¬Student±íͨ¹ýÍâ¼üClassIDÓëClassI ......
EXEC sp_addlinkedsrvlogin @rmtsrvname = 'serverontest', @useself = 'false', @locallogin = 'sa', @rmtuser = 'sa', @rmtpassword = 'passwordofsa'
Ìí¼ÓµÇ¼·½Ê½
ÒÔÉÏÁ½¸öÓï¾äÖУ¬@serverΪ·þÎñÆ÷µÄ±ðÃû£¬@datasrcΪҪÁ´½ÓµÄÄ¿±êÊý¾Ý¿âµÄÁ¬½Ó´®£¬@rmtsrvnameΪ±ðÃû,@localloginΪ±¾µØµÇ¼µÄÓû§Ãû£¬@rmtuserºÍ@rmtpa ......