Alex's Weblog

Weblog di Ermanno Goletto (Codename Alex - A Learning EXperience)
posts - 438, comments - 4214, trackbacks - 294

My Links

News

Il blog è stato
trasferito al
 seguente link:


DevAdmin Blog

Add my blog to Live

Foto

Curriculum Vitae


Il contenuto di questo blog e di ciascun post viene fornito “così come é”, senza garanzie, e non conferisce alcun diritto. Questo blog riporta il mio personale pensiero che non riflette necessariamente il pensiero del mio datore di lavoro.

Logo Creative Commons Deed


Logo MCTS

Logo MCSA

Logo MCP

Logo Microsoft Certified Business Management Solutions Professional

Microsoft Certified Business Management Solutions Specialist


Logo UGIdotNET UGIdotNET Contributor


Logo UGISS UGISS Contributor


Logo SysAdmin.it SysAdmin.it Staff


Article Categories

Archives

Post Categories

Blogs

Database

Development

Friends

IT

Knowledge Base

Links

MBS

MCP

MVP Sites

User Groups

Virtualization

Gestire i file udl

Ecco un paio di funzioni che ho scritto per creare e aprire un file udl tramite la DataLink Dialog utilizzando il namespace System.Diagnostics evitando così il reference ad AdoDb:

Public Shared Function CreateUDLFile(ByVal udlFilePath As String) As Boolean
            Dim file As New System.IO.FileInfo(udlFilePath)

            'Creazione file
            file.Create().Close()

            'Apertura file
           
OpenUDLFile(udlFilePath)

            'In caso di annullamento il file non viene generato e lo si elimina
           
If file.Length = 0 Then
               
file.Delete()
               
Return False
           
End If

            Return True
End Function

Public Shared Sub OpenUDLFile(ByVal udlFilePath As String)
            Dim process As System.Diagnostics.Process
            process = System.Diagnostics.Process.Start(udlFilePath)

            process.WaitForExit()
           
            process.Close()
            process.Dispose()
            process =
Nothing
End Sub

Print | posted on mercoledì 14 aprile 2004 16:49 | Filed Under [ Code & Snippet Database .NET Framework ]

Feedback

Gravatar

# Check Cashing Spring-Valley

My spouse and I ended up being only hunting to get the best dissertation producing solutions along with observed your blog the good news is. We are genuinely satisfied mind you you've got depicted your ideas all of which will preserve traveling to each of our web page Check Cashing Spring-Valley Cheers forever operate.
04/08/2017 22:48 | Pervez
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET