Click here to Skip to main content
14,602,992 members

Table Data Exporter

Rate this:
4.58 (7 votes)
Please Sign up or sign in to vote.
4.58 (7 votes)
24 Jan 2008CPOL
The Table Data Exporter creates a SQL script for data in a table.



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)
        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

        Return cn.ConnectionString
    Catch ex As Exception
        Return ""
    End Try
End Function


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 Pin
Benosn Tan29-Jan-08 16:31
MemberBenosn Tan29-Jan-08 16:31 
AnswerRe: How to disable the provider Pin
Igor Krupitsky31-Jan-08 12:03
mvaIgor Krupitsky31-Jan-08 12:03 

Why do you want to disable the provider page?

GeneralWorked great for me with SQL 2000 Pin
G James28-Jan-08 14:05
MemberG James28-Jan-08 14:05 
GeneralRe: Worked great for me with SQL 2000 Pin
Josh Blair29-Jan-08 11:29
MemberJosh Blair29-Jan-08 11:29 

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

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

Posted 24 Jan 2008


27 bookmarked