vfp/(asp/vfpdll/Sql)
ÒÔÏÂÊÇ·¢ÔÚ÷×ÓÂÛ̳µÄÌù×Ó£¬×ª·¢¹ýÀ´£¬Ï£Íû¸øÓõÃ×ŵĺüÓѲο¼¡£
ÎҵijÌÐòÒÔÇ°Ò»Ö±ÊÇÓû¨Éú¿Ç°ó¶¨IPʵÏÖµÄÔ¶³Ì£¬ÓÉÓÚ¿Í»§·þÎñÆ÷ºÍ¿Í»§¶Ë¶¼ÊÇͨ¹ý¿í´øÉÏÍø£¬Ò»°ãµÄ²Ù×÷£¨¿ª½ø»õµ¥¡¢ÏúÊÛµ¥µÈ£©ËÙ¶ÈÒ²»¹²»´í£¬µ«ÊÇÔÚÔ¶³Ì¿Í»§¶ËÐÞ¸ÄÉÌÆ·×ÊÁÏ£¨10000¶àÌõ¼Ç¼£©¡¢²éѯһ¶ÎʱÆڵĽøÏú´æÁ÷Ë®£¨Ò»ÖÜ5000ÌõÒÔÉÏ£©µÈÉæ¼°µ½È¡¼Ç¼Á¿´óµÄ²Ù×÷ʱ·Ç³£Âý¡£
Ç°¶Îʱ¼ä²Î¿¼ZXS4785°æÖ÷¼°ÆäËüºüÓѵĴúÂëºó£¬¶Ô·þÎñÆ÷»·¾³¼°³ÌÐò½øÐÐvfp/(asp/vfpdll/Sql)ģʽ¸ÄÔì¡£ÓÉÓÚ¼ÓÈëmyfll.fll½øÐÐÊý¾ÝѹËõ£¬Ô¶³Ì²Ù×÷ËٶȽÏÒÔÇ°´óΪ¸ÄÉÆ¡£³ÃÕâÁ½ÌìÓÐʱ¼ä£¬Ìؽ«ÊµÏÖ·½·¨¼°Ïà¹Ø´úÂë½éÉÜÈçÏ£¬Îª³õ½Ó´¥ÕßÌṩ²Î¿¼£¬ÀÏÊÖ×Ô¿ÉһЦ¶ø¹ý¿©£¬ºÇºÇ¡£ÔÚ´Ë£¬Ð»¹ýZXS4785Óëľ¹ÏÏÈ£¡
Ò».·þÎñÆ÷ÉèÖÃ
1.»¨Éú¿Ç£º°ó¶¨IPÖ®Óã¬Èç¹û·þÎñÓй̶¨IP³ýÍâ¡£
2.IIS£ºÎÒÓõÄÊÇ5.1£¬WinϵͳÊÇXP SP2¡£°²×°ºóIISºó£¬½¨ÒéÉèÖÃTCP¶Ë¿ÚΪ80Ö®ÍâµÄÆäËü¶Ë¿ÚÆ©Èç8080£¬ÒòΪÓÐЩµØÇøµÄµçÐÅ·â80¶Ë¿Ú(Õâ¾ÍÊDZ¾»úÄÜ·ÃÎÊÍøÒ³£¬¶øÔ¶³Ì²»ÄÜ·ÃÎʵÄÒ»´óÔÒò)¡£
3.É趨ĬÈÏÍøÕ¾µÄÖ÷Ŀ¼£¬ºóÃæÌáµ½µÄsqlexec.asp¼°twcom.dll¶¼Òª·ÅÔÚÖ÷Ŀ¼ÖУ¬ÒÔÌṩ¸ø¿Í»§¶Ëµ÷Óá£
4.½«myfll.fll¸´ÖƵ½WINDOWSϵͳÎļþ¼Ð£¬ÕâÒ»µã·Ç³£ÖØÒª£¬·ñÔòÖ´ÐÐasp½«ÌáʾÕÒ²»µ½API¿â´íÎó¡£mfll.fllÔÚÕâÀïµÄ×÷ÓÃÊǵ÷ÓÃcursortostrº¯Êý½«²éѯµÃµ½µÄÊÓͼѹËõ³É¶þ½øÖÆ×Ö·û´®£¬Õâ¸öÒ²ÊDZØÐëµÄ£¬´óÁ¿¼Ç¼²»¾Ñ¹Ëõ¶ø´«Êäµ½¿Í»§¶Ë£¬»áµÈÔÎËÀµÄ¡£
¶þ.³ÌÐò
1.SQLExec.asp£ºÒ»¸öaspÎļþ£¬ËüµÄ×÷ÓÃÊǽÓÊÕ¿Í»§¶ËµÄSQLÖ¸ÁÔÙ´«Êäµ½twcom.dllÖ´ÐУ¬µÃµ½½á¹ûºó¿ÉÓÉÆäresponse¶ÔÏó¶ÁÈ¡¡£ÒÔÏÂÊÇ´úÂ룬¿ÉÒÔÔÚVFP»·¾³ÓÃmodi Comm SQLExec.aspµÄÃüÁî»òÓüÇʱ¾±àд¡£
<%
'È¡¿Í»§¶ËIE±íµ¥ÉÏcSqlstring±äÁ¿µÄÖµ,¼´sqlÓï¾ä'
p1=Request.QueryString("cSqlstring")
'ÒÔÏÂÁ½¾äÊǽ«p1Öеģ¥¡¢£«×ª»»Îª°ë½Ç'
strsql =Replace(p1,"£¥","%")
strsql =Replace(strsql,"£«","+")
'½«sqlÓï¾ä´«Êäµ½twcomÖÐÖ´ÐÐ,²¢µÃµ½Ñ¹ËõºóµÄ¶þ½øÖÆ×Ö·û'
Set oVFP=Server.Createobject("twcom.w_select")
response.BinaryWrite(oVFP.W_exec(strsql))
Set oVFP=nothing
%>
2.twcom.Dll:ÓÃVFP9±àд(7¡¢8Ó¦¸ÃÒ²¿ÉÒÔ)£¬½¨Ò»project,Ö÷Îļþtwcom.prg£¬´úÂëºÜ¼òµ¥£¬Á¬±à³Édll¼´¿É¡£twcom.prg´úÂëÈçÏÂ
*****************************************
Define Class W_SELECT As Session OlePublic &&¶¨ÒåÀà
Function W_exec(cSql As String) As Byte &&
Ïà¹ØÎĵµ£º
³ÌÐòÆô¶¯Sql ServerÆäʵºÜ¼òµ¥
´úÂ룺
System.ServiceProcess.ServiceController myController =
new System.ServiceProcess.ServiceController("MSSQL$ACCP4444"); //·þÎñÃû³Æ ÕÒÁË°ëÌì²ÅÕÒµ½£¬±¿ËÀÎÒÍêÁË¡£ÔÚ·þÎñÉÏÓÒ¼üÊôÐÔ£¬ÄÜ¿´µ½
if (myController.CanStop)
{ }
else ......
ÔÌù£ºhttp://topic.csdn.net/u/20100412/11/a4ea520e-7dd0-44d2-98bb-9f62f0ed6160.html?21233
--------------------------------------------------------------------------
-- Author : htl258(Tony)
-- Date : 2010-04-14 06:02:36
-- Version:Microsoft SQL Server 2008 (RTM) - 1 ......
select name as ¿âÃû from master..sysdatabases where dbid>=7 »ñµÃÊý¾Ý¿âÃû³Æ
select * from sysobjects where xtype='u' or xtype='v' ²éѯÊý¾Ý¿âÀïËùÓбíµÄsqlÓï¾ä£¡
select name from sysobjects where type='u' ²éѯһ¸ö¿ ......
ʹÓùýSQL ServerµÄÈËÓ¦¸Ã¶¼Çå³þ£¬SQL Server³£ÓõÄÓÐÁ½ÖÖÈÏÖ¤·½Ê½£¬Ò»ÖÖÊDZ¾µØϵͳÕË»§ÈÏÖ¤£¨Windows Authentication £©£¬Ò»ÖÖÊÇʹÓÃÓû§ÃûºÍÃÜÂ루SQL Server Authentication £©£¬µÚ¶þÖÖÈÏÖ¤·½Ê½±ØÐëÆôÓÃSQL ServerµÄ»ìºÏģʽ¡£
¡¡¡¡1.Windows AuthenticationÁ¬½Ó²¿·Ö´úÂë¶Î£º
<?php
$serverName = "(local)";
$co ......