<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Forum IALweb : Problemi con DoCmd.Tranfertdatabase</title>
  <link>http://www.ialweb.it/forum/</link>
  <description>This is an XML content feed of; Forum IALweb : Microsoft Access : Problemi con DoCmd.Tranfertdatabase</description>
  <copyright>Copyright (c) 2006-2012 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 May 2013 04:23:33 +0000</pubDate>
  <lastBuildDate>Mon, 02 Jul 2012 09:17:16 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 10.11</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ialweb.it/forum/RSS_post_feed.asp?TID=16463798</WebWizForums:feedURL>
  <image>
   <title>Forum IALweb</title>
   <url>http://www.ialweb.it/forum/forum_images/web_wiz_forums.png</url>
   <link>http://www.ialweb.it/forum/</link>
  </image>
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : grazie Alex per le puntualizzazioni...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362572&amp;title=problemi-con-docmdtranfertdatabase#3362572</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=18870">Luciano</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 02/Lug/2012 at 09:17<br /><br />grazie Alex per le puntualizzazioni che arrichiscono sempre!<DIV>&nbsp;</DIV><DIV>Potrei inviare la piccola demo, ma si tratta sempre di mdb e non so se sarà esplicativa e utile.</DIV><DIV>Ciao</DIV>]]>
   </description>
   <pubDate>Mon, 02 Jul 2012 09:17:16 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362572&amp;title=problemi-con-docmdtranfertdatabase#3362572</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : A mio parere, il codice che ha...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362571&amp;title=problemi-con-docmdtranfertdatabase#3362571</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19734">@Alex</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 02/Lug/2012 at 09:08<br /><br />A mio parere, il codice che ha generato le prime anomalie segnalate non coinvolge Riferimenti a Librerie in quanto si trattava di API.<br><br>Ricordo peraltro che le LIB Indispensabili solo poche:<br>1° Visual Basic For Application<br>2° Microsoft Access xx.x Object Library<br><br>Solo poi si richiede DAO o ADO a seconda, ben sapendo che il DefaultType di Access è DAO, che tuttavia non sono indispensabili se non si aprono RS o non si accede ad Oggetti specifici delle LIB. <br><br>Tuttavia l'utente non ha esposto l'anomalia in modo che sia possibile comprenderne la problematica...<br>]]>
   </description>
   <pubDate>Mon, 02 Jul 2012 09:08:07 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362571&amp;title=problemi-con-docmdtranfertdatabase#3362571</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : Non ho Access 2007 o 2010. Io...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362569&amp;title=problemi-con-docmdtranfertdatabase#3362569</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=18870">Luciano</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 02/Lug/2012 at 08:33<br /><br />Non ho Access 2007 o 2010.<DIV>Io importo una tabella da un file mdb.</DIV><DIV>Uso queste librerie:</DIV><DIV>visual basic for Application<BR>microsoft access 10.0 object library<BR>ole automation<BR>microsoft activex data object library</DIV><DIV>------------</DIV><DIV>Come dice Bob occorre settare le librerie equivalenti</DIV><DIV>&nbsp;</DIV><DIV>ciao</DIV>]]>
   </description>
   <pubDate>Mon, 02 Jul 2012 08:33:50 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362569&amp;title=problemi-con-docmdtranfertdatabase#3362569</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase :   Ciao goodfly65,  goodfly65...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362559&amp;title=problemi-con-docmdtranfertdatabase#3362559</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19478">bob3m</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 30/Giu/2012 at 18:33<br /><br /><div>Ciao goodfly65,</div><div>&nbsp;</div><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by goodfly65" alt="Originally posted by goodfly65" style="vertical-align: text-bottom;" /> <strong>goodfly65 wrote:</strong><br /><br /><br>Ho fatto quanto detto da Luciano per il file dialog ma sbaglio sicuramente qualcosa in quanto quando vado a cliccare sul pulsante mi restituisce un errore nel debug "argomemento non valido" evidenziando la riga di comando del pulsante:<br></td></tr></table><div></div><div>Probabilmente ti mancano i riferimenti, prova a controllare questi sono spuntati:</div><p>Visual Basic for Application, Microsoft Access 11.0 Object Library, Microsoft DAO 3.6 Object Library,Microsoft ActiveX Data Objects 2.1 Library, OLE Automation.</p><div>Ciao</div><div>Massimo</div><span style="font-size:10px"><br /><br />Edited by bob3m - 30/Giu/2012 at 18:34</span>]]>
   </description>
   <pubDate>Sat, 30 Jun 2012 18:33:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362559&amp;title=problemi-con-docmdtranfertdatabase#3362559</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : Grazie ad entrambi !!!Ora sono...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362544&amp;title=problemi-con-docmdtranfertdatabase#3362544</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19676">goodfly65</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 30/Giu/2012 at 10:09<br /><br />Grazie ad entrambi !!!<br><br>Ora sono in questa situazione: ho utilizzato la soluzione postata da Alex per quanto riguarda l'importazione e cancellazione della vecchia tabella e funziona ;)<br><br>Ho fatto quanto detto da Luciano per il file dialog ma sbaglio sicuramente qualcosa in quanto quando vado a cliccare sul pulsante mi restituisce un errore nel debug "argomemento non valido" evidenziando la riga di comando del pulsante:<br>Private Sub Comando0_Click()<br>DoCmd.TransferDatabase acImport, "Microsoft Access", Nomefile, acTable, "iscritti", _<br>&nbsp;&nbsp;&nbsp; "iscritti"<br><br>.. e lì sono arenato !!!<br>Ho visto ora il suggerimento di Alex e proverò anche questo ma volevo sapere (quando hai un attimo) da Luciano se ha una mezza idea di dove mi sono incasinato.<br><br>GRAZIE ancora !!!<br><br>Ruggero<br>]]>
   </description>
   <pubDate>Sat, 30 Jun 2012 10:09:00 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362544&amp;title=problemi-con-docmdtranfertdatabase#3362544</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase :  Aggiungendo i riferimenti alle...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362536&amp;title=problemi-con-docmdtranfertdatabase#3362536</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19734">@Alex</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 29/Giu/2012 at 13:07<br /><br />Aggiungendo i riferimenti alle LIB OFFICE senza API possiamo accedere all'oggetto FILEDIALOG:<table width="99%"><tr><td><pre class="BBcode"><code>Dim dlgOpen As FileDialog<br>Set dlgOpen = Application.<b>FileDialog</b>(FileDialogType:=msoFileDialogOpen)<br>With dlgOpen    <br>&nbsp; .AllowMultiSelect = True <br>&nbsp; .Show<br>End With</code><br>ecc...</pre></td></tr></table><br><br>Vedete dettagli nell'utilizzo quì:<a href="http://support.microsoft.com/kb/288543/it" target="_blank" rel="nofollow">http://support.microsoft.com/kb/288543/it</a><br><span style="font-size:10px"><br /><br />Edited by @Alex - 29/Giu/2012 at 13:08</span>]]>
   </description>
   <pubDate>Fri, 29 Jun 2012 13:07:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362536&amp;title=problemi-con-docmdtranfertdatabase#3362536</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : Per il secondo quesito in un modulo...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362531&amp;title=problemi-con-docmdtranfertdatabase#3362531</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=18870">Luciano</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 29/Giu/2012 at 10:05<br /><br /><P>Per il secondo quesito in un modulo incolli questo codice:</P><DIV><table width="99%"><tr><td><pre class="BBcode">Option Compare Database<BR>Option Explicit</DIV><DIV>Private Declare Function GetOpenFileName Lib "comdlg32.dll" _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long<BR>Private Type OPENFILENAME<BR>&nbsp;&nbsp; lStructSize As Long<BR>&nbsp;&nbsp; hwndOwner As Long<BR>&nbsp;&nbsp; hInstance As Long<BR>&nbsp;&nbsp; lpstrFilter As String<BR>&nbsp;&nbsp; lpstrCustomFilter As String<BR>&nbsp;&nbsp; nMaxCustFilter As Long<BR>&nbsp;&nbsp; nFilterIndex As Long<BR>&nbsp;&nbsp; lpstrFile As String<BR>&nbsp;&nbsp; nMaxFile As Long<BR>&nbsp;&nbsp; lpstrFileTitle As String<BR>&nbsp;&nbsp; nMaxFileTitle As Long<BR>&nbsp;&nbsp; lpstrInitialDir As String<BR>&nbsp;&nbsp; lpstrTitle As String<BR>&nbsp;&nbsp; flags As Long<BR>&nbsp;&nbsp; nFileOffset As Integer<BR>&nbsp;&nbsp; nFileExtension As Integer<BR>&nbsp;&nbsp; lpstrDefExt As String<BR>&nbsp;&nbsp; lCustData As Long<BR>&nbsp;&nbsp; lpfnHook As Long<BR>&nbsp;&nbsp; lpTemplateName As String<BR>End Type</DIV><P>Public Function cmdlg_file()</P><P>&nbsp;&nbsp; Dim OpenFile As OPENFILENAME<BR>&nbsp;&nbsp; Dim lReturn As Long<BR>&nbsp;&nbsp; Dim sFilter As String<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; OpenFile.lStructSize = Len(OpenFile)</P><P>&nbsp;&nbsp; sFilter = "Database (*.accdb)" &amp; Chr(0) &amp; "*.accdb" &amp; Chr(0)</P><P>&nbsp;&nbsp; OpenFile.hwndOwner = Application.hWndAccessApp<BR>&nbsp;&nbsp; OpenFile.lpstrFilter = sFilter<BR>&nbsp;&nbsp; OpenFile.nFilterIndex = 1<BR>&nbsp;&nbsp; OpenFile.lpstrFile = String(257, 0)<BR>&nbsp;&nbsp; OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1<BR>&nbsp;&nbsp; OpenFile.lpstrFileTitle = OpenFile.lpstrFile<BR>&nbsp;&nbsp; OpenFile.nMaxFileTitle = OpenFile.nMaxFile<BR>&nbsp;&nbsp; OpenFile.lpstrInitialDir = "C:\Documenti\Immagini"<BR>&nbsp;&nbsp; OpenFile.lpstrTitle = "Selezione"<BR>&nbsp;&nbsp; OpenFile.flags = 0<BR>&nbsp;&nbsp; lReturn = GetOpenFileName(OpenFile)<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; If lReturn = 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdlg_file = ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdlg_file = Left(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile, Chr$(0)) - 1)</P><P>&nbsp;&nbsp; End If<BR>End Function<BR></pre></td></tr></table></P><DIV></DIV>Nel codice del form incolli questo codice per richiamare la funzione.<DIV><table width="99%"><tr><td><pre class="BBcode">Option Compare Database<BR>Dim Nomefile&nbsp; As String</DIV><DIV>&nbsp;</DIV><DIV>Private Sub Carica()<BR>On Error GoTo Errore<BR>Nomefile = cmdlg_file<BR>Errore:<BR>Exit Sub<BR>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>"Nomefile" è una variabile dichiarata nel modulo di classe quindi è visibile anche al di fuori della routine "carica".</DIV><DIV>ora puoi sostituirla alla stringa&nbsp; "c:\2012_prova\iscrizioni gs\bck1503.accdb" il nome della variabile.</DIV><DIV>&nbsp;</DIV><DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV></DIV><DIV>Private Sub Comando0_Click()<BR>DoCmd.TransferDatabase acImport, "Microsoft Access",&nbsp; Nomefile, acTable, "iscritti", _<BR>&nbsp;&nbsp;&nbsp; "iscritti"<BR>&nbsp;End Sub<DIV></pre></td></tr></table></DIV><DIV>Ciao</DIV><BR><BR></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 29 Jun 2012 10:05:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362531&amp;title=problemi-con-docmdtranfertdatabase#3362531</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase :    Per verificare se una Tabella...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362523&amp;title=problemi-con-docmdtranfertdatabase#3362523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19734">@Alex</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 28/Giu/2012 at 17:37<br /><br />Per verificare se una Tabella esiste la cosa più semplice è chiamarla ed intercettare l'errore....!<br>Se hai un'errore non esiste, se non hai errore significa che ESISTE quindi procedi con il DELETE.<br>Alternativa è CANCELLARLA a prescindere ed intercettare l'errore... skippandolo(che viene generato se non esiste).<br><br>Per conoscenza puoi usare questo codice per verificarne la presenza:<br><table width="99%"><tr><td><pre class="BBcode">Function TableExists(TableName As String) As Boolean<br><br>Dim strTableNameCheck<br>On Error GoTo ErrorCode<br><br>strTableNameCheck = CurrentDb.TableDefs(TableName)<br><br>TableExists = True<br><br>ExitHere:<br>&nbsp;&nbsp;&nbsp; On Error Resume Next<br>&nbsp;&nbsp;&nbsp; Exit Function<br><br>ErrorCode:<br>&nbsp;&nbsp;&nbsp; Select Case Err.Number<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case 3265&nbsp; 'Item non trovato nella Collection TABLEDEFS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TableExists = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Resume ExitHere<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "Error " &amp; Err.Number &amp; ": " &amp; Err.Description, vbCritical, "hlfUtils.TableExists"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Resume ExitHere<br>&nbsp;&nbsp;&nbsp; End Select<br><br>End Function</pre></td></tr></table><br>Per cancellarla puoi usare il DeleteObject oppure il Metodo Delete sulla collection TableDefs.<br><br>Personalmente userei più volentieri questo<table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; DBEngine(0)(0).TableDefs.Delete NomeTabella</pre></td></tr></table><br><br>Il Suggerimento dato da Luciano, essendo un comando DDL, viene eseguito lato BE o SERVER nel caso di LINKED TABLE, quindi ha l'azione di ELIMINARE la tabella REALE e non quella LINKATA...<br>Nel caso in cui siano da eliminare le LOCAL_TABLE è perfettamente alternativo.<br><span style="font-size:10px"><br /><br />Edited by @Alex - 28/Giu/2012 at 20:39</span>]]>
   </description>
   <pubDate>Thu, 28 Jun 2012 17:37:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362523&amp;title=problemi-con-docmdtranfertdatabase#3362523</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : DoCmd.RunSQL &amp;#034;Drop table...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362518&amp;title=problemi-con-docmdtranfertdatabase#3362518</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=18870">Luciano</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 28/Giu/2012 at 15:52<br /><br /><FONT color=#990000 size=4>DoCmd.RunSQL "Drop table iscritti" </FONT><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>ciao</DIV>]]>
   </description>
   <pubDate>Thu, 28 Jun 2012 15:52:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362518&amp;title=problemi-con-docmdtranfertdatabase#3362518</guid>
  </item> 
  <item>
   <title>Problemi con DoCmd.Tranfertdatabase : Ciao a tutti,ho la necessit&#224; di...</title>
   <link>http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362512&amp;title=problemi-con-docmdtranfertdatabase#3362512</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ialweb.it/forum/member_profile.asp?PF=19676">goodfly65</a><br /><strong>Subject:</strong> 16463798<br /><strong>Posted:</strong> 28/Giu/2012 at 12:19<br /><br />Ciao a tutti,<br>ho la necessità di importare i dati di una tabella da un database ad un altro e per risolvere ho creato un pulsante al quale ho assoviato la seguente routine:<br><br>Private Sub Comando0_Click()<br>DoCmd.TransferDatabase acImport, "Microsoft Access", _<br>&nbsp;&nbsp;&nbsp; "c:\2012_prova\iscrizioni gs\bck1503.accdb", acTable, "iscritti", _<br>&nbsp;&nbsp;&nbsp; "iscritti"<br>&nbsp;End Sub<br><br>Funzia ma ... c'è un però: nel database nel quale importo i dati esiste già una tabella che si chiama iscritti e quando eseguo l'importazione la tabella importata viene rinominata "iscritti 1".<br>A me invece serve che il nome rimanga "iscritti".<br><br>C'è la possibilità di cancellare la tabella esistente al momenti dell'importazione di quella "nuova"?<br><br>E poi (ma qui andiamo un pò più sul complicato mi sa): posso al click del pulsante far apparire un "file browser" per scegliere il percorso e da quale database importare i dati evitando così di adare un percorso d'importzione predefinito?<br><br>Grazie a tutti in anticipo per l'attenzione.<br><br>Ruggero<br>]]>
   </description>
   <pubDate>Thu, 28 Jun 2012 12:19:37 +0000</pubDate>
   <guid isPermaLink="true">http://www.ialweb.it/forum/forum_posts.asp?TID=16463798&amp;PID=3362512&amp;title=problemi-con-docmdtranfertdatabase#3362512</guid>
  </item> 
 </channel>
</rss>