Question: How can I create a `for` loop for this, in VB.Net? (shown below)

the code below adds values to my chart and is populated by labels that are stored on the windows form.

```
With .Points
    .AddXY(0, 0)
    .AddXY(1, LblWkEff1.Text)
    .AddXY(2, LblWkEff2.Text)
    .AddXY(3, LblWkEff3.Text)
    .AddXY(4, LblWkEff4.Text)
    .AddXY(5, LblWkEff5.Text)
    .AddXY(6, LblWkEff6.Text)
    .AddXY(7, LblWkEff7.Text)
    .AddXY(8, LblWkEff8.Text)
    .AddXY(9, LblWkEff9.Text)
    .AddXY(10, LblWkEff10.Text)
End With

```

Answer: 
Nothing is wrong with the above code. In fact, you don't even need `autoincrement=True` or `db.Sequence('seq_reg_id', start=1, increment=1),` as SQLAlchemy will automatically set the first `Integer` PK column that's not marked as a FK as `autoincrement=True`.

Here, I've put together a working setup based on yours. SQLAlechemy's ORM will take care of generating id's and populating objects with them *if you use the Declarative Base based class* that you've defined to create instances of your object.

```
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.debug = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:password@localhost/testdb'
app.config['SQLALCHEMY_ECHO'] = True
db = SQLAlchemy(app)

class Region(db.Model):
    __tablename__ = 'regions'
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100))

db.drop_all()
db.create_all()

region = Region(name='Over Yonder Thar')
app.logger.info(region.id) # currently None, before persistence

db.session.add(region)
db.session.commit()
app.logger.info(region.id) # gets assigned an id of 1 after being persisted

region2 = Region(name='Yet Another Up Yar')
db.session.add(region2)
db.session.commit()
app.logger.info(region2.id) # and 2

if __name__ == '__main__':
    app.run(port=9001)

```
I had this issue declaring **Composite Keys** on a model class.

If you are wanting an auto-incrementing id field for a composite key (ie. more than 1 `db.Column(..)` definition with `primary_key=True`, then adding `autoincrement=True` fixed the issue for me.

```py
class S3Object(db.Model):
    __tablename__ = 's3_object'

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)

    # composite keys
    bucket_name = db.Column(db.String(), primary_key=True)
    key = db.Column(db.String(), primary_key=True)

```

So the statements above about not requiring `autoincrement=True` should be :

> 
> you don't even need `autoincrement=True`, as SQLAlchemy will automatically set the first
> Integer PK column that's not marked as a FK as `autoincrement=True` *unless you are defining a composite key with more than one `primary_key=True`*
> 
> 
>