locked
Modify the TableAdapter? RRS feed

  • Question

  • I am facing an issue where I am trying to inseret data into a TableAdapter, however I am getting a datatype error.

    I am trying to insert an ID of type long, but when using the insert method it shows that the field is of type int.

    Is there a way of modifying the field in the tableadapter?
    Wednesday, October 24, 2007 6:09 PM

Answers

  • Try editing the xml file that defines the dataset (right-click, open with, xml editor) and hand code int64.

     

    Charles

    Friday, October 26, 2007 12:02 AM

All replies

  • Hi,

     

    The type used by the table adapter is derived from the datatype of the column in the database.  Can you verify that the id field is of type bigint in the db.

     

    Regards,

    Charles

     

    Thursday, October 25, 2007 12:22 AM
  • Yes, actually its a an Access Database and the id field is of type long-int, but when adding the dataset it shows of type int-32! Even when changing it to int-64, it still shows "cannot change long to int"!
    Thursday, October 25, 2007 6:47 AM
  • Try editing the xml file that defines the dataset (right-click, open with, xml editor) and hand code int64.

     

    Charles

    Friday, October 26, 2007 12:02 AM
  • It looks that it does the job, thanks.
    Friday, October 26, 2007 5:54 AM