Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This code is only incrementing once, anyone know why?

Status
Not open for further replies.

deesooner

Programmer
Jan 5, 2006
3
0
0
US
Dim myFteDataSet As DataSet = New DataSet
Dim myFteDataTable As DataTable = myFteDataSet.Tables.Add("xmlInfo")
Dim myFteDataColumn As DataColumn = myFteDataTable.Columns.Add("id", Type.GetType("System.Int32"))

With myFteDataColumn
.AutoIncrement = True
.AutoIncrementSeed = 1
.AutoIncrementStep = 1
End With

Dim arrPrimaryKey(1) As DataColumn
arrPrimaryKey(0) = myFteDataColumn
myFteDataTable.PrimaryKey = arrPrimaryKey

myFteDataTable.Columns.Add("ftePosition", Type.GetType("System.String"))

myFteDataTable.Rows.Add(New Object() {1, fteTitle})

Dim myFteDataRow As DataRow = myFteDataTable.NewRow()
'myFteDataRow("id") = 1
myFteDataRow("ftePosition") = fteTitle
myFteDataTable.Rows.Add(myFteDataRow)
'objGenXml.makeSchema()

myFteDataSet.WriteXml(Server.MapPath("NewXmlCawDev.xml"))
myFteDataSet.WriteXmlSchema(Server.MapPath("NewXmlCawDev.xsd"))
myFteDataSet.ReadXml(Server.MapPath("NewXmlCawDev.xml"))
myFteDataSet.ReadXmlSchema(Server.MapPath("NewXmlCawDev.xsd"))
 
I would ask in one of the .NET forums, as this isn't what I would consider to be XML related. Good luck!

"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs."
-Joseph Weizenbaum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top