我将如何从“DAILY_CALCULATIONS”表中检索数据
Dim SqlQuery As String = "SELECT WEEKLY_TIMECARD.*,DAILY_CALCULATIONS.*,EMPLOYEE_PROFILES.EMPLOYEE_NUMBER "
SqlQuery = SqlQuery + " FROM WEEKLY_TIMECARD, DAILY_CALCULATIONS, employee_profiles WHERE employee_profiles.employee_number"
SqlQuery = SqlQuery + " = WEEKLY_TIMECARD.employee_number AND EMPLOYEE_PROFILES.EMPLOYEE_NUMBER = DAILY_CALCULATIONS.EMPLOYEE_NUMBER AND"
SqlQuery = SqlQuery + " WEEKLY_TIMECARD.WEEK_NUMBER = DAILY_CALCULATIONS.WEEK_NUMBER AND WEEKLY_TIMECARD.EMPLOYEE_NUMBER ="
SqlQuery = SqlQuery + "'" + txtENumber.Text + "' AND WEEKLY_TIMECARD.WEEK_NUMBER = '" + CBWeekNum.SelectedItem + "'"
Try
con.Open()
If con.State = ConnectionState.Open Then
con.ChangeDatabase("shopclocksoftware")
Command = New MySqlCommand(SqlQuery, con)
Data = Command.ExecuteReader()
While Data.Read
txtHUnits.Text = Data(2).ToString
txtOUnits.Text = Data(3).ToString
End While
我查看了 Data.NextResult 方法,但我无法正确实现它,有什么想法吗?