VFPÈçºÎµ÷ÓÃASP.NET Web·þÎñÖеÄDataSet
Ò»¡¢ASP.NET Web Service´úÂë
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
namespace WebService1
{
/// <summary>
/// Service1 µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public DataTable GetProducts(int CategoryID)
{
SqlConnection sqlconn = new SqlConnection("server=.;uid=sa;database=NorthWind");
sqlconn.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from Products where CategoryID=" + CategoryID, sqlconn);
DataSet ds = new DataSet();
sda.Fill(ds,"temp");
sqlconn.Close();
return ds.Tables["temp"];
}
}
}
¶þ¡¢²âÊÔWEB·þÎñ¿ÉÓúóVFPÔõô½«Æäת»»³ÉÁÙʱ±í
* µ÷ÓÃWeb·þÎñ²¿·Ö
local loSoap,lcXmlData
loSoap = Createobject("MSSOAP.soapclient30")
l
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
//postÇëÇó
string name = Request["name"].toString();
string name =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ
¶¼¿ÉÓÃstring name = Request["name"].toString();
±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µ ......
ÎÒÃÇÔÚ.NET³ÌÐòµÄ¿ª·¢¹ý³ÌÖУ¬³£³£ÐèÒªºÍÓû§½øÐÐÐÅÏ¢½»»¥£¬±ÈÈçÖ´ÐÐijÏî²Ù×÷ÊÇ·ñ³É¹¦£¬“È·¶¨”»¹ÊǓȡÏû”£¬ÒÔ¼°Ñ¡Ôñ“È·¶¨”»ò“È¡Ïû”ºóÊÇ·ñÐèÒªÌø×ªµ½Ä³¸öÒ³ÃæµÈ£¬ÏÂÃæÊDZ¾È˶Գ£ÓöԻ°¿òʹÓõÄС½á£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú£¬Í¬Ê±Ò²»¶Ó´ó¼Ò²¹³ä¡£
  ......
·ÖÒ³´úÂëÈçÏ£¨PageHelper.cs£©£º
´úÂë
1 using System;
2 using System.Collections.Generic;
3 using System.Collections.Specialized;
4 using System.Linq;
5 using System.Web;
......