JerryKreischer
Programmer
I have the following query:
Select *
From Employee
Where pkEmpNum = @EmpNo
SELECT EP.*, .ET.EmpTypeDescr
FROM EmployeePositions EP INNER JOIN
EmpTypes ET ON EP.fkEmpType = ET.pkEmpType
WHERE EP.fkEmpNum = @EmpNo
GO
I have a strongly-typed dataset defined with 2 corresponding tables in it. I'd like to know how I can fill the two tables in my dataset. I've used the 'FILL' command for 1 table from 1 query, but don't know what to do with 2 tables from 1 query...
So far, I have the following code:
The code I'm using is:
When this code executes, the dataset contains my original 2 tables + 'Table' and 'Table1'...How can I just populate the 2 existing tables with the 2 results from the 1 query???
TIA
Jerry
Select *
From Employee
Where pkEmpNum = @EmpNo
SELECT EP.*, .ET.EmpTypeDescr
FROM EmployeePositions EP INNER JOIN
EmpTypes ET ON EP.fkEmpType = ET.pkEmpType
WHERE EP.fkEmpNum = @EmpNo
GO
I have a strongly-typed dataset defined with 2 corresponding tables in it. I'd like to know how I can fill the two tables in my dataset. I've used the 'FILL' command for 1 table from 1 query, but don't know what to do with 2 tables from 1 query...
So far, I have the following code:
The code I'm using is:
Code:
Try
myCmd.CommandType = CommandType.StoredProcedure
pParam = New SqlParameter("@EmpNo", SqlDbType.Int)
pParam.Value = EmpNum
myCmd.Parameters.Add(pParam)
myConn.Open()
With daMC1
.SelectCommand = myCmd
Dim recs As Int16 = .Fill(ds)
End With
TIA
Jerry