<WebMethod()> _ Public Function AmbilBuku() As Dataset Dim conn As String conn = "server=localhost;uid=root;pwd=;database=uptbahasa" Dim sql As String = "Select * from buku Dim konek As New MySqlConnection(conn) Dim OdbcDa As New MySqlDataAdapter(sql, conn) konek.Open() Dim ds As New DataSet OdbcDa.Fill(ds) Return ds End Function
<dataset>> <xs:schema id="NewDataSet"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Table"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:int" minOccurs="0"/> <xs:element name="username" type="xs:string" minOccurs="0"/> <xs:element name="password" type="xs:string" minOccurs="0"/> <xs:element name="grup" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element></xs:choice></xs:complexType></xs:element> </xs:schema> <diffgr:diffgram> <NewDataSet> <Table diffgr:id="Table1" msdata:rowOrder="0"> <id>1</id> <username>admin</username> <password>21232f297a57a5a743894a0e4a801fc3</password> <grup>administrator</grup></Table> <Table diffgr:id="Table2" msdata:rowOrder="1"> <id>11</id> <username>Yoyo</username> <password>48dc8d29308eb256edc76f25def07251</password> <grup>operator</grup> </Table> </NewDataSet> </diffgr:diffgram> </DataSet>
ds.tables(0).rows(0).item(i).tostring
return ctype(ds, dataset)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)