开发者

AutoIncrement in SQLite with Subsonic 3

This is probably a s开发者_Python百科imple matter, but when I create a new object, the ID property starts off as 0 rather than null. As I understand it, SQLite takes/needs a value of null for the PK column to do the AutoIncrement.

So the short question is how to get the ID in the object to start life as null?

Thanks cooter


Ok, here's what the solution seems to be. After you create the tables with PK's, open the table, right click on the left most column where the key image is and you can choose to edit Keys/Relationships. In that property screen you can set the column to auto-increment.

I also followed advice on this page.

This is all done using the most excellent tools from sqlite.phxsoftware.com/

-Cooter

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜