|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionThis application will let you script table data into a file. It will create an INSERT statement for each row in your table. Using the codeThe 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 is using 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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||