In my SOAP service I have currently search by ID(A_KONTO)
and right now I want to modify this query that I can search also by City or Address or Name(whatever)
A_KONTO NAME ADDRESS CITY
123456 Test123 West Cost New York
321456 Nunde East Cost Washington
123666 Huhned Schwaube Street Berlin
123456 Test123 West Cost New York
321456 Nunde East Cost New York
123666 Huhned Schwaube Street New York
In this case if I search by City it needs to return a list of all city in my db
as XML format.
[WebMethod]
public string GetAkontasById(string Id)
{
OracleConnection conn = new OracleConnection("DATA SOURCE=test-1:1521/test;USER ID=testuser;PASSWORD=test123");
OracleDataAdapter dr = new OracleDataAdapter("Select * from AKONTAS where A_KONTO='" + Id + "'", conn);
DataSet ds = new DataSet();
ds.Tables.Add("AKONTAS");
dr.Fill(ds, "AKONTAS");
DataTable tt = ds.Tables[0];
return ds.GetXml();
}
So if I for example enter New York it needs to return XML of all data where is New York
Something Like this
<string xmlns="http://tempuri.org/">
<NewDataSet><AKONTAS>
<A_KONTO>123456</A_KONTO>
<NAME>Test123 </NAME>
<ADDRESS>Test123</ADDRESS>
<CITY>New York</CITY>
</AKONTAS> </NewDataSet>
<NewDataSet><AKONTAS>
<A_KONTO>547896</A_KONTO>
<NAME>sadadsa </NAME>
<ADDRESS>babab </ADDRESS>
<CITY>New York</CITY>
</AKONTAS> </NewDataSet>
<NewDataSet><AKONTAS>
<A_KONTO>313365</A_KONTO>
<NAME>teea</NAME>
<ADDRESS>hahhd</ADDRESS>
<CITY>New York</CITY>
</AKONTAS> </NewDataSet>
<NewDataSet><AKONTAS>
<A_KONTO>541223</A_KONTO>
<NAME>dasasd</NAME>
<ADDRESS>hsahdkjah</ADDRESS>
<CITY>New York</CITY>
</AKONTAS> </NewDataSet>
</string>