W
Woody Splawn
The code listed below works though I don't understand why. The code
is as follows:
Dim SelectCMD As SqlCommand = New SqlCommand("sp_CapEquipByDep",
PBConnection)
SelectCMD.CommandType = CommandType.StoredProcedure
Dim myParm As SqlParameter =
SelectCMD.Parameters.Add("@BudgetRoundID", SqlDbType.SmallInt)
myParm.Value = iBudgetRoundValue
Dim DaPB As SqlDataAdapter = New SqlDataAdapter
DaPB.SelectCommand = SelectCMD
iResult = DaPB.Fill(DS, "X")
rpt.DataSource = DS
rpt.DataMember = "X"
It would be helpful if someone could clarify. The part that I don't
understand has to do with the lines that read:
iResult = DaPB.Fill(DS ("X") and
rpt.DataMember = "X"
Tell me if I am right. I am creating a data adapter and telling it to use a
stored procedure as its source which I have identified in a SQLCommand
called SelectCMD. Additionally, I am telling the applicaiton to create a
table called X in a datase called DS and to fill it with data based on the
criteria in the stored procedure. Is this right?
is as follows:
Dim SelectCMD As SqlCommand = New SqlCommand("sp_CapEquipByDep",
PBConnection)
SelectCMD.CommandType = CommandType.StoredProcedure
Dim myParm As SqlParameter =
SelectCMD.Parameters.Add("@BudgetRoundID", SqlDbType.SmallInt)
myParm.Value = iBudgetRoundValue
Dim DaPB As SqlDataAdapter = New SqlDataAdapter
DaPB.SelectCommand = SelectCMD
iResult = DaPB.Fill(DS, "X")
rpt.DataSource = DS
rpt.DataMember = "X"
It would be helpful if someone could clarify. The part that I don't
understand has to do with the lines that read:
iResult = DaPB.Fill(DS ("X") and
rpt.DataMember = "X"
Tell me if I am right. I am creating a data adapter and telling it to use a
stored procedure as its source which I have identified in a SQLCommand
called SelectCMD. Additionally, I am telling the applicaiton to create a
table called X in a datase called DS and to fill it with data based on the
criteria in the stored procedure. Is this right?