DataTables Editor string type primary key

DataTables Editor string type primary key

ShipraShipra Posts: 7Questions: 2Answers: 1

In DataTables.Editor(db, "Table", "UID") I am using a string type column as primary key.
I get the following errror:
"Type error - Data set for UID is not of type Int32."

Please let me know how to work around it

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin
    Answer ✓

    Hi,

    What software are you using on the server-side? e.g. are you using the provided .NET libraries for Editor, or something else? Also what version are you using?

    Allan

  • ShipraShipra Posts: 7Questions: 2Answers: 1

    I am using .Net , c#, DataBaseUtil > Sqlserver > Query.cs

  • ShipraShipra Posts: 7Questions: 2Answers: 1
    Answer ✓

    Thanks for looking into the problem. I just realized that I had declared the variable as int in the c# model

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    That would do it. Does changing it to be a string fix it?

    Thanks,
    Allan

  • ShipraShipra Posts: 7Questions: 2Answers: 1

    yes it does

This discussion has been closed.