Click here to Skip to main content
Click here to Skip to main content

Table Data Exporter

, 24 Jan 2008
Rate this:
Please Sign up or sign in to vote.
The Table Data Exporter creates a SQL script for data in a table.

ExportTable

Introduction

This application will let you script table data into a file. It will create an INSERT statement for each row in your table.

Using the code

The application is written in Visual Studio 2003, and has been tested with SQL Server only. Potentially, the application can work with other databases.

The application uses the DataLink object to connect to the database:

Protected Function EditConnectionString(ByVal sConnectionString As String)
    Try
        Dim oDataLinks As Object = CreateObject("DataLinks")
        Dim cn As Object = CreateObject("ADODB.Connection")
        cn.ConnectionString = sConnectionString
        oDataLinks.hWnd = Me.Handle

        If Not oDataLinks.PromptEdit(cn) Then
            'User pressed cancel button
            Return ""
        End If

        cn.Open()
        Return cn.ConnectionString
    Catch ex As Exception
        MsgBox(ex.Message)
        Return ""
    End Try
End Function

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Igor Krupitsky
Web Developer
United States United States
Igor is a business intelligence consultant working in Tampa, Florida. He has a BS in Finance from University of South Carolina and Masters in Information Management System from University of South Florida. He also has following professional certifications: MCSD, MCDBA, MCAD.

Comments and Discussions

 
QuestionHow to disable the provider PinmemberBenosn Tan29-Jan-08 16:31 
AnswerRe: How to disable the provider PinmemberIgor Krupitsky31-Jan-08 12:03 
Benson,
 
Why do you want to disable the provider page?
 
Igor
GeneralWorked great for me with SQL 2000 PinmemberG James28-Jan-08 14:05 
GeneralRe: Worked great for me with SQL 2000 PinmemberJosh Blair29-Jan-08 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 24 Jan 2008
Article Copyright 2008 by Igor Krupitsky
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid