473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP.Net VB Method question

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").Row s(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
Nov 21 '05 #1
1 942
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" <ma*********@hotmail.com>
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").Row s(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

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ruud de Jong | last post by:
The question I have is: how safe / future proof / portable is the use of the __subclasses__ method that exists for new-style classes? Background: I thought I had found an easy-to-understand...
7
by: Edward Diener | last post by:
This simple code example gives me the message, "TypeError: 'staticmethod' object is not callable". class X(object): def Y(x): print x Y = staticmethod(Y) ad = { 1 : Y } def Z(self):...
1
by: Oriane | last post by:
Hi, I'm currently a method attribute which is used to check the "validity" of this method against a rule. I wrote the isValid method, to be used inside the otriginal method: For instance: //...
2
by: SouthSpawn | last post by:
I have the following situation. I am creating my own user control. This asp.net user control will have a method called "Read". When this method is being called from the page. It will read line...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
9
by: Steve Richter | last post by:
in a generic class, can I code the class so that I can call a static method of the generic class T? In the ConvertFrom method of the generic TypeConvert class I want to write, I have a call to...
1
by: =?Utf-8?B?dG9iaXdhbl9rZW5vYmk=?= | last post by:
In the following code, calling CallTestMethod() from an instance of the derived class (the base is abstract and we can never instantiate it), referencing 'base.TestMethod()' actually calls...
10
by: Ugo | last post by:
Hi guys, until now I make so: <div id="my_div"><!-- content --></div> MyClass.prototype.doSomething = function( ) {}; MyClass.prototype.assignFun = function( )
2
by: groups.kellyg | last post by:
If I have a web method called Log() and on the client I call BeginLog() with a null value for the AsyncCallback, will this cause a problem? I want to periodically Log messages to a Log web service...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.