Jump to content

AUTO_INCREMENT doesn't work?


Recommended Posts

Hi,

I'm currently trying to fix my vehicle system, since it was messed up. I store the car information in the SQL Database, and I want to create a DB with this:

executeSQLCreateTable("Vehicles", "CarID INT IDENTITY,Owner TEXT ,ModelID INTEGER, PosX FLOAT, PosY FLOAT, PosZ FLOAT, PosRotX FLOAT,PosRotY FLOAT, PosRotZ FLOAT, Color1 INT, Color2 INT, Color3 INT, Color4 INT, Damage FLOAT, KMH1 INT, KMH2 INT, MaxFuel INT, CurrentFuel INT, Locked INT")

I want to give "CarID" a uniqe ID, so every vehicle can have a uniqe ID. But IDENTITY isn't working, it doesn't even set a value in the "CarID" field. I also tried "AUTO_INCREMENT", but this also doesn't work.

EDIT: Fixed it....

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...