468,765 Members | 1,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Displaying more than one row using Nusoap/php and visual studio (windowss phone)

THE Database is working fine with the php script/nusoap. but if i try to retrieving information about a particular student, visual studio (c#) crashes. I have another code that retrieve only a single row but i want every subject remain about a student. The attach file is the error message from visual studio.
please i need urgent help.

Expand|Select|Wrap|Line Numbers
  1. Here is my nusoap/php script 
  2.  
  3. function GetRemainingSubject($Sid){
  4.        $connect = mysql_pconnect("******","****","*******")
  5.        or die ('could not connect :'. mysql_error());
  6.        IF ($connect){
  7.            IF( mysql_select_db('theabani_sg',$connect));{       
  8.   //$sql = ("select Subject_code,SemName,SemYear from enrolment_record where Sid =".$Sid." and Score < 50");
  9.   $sql = ("select Subject_code,SemName,SemYear from enrolment_record,student where student.Sid =enrolment_record.Sid And enrolment_record.Sid = ".$Sid." and Score < 50");
  10.     //  $result = mysql_fetch_array(mysql_query($sql));
  11.         $result = mysql_query($sql);
  12.  
  13.         while($rows = mysql_fetch_array($result)){
  14.        print  $rows['Subject_code']. "<BR>";
  15.        print  $rows['SemName']. "<BR>";
  16.        print  $rows['SemYear']. "<BR>";  
  17.  
  18.       // return $result['Subject_code']."  ".$result['SemName']."  ".$result ['SemYear'];
  19.   } mysql_close($connect);  
  20.    }     } }
  21.  
  22.         $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
  23.         $server->service($HTTP_RAW_POST_DATA); 
  24.  
  25. ?>
  26.  
  27. visual studio code
  28.  
  29.  private void Button_Click(object sender, RoutedEventArgs e)
  30.         { 
  31.           //  Creating new proxy object of our service;
  32.             MyServicePortTypeClient read = new MyServicePortTypeClient();
  33.             read.GetRemainingSubjectCompleted += new EventHandler<GetRemainingSubjectCompletedEventArgs>(read_GetRemainingSubjectCompleted);
  34.          //   Calling method, as a parameters we type text contained in IdTextBox
  35.          //   but we must change text type of string to integer (ID in web service have integer type)
  36.             read.GetRemainingSubjectAsync(Rbox1.Text);
  37.  
  38.         }
  39.  
  40.         void read_GetRemainingSubjectCompleted(object sender, GetRemainingSubjectCompletedEventArgs e)
  41.         {
  42.           //  MessageBox.Show(e.Result);
  43.            libox.Items.Add(e.Result.ToString());
  44.           //  libox(e.Result);
  45.  
  46.         }
  47.  
  48.     }
Attached Images
File Type: jpg Untitled.jpg (42.6 KB, 67 views)
Apr 16 '15 #1
0 1319

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Jimmy Gagnon | last post: by
6 posts views Thread by Jeff Robichaud | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.