<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Commenti a: VB.NET: creare una tabella su DataBase partendo da un dataset</title>
	<atom:link href="http://andreafortuna.wordpress.com/2008/04/01/vbnet-creare-una-tabella-su-database-partendo-da-un-dataset/feed/" rel="self" type="application/rss+xml" />
	<link>http://andreafortuna.wordpress.com/2008/04/01/vbnet-creare-una-tabella-su-database-partendo-da-un-dataset/</link>
	<description>Un Blog di Andrea Fortuna</description>
	<lastBuildDate>Sun, 20 Dec 2009 19:20:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Di: Luciano</title>
		<link>http://andreafortuna.wordpress.com/2008/04/01/vbnet-creare-una-tabella-su-database-partendo-da-un-dataset/#comment-21360</link>
		<dc:creator>Luciano</dc:creator>
		<pubDate>Fri, 20 Mar 2009 17:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://andreafortuna.wordpress.com/?p=863#comment-21360</guid>
		<description>io ho provatop ad applicare le tue indicazione per una tabella access...MA NON FUNZIONA!!!...ci sto sbattendo i denti puoi aiutarmi...Grazie!!

---CODICE DA ME SCRITTO
    Public Function writeDataTableToMdbFile(ByVal strSql As String, ByVal connMDB As OleDb.OleDbConnection, _
                                            ByVal dTable As DataTable) As Integer

        &#039; strSql = Nome Tabella destinazione DB - Utilizzata anche per assegnare il nome alla DataTable
        &#039; connMDB = OleDbConnection
        &#039; dTable = DataTable - Popolata con il risultato di elaborazioni precedente (di 2 o più DataTable)
        &#039;           La struttura dei campi record è identica alla tabella di destinazione

        &#039; DB di destinazione File ACCESS 2003
        &#039; DB Sorgenti VARI


        dTable.TableName = strSql                           &#039; Assegno il nome al DataTable

        Dim tbAdapter As New OleDb.OleDbDataAdapter(&quot;select * from &quot; &amp; strSql, connMDB) &#039; db vuoto 

        tbAdapter.AcceptChangesDuringFill = True

        Dim ds_temp As New DataSet()
        tbAdapter.FillSchema(ds_temp, SchemaType.Source)
        tbAdapter.Fill(ds_temp, strSql)

        &#039; Setto come nuove tutte le righe del DataSet   

        Dim riga_tmp As DataRow
        For Each riga_tmp In ds_temp.Tables(strSql).Rows		&#039; Nessun Record Esce subito
            Try
                riga_tmp.SetAdded()
            Catch ex As Exception

            End Try

        Next

        ds_temp.Merge(dTable)

        Debug.Print(ds_temp.Tables(strSql).Rows.Count)           &#039; Verifico se il DataSet è Popolato (CIRCA 19000 RECORD)

        Dim CommandBuilder As New OleDb.OleDbCommandBuilder(tbAdapter)

        tbAdapter.Update(ds_temp)                        &#039; Aggiorno il DB

        tbAdapter.Dispose()


    End Function

Spero che mi puoi aiutare in qualche modo...Grazie!</description>
		<content:encoded><![CDATA[<p>io ho provatop ad applicare le tue indicazione per una tabella access&#8230;MA NON FUNZIONA!!!&#8230;ci sto sbattendo i denti puoi aiutarmi&#8230;Grazie!!</p>
<p>&#8212;CODICE DA ME SCRITTO<br />
    Public Function writeDataTableToMdbFile(ByVal strSql As String, ByVal connMDB As OleDb.OleDbConnection, _<br />
                                            ByVal dTable As DataTable) As Integer</p>
<p>        &#8216; strSql = Nome Tabella destinazione DB &#8211; Utilizzata anche per assegnare il nome alla DataTable<br />
        &#8216; connMDB = OleDbConnection<br />
        &#8216; dTable = DataTable &#8211; Popolata con il risultato di elaborazioni precedente (di 2 o più DataTable)<br />
        &#8216;           La struttura dei campi record è identica alla tabella di destinazione</p>
<p>        &#8216; DB di destinazione File ACCESS 2003<br />
        &#8216; DB Sorgenti VARI</p>
<p>        dTable.TableName = strSql                           &#8216; Assegno il nome al DataTable</p>
<p>        Dim tbAdapter As New OleDb.OleDbDataAdapter(&#8220;select * from &#8221; &amp; strSql, connMDB) &#8216; db vuoto </p>
<p>        tbAdapter.AcceptChangesDuringFill = True</p>
<p>        Dim ds_temp As New DataSet()<br />
        tbAdapter.FillSchema(ds_temp, SchemaType.Source)<br />
        tbAdapter.Fill(ds_temp, strSql)</p>
<p>        &#8216; Setto come nuove tutte le righe del DataSet   </p>
<p>        Dim riga_tmp As DataRow<br />
        For Each riga_tmp In ds_temp.Tables(strSql).Rows		&#8216; Nessun Record Esce subito<br />
            Try<br />
                riga_tmp.SetAdded()<br />
            Catch ex As Exception</p>
<p>            End Try</p>
<p>        Next</p>
<p>        ds_temp.Merge(dTable)</p>
<p>        Debug.Print(ds_temp.Tables(strSql).Rows.Count)           &#8216; Verifico se il DataSet è Popolato (CIRCA 19000 RECORD)</p>
<p>        Dim CommandBuilder As New OleDb.OleDbCommandBuilder(tbAdapter)</p>
<p>        tbAdapter.Update(ds_temp)                        &#8216; Aggiorno il DB</p>
<p>        tbAdapter.Dispose()</p>
<p>    End Function</p>
<p>Spero che mi puoi aiutare in qualche modo&#8230;Grazie!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Di: SIIII BADRONE</title>
		<link>http://andreafortuna.wordpress.com/2008/04/01/vbnet-creare-una-tabella-su-database-partendo-da-un-dataset/#comment-20259</link>
		<dc:creator>SIIII BADRONE</dc:creator>
		<pubDate>Tue, 01 Apr 2008 20:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://andreafortuna.wordpress.com/?p=863#comment-20259</guid>
		<description>Miticissimo... una? Ossia Un Dataset?</description>
		<content:encoded><![CDATA[<p>Miticissimo&#8230; una? Ossia Un Dataset?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
