Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. WinForms / WPF .NET
Problema scrittura XML
giovedì 13 novembre 2008 - 15.37
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
HavanaMan
Profilo
| Junior Member
88
messaggi | Data Invio:
gio 13 nov 2008 - 15:37
Ciao, torno a rompervi un po'...
ho un problema per la gestione di un file XML.
io faccio così:
Dim ds As New DataSet
ds.DataSetName = "server"
For i = 0 To dgvServerSalvati.Rows.Count - 1
ds.Tables.Add("storedconnection")
ds.Tables("storedconnection").Columns.Add("nome")
ds.Tables("storedconnection").Columns.Add("server")
ds.Tables("storedconnection").Columns.Add("db")
ds.Tables("storedconnection").Columns.Add("username")
Dim rowValss(3) As String
rowValss(0) = dgvServerSalvati.Rows(i).Cells(0).Value
rowValss(1) = dgvServerSalvati.Rows(i).Cells(1).Value
rowValss(2) = dgvServerSalvati.Rows(i).Cells(2).Value
rowValss(3) = dgvServerSalvati.Rows(i).Cells(3).Value
ds.Tables("storedconnection").Rows.Add(rowValss)
Next
ds.WriteXml(Application.StartupPath + "\xml\login.xml")
ma mi dice: "Un DataTable di nome 'storedconnection' appartiene già a questo DataSet."
qualcuno che ha qualche suggerimento?
Perchè in lettura funziona perfettamente un file
grazie in anticipo
ciao
Luca
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !