"景先生毕设|www.jxszl.com

C# ADODB.Recordset类代码示例

2023-12-29 17:03编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中ADODB.Recordset类的典型用法代码示例。如果您正苦于以下问题:C#ADODB.Recordset类的具体用法?C#ADODB.Recordset怎么用?C#ADODB.Recordset使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:db_access publicobject[]db_access(stringstrSQL) { ADODB.ConnectionobjCon; ADODB.RecordsetobjRec; object[,]dataRows; object[]dataSuite; stringstrCon; objCon=newADODB.Connection(); objRec=newADODB.Recordset(); //establishtheconnectionstringandopenthedatabaseconnection strCon="driver={MySQLODBC5.1Driver};server=107.22.232.228;uid=qa_people;pwd=thehandcontrols;"+ "database=functional_test_data;option=3"; objCon.Open(strCon); //executetheSQLandreturntherecrodsetofresults objRec=objCon.Execute(strSQL,outmissing,0); //populateatwodinmensionalobjectarraywiththeresults dataRows=objRec.GetRows(); //getaonedimensionalarraythatcanbeplacedintotheTestSuitedropdown dataSuite=thinArray(dataRows); //closetherecordset objRec.Close(); //closethedatabaseconnection objCon.Close(); returndataSuite; }
原文链接:http://www.jxszl.com/biancheng/C/556489.html