Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing a Microsoft DAO connection?
Message
From
19/10/2005 15:42:02
 
 
To
19/10/2005 11:39:01
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01060316
Message ID:
01060462
Views:
15
This message has been marked as the solution to the initial question of the thread.
Hey Bro,

Are you ready to start working on Monday? I have a huge list of things for you 2 do. Give me a call later on. This is the Code that I have used to create an acces Db on the fly
 Public Function CreateAccessDB() As String
        ' Use's Microsoft ADO Ext. 2.7 for DDL and Security to create an Access DB 
        Dim Ocat As New ADOX.Catalog
        Dim Osavefile As New System.Windows.Forms.SaveFileDialog
        Osavefile.Filter = "Access files|*.mdb"
        Osavefile.ShowDialog()
        Dim Lcconnstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                      "Data Source=" & Osavefile.FileName
        Try

            'Create NewDB Database.
            Ocat.Create(connstring)
            ' Return the Connection String to the Newly Created DB 
Return connstring

        Catch Excep As System.Runtime.InteropServices.COMException
            MsgBox(Excep.Message, "Error", )

        Finally
            ' Clean(Up)
            Ocat = Nothing
        End Try

    End Function
Previous
Reply
Map
View

Click here to load this message in the networking platform