ASP.Net VB Method question

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
 
C

Cor Ligthert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top