PC Review


Reply
Thread Tools Rate Thread

ASP.Net VB Method question

 
 
Martina
Guest
Posts: n/a
 
      19th Oct 2004
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


 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      19th Oct 2004
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

"Martina" <(E-Mail Removed)>

> 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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
extension method question PJ6 Microsoft VB .NET 1 19th Feb 2009 06:03 PM
Question about PrintOut Method =?Utf-8?B?U3RvbmV3YWxs?= Microsoft Access Forms 3 16th Jun 2006 02:26 AM
Method Question? SouthSpawn Microsoft ASP .NET 2 13th Apr 2005 04:23 PM
web method question Frazer Microsoft Dot NET 0 14th Jul 2004 01:48 PM
Find Method question CG Rosén Microsoft Excel Programming 1 30th Nov 2003 02:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:36 PM.