Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
Dim DS As DataSet Dim MyConnection As SQLConnection Dim MyCommand As SQLDataSetCommand '以下是数据库联结 MyConnection = New SQLConnection("server=localhost;uid=sa;pwd=;database=pubs") MyCommand = New SQLDataSetCommand("select * from Titles where type='" + Category.SelectedItem.Value + "'", myConnection)
DS = new DataSet() MyCommand.FillDataSet(DS, "Titles")
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
Dim DS As DataSet Dim MyConnection As SQLConnection Dim MyCommand As SQLDataSetCommand
MyConnection = New SQLConnection("server=localhost;uid=sa;pwd=;database=pubs") MyCommand = New SQLDataSetCommand("select * from Titles where type='" + Category.SelectedItem.Value + "'", myConnection)
DS = new DataSet() MyCommand.FillDataSet(DS, "Titles")