ASP.Net VB Method question

  • Thread starter Thread starter Martina
  • Start date Start date
M

Martina

In ASP.Net Web Service which refers to 2 databases, how do make one field in
one table equal to another field in another table eg

In table one OtherID, holds ClientID from the second table, these are used
in the following method;

<WebMethod()> Public Function PickOnePatientFiles(ByVal name As String) As
DataSet

Dim selstring As String

Dim empid As Int32 = 0

Dim OutputList As New DataSet()

selstring = "SELECT CentralPatientID, Name, MedicareNumber, OtherID FROM
CentralPatientIndex WHERE Name = """ + name + """"

OleDbSelectCommand1.CommandText = selstring

OleDbDataAdapter1.Fill(OutputList, "PatientIndex")

empid =
CType(OutputList.Tables("CentralPatientIndex").Rows(0).Item("OtherID"),
Int32)



' Set OtherID As ClientID HOW TO DO THIS

selstring = "SELECT * FROM Imaging Request WHERE ClientID = " + CStr(empid)

OleDbSelectCommand1.CommandText = selstring

OleDbDataAdapter1.Fill(OutputList, "Maitland_XRay")

PickOnePatientFiles = OutputList

End Function
 
Martina,

Please stay in the original thread, I sand an answer on that and get the
idea you did not read it because this is almost the same question.

Cor
 
Back
Top