AIRÖ´ÐÐSQLÓï¾ä
ÎÒÃǵÄSQLÓï¾äµÄÖ´Ðж¼ÊÇÓÉÒ»¸öÀàÀ´Íê³ÉµÄ£¡Õâ¸öÀà¾ÍÊÇSQLStatement£¬Õâ¸öÀà¾ÍÊÇÎÒÃÇÓÃÀ´Ö´ÐÐSQLÓï¾äµÄÀ࣬¸ÃÀàµÄʹÓÃÒ²ÊǷdz£¼òµ¥µÄ£¬ÎÒÃÇÖ»ÐèÒª¼ÇסÁ½¸öÊôÐÔÁ½¸ö·½·¨¡£ÎÒÃÇÀ´¿´Ò»Ï£¡
textÊôÐÔ£ºËùÒªÖ´ÐеÄSQLÓï¾ä£¬¸ÃÊôÐÔÊÇÒ»¸ö×Ö·û´®¸ñʽ£¬ËùÒÔÎÒÃǵÄSQLÓï¾ä¶¼ÊÇ×Ö·û´®£¡
sqlConnectionÊôÐÔ£º¸ÃÊôÐÔÊÇÉèÖÃSQLStatement¶ÔÏóËùÒª°ó¶¨µÄSQLConnection¶ÔÏó£¬Õâ¸öÊôÐÔÎÒÃÇÒ»°ãÔÚ´´½¨SQLStatment¶ÔÏóµÄʱºò¾ÍÉ趨µÄ£¡
execute·½·¨£ºÕâ¸ö·½·¨ºÜ¼òµ¥£¬±íʾִÐÐSQLÓï¾ä¡££¨ÓеãÏñplay£©
getResult·½·¨£ºÕâ¸ö·½·¨Í¦ÖØÒªµÄ£¬ÒòΪÎÒÃÇ·ÃÎʵÄÊý¾Ý¿âºó·µ»ØµÄÊý¾Ý¶¼Í¨¹ýÕâ¸ö·½·¨´æ´¢µ½Ò»¸öSQLResult¶ÔÏóÖУ¡
ºÃÁË£¡ÎÒÃÇÀ´¿´Ò»¸öʵÀý°É£¡Õâ¸öʵÀýÖн«Ö´ÐÐÒ»¸ö²éѯÓï¾ä£¬¸ÃÓï¾ä²éѯºóµÄ½á¹û»átrace³öÀ´£¡
package
{
import flash.data.SQLConnection;
import flash.data.SQLResult;
import flash.data.SQLStatement;
import flash.display.Sprite;
import flash.errors.SQLError;
import flash.events.MouseEvent;
import flash.events.SQLErrorEvent;
import flash.events.SQLEvent;
import flash.filesystem.File;
/**
* ...
* */
public class Main extends Sprite
{
private var file:File = File.applicationDirectory.resolvePath("abc.db");
private var shuju:SQLConnection = new SQLConnection();
private var sqlcaozuo:SQLStatement = new SQLStatement();
private var a:Sprite = new Sprite();
public function Main():void
{
shuju.addEventListener(SQLEvent.OPEN, openfile);
shuju.addEventListener(SQLErrorEvent.ERROR, cuowu);
shuju.addEventListener(SQLEvent.CLOSE, ting);
shuju.open(file);
//////////
a.graphics.beginFill(0x00ff00);
a.graphics.drawRect(0, 0, 100, 100);
a.graphics.endFill();
addChild(a);
a.addEventListener(MouseEvent.CLICK, an);
}
private function ting(evt:SQLEvent):void
{
trac
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃæ£¬ºóÃæ ......
http://blog.csdn.net/java2000_net/archive/2008/04/05/2252640.aspx
http://sqlserver.chinahtml.com/2006/SQL-mssql11432786154012.shtml
http://www.cnblogs.com/garnai/archive/2007/09/19/898221.html
http://tech.ccidnet.com/art/1099/20050223/214511_1.html
http://www.wangchao.net.cn/bbsdetail_43009.html ......
ÐÂ×°»òÕßÒÔǰװ¹ýsql server£¬ºóÀ´É¾µô¡£ÏÖÔÚ֨װ£¬»á³öÏÖ“ÒÔǰµÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷£¬ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú”´íÎó¡£ÎÞ·¨½øÐÐÏÂÈ¥¡£
ÒÔÏÂΪ½â¾ö²½Ö裺
1£©Ìí¼Ó/ɾ³ý³ÌÐòÖг¹µ×ɾ³ýsql server¡£
2£©½«Ã»ÓÐɾ³ýµÄsql serverĿ¼Ҳɾ³ýµô¡£
3£©´ò¿ª×¢²á±í±à¼Æ÷£ ......
CREATE proc sqlToMultiExcelFile
@sqlstr nvarchar(4000), --²éѯÓï¾ä,Èç¹û²éѯÓï¾äÖÐʹÓÃÁËorder by ,Çë¼ÓÉÏtop 100 percent
@primaryKey varchar(100),--·ÖÒ³Ö÷¼ü×Ö¶Î
@path nvarchar(1000), --Îļþ´æ·ÅĿ¼
@fname nvarchar(250), --ÎļþÃû
@sheetname varchar(250)='sheet1' --Òª´´½¨µÄ¹¤×÷±íÃû,Ä ......