FillSchema and AutoIncrement

C

CribGoch

Hello All

I am using VS2005 and SQL2005

I am using a SqlDataAdapter and FillSchema to retrieve the the column
definitions from the database. Code is something like this.

Dim table As New DataTable("Respondents")

da.FillSchema(table, SchemaType.Mapped)
With table
.PrimaryKey = New DataColumn() {.Columns("rRespondentID")}
With .Columns("rRespondentID")
.AutoIncrementSeed = -1
.AutoIncrementStep = -1
End With
End With

The select command text of the data adapter is a select from a SQL view.

This code works fine on my development server and also in a previous release
on SQL2000, both on the development server and the live server.

In SQL2005 on the live server, the AutoIncrement property of the identity
column is coming back False. Other properties for this and other columns are
correct, as is the AutoIncrement property for identity columns retrieved
using SELECT statements directly from tables.

Does anyone know of a SQL2005 server wide setting or database setting that
could affect the retrieval of the AutoIncrement property.


Regards
Andy Fox
 
C

CribGoch

Not to worry. SP1 fixed this. That will teach me not to check the clients
server installation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top