sbugig

sbugig

  • NA
  • 39
  • 32.2k

Web method that returns string

Oct 12 2004 4:52 AM
Hi: i have the web method that looks like the following: [WebMethod] public string getUserInfo (string userId, string password) { OleDbDataReader rdr; conn.Open(); rdr = cmd.ExecuteReader(); bool ret = rdr.Read (); if(ret) { ; XMLFormat = "\n"; XMLFormat += "" + rdr.GetValue(0).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(1).ToString () + "\n"; XMLFormat += "" + rdr.GetValue(2).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(3).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(4).ToString() + "\n"; XMLFormat += ""+ rdr.GetValue(5).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(6).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(7).ToString() + "\n"; XMLFormat += "" + rdr.GetValue(8).ToString() + "\n"; return XMLFormat; } else { XMLFormat = "This user does not exist"; rdr.Close(); return XMLFormat; } } N.B.never mind the query statement i'm saving space now i have the web application that has text boxes i need to return the string from this method and display the data to corresppondin textBoxes 1. name textbox 2. age textbox 3. address1 textbox and othe textboxes can anyone help me please

Answers (1)