Geelen Stef

Geelen Stef

  • NA
  • 15
  • 20k

Convert a datarow to int

Mar 2 2011 11:39 AM
Hi,

I have a little project i am working on. This project is build by the 3 layer concept. But i have a small problem. 
First let me tell you i have stored procedure:  select movie_id from tbl_movie . Here i get all the id's from the movies. 

Also i use a webservice to call all my methods. I have the following method:
  Public Function updateMovie(ByVal Movie_id As Integer, ByVal Movie_naam As String, ByVal Movie_status As Integer, ByVal Movie_hoofdrol As String) As Boolean

In this method my movie_id is an integer.
Now when i want to use this method in my presentation layer, i first call the getMovieID function, where i get a dataset with all the id's. But then i want to convert the first datarow into an integer so that i can use it in my updatemovie funtion. 

I tried this, dsMovie = (DataSet)wsMovie.getKlantId();
 tabel = dsMovie.Tables["tbl_klanten"]; 
            eersteRij = tabel.Rows[0];       
                              Boolean bresult;               
 bresult = wsMovie.updateKlant((Int32.Parse(eersteRij.ToString()))

But it doesn't work...

Attachment: project_vb_c.rar

Answers (14)