using system; using system.web; using system.web.services; using system.web.services.protocols; using system.data.oledb; using system.collections; using system.data; [WebService (namespace = "http://tempuri.org/")] [WebServiceBinding (Conformsto = wsiprofiles.basicprofile1_1)] public class service : system.web.services.webservice { public Service () { //If you are using a design component, uncomment the following line InitializeComponent ();  } [webmethod]//displayed directly in the DataGrid public string sqlscan (string sql) { oledbconnection connection = new oledbconnection (); connection. connectionstring = "provider=microsoft.jet.oledb.4.0;data source="; connection. Connectionstring += server.mappath ("User.mdb"); system.data.oledb.oledbdataadapter liuyan = new oledbdataadapter (sql, connection); dataset dataset1 = new dataset ("test"); liuyan. Fill (DataSet1); return dataset1. GETXML ();    &NBSP} [webmethod]//This is the connection database and is displayed in label Public string sqlcheck (string sql) { oledbconnection connection = new oledbconnection (); connection. connectionstring = "Provider=microsofT.jet.oledb.4.0;data source= "; connection. Connectionstring += server.mappath ("User.mdb"); system.data.oledb.oledbdataadapter tempadapter = new oledbdataadapter (sql, connection); dataset dataset = new dataset ("temp"); tempadapter.fill (DataSet); return dataset. GETXML ();    &NBSP}}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service