#### error inserting a row into a datatable

  • Thread starter Thread starter Guest
  • Start date Start date
Hi Cor

I deleted the line.
da.FillSchema(dsFullBooking, SchemaType.Mapped, "dtClient"

i have declared NoOfRows with the 'as interger' and option Strinct on
I know get the correct number of rows appearing for my initial count

I am still getting the error message on the line..
ClientInsRow = dsFullBooking.Tables("dtClient").Rows(MyRowNumberAfterIns)("Forename")
= txtForename.Tex

An unhandled exception of type 'System.InvalidCastException' occurred in Caravan.ex
Additional information: Specified cast is not valid

is the syntax for this line correct? Can i add values in this way to a specific row and coloumn
I cant see what the problem could be. I have checked numerous examples!!
:o
Am i missing something here!!
 
Hi Cor,

I deleted the line..
da.FillSchema(dsFullBooking, SchemaType.Mapped, "dtClient")

i have declared NoOfRows with the 'as interger' and option Strinct on.
I know get the correct number of rows appearing for my initial count.

I am still getting the error message on the line...
ClientInsRow = dsFullBooking.Tables("dtClient").Rows(MyRowNumberAfterIns)("Forename")
= txtForename.Text

An unhandled exception of type 'System.InvalidCastException' occurred in Caravan.exe
Additional information: Specified cast is not valid.

is the syntax for this line correct? Can i add values in this way to a specific row and coloumn?
I cant see what the problem could be. I have checked numerous examples!!!
:o(
Am i missing something here!!
 
Hi Eva,

I had added this in my last message
ClientInsRow = dsFullBooking.Tables("dtClient").Rows(MyRowNumberAfterIns)("Forename")
= txtForename.Text

ClientInsRow = dsFullBooking.Tables("dtClient").Rows(MyRowNumberAfterIns)
Clientrow ("Forename") = txtForename.Text
Clientrow ("Surname") = txtSurname.Text

Cor
 
Hi Cor

U have just solved all my problems. Thx for being so patient with me.
U have been a fantastic help
:o)
 
Back
Top