Link to home
Start Free TrialLog in
Avatar of jln1980
jln1980

asked on

Add SQL loader Reference to VB.net project

What do I need to add to my VB solution to be able to execute SQL loader within my windows application?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

That is a pretty vague question.  What database are you using?  What do you mean by "SQL Loader"?
Avatar of jln1980
jln1980

ASKER

I am using Oracle. I want to be able to automate the running of this application sqlldr.exe from a windows app.
You should be able to use the Process.Start to execute any executable, like SQLLDR.EXE.

Example:

Process.Start Method
http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx
Imports System
Imports System.Diagnostics
Imports System.ComponentModel


Namespace MyProcessSample

    Class MyProcess

        Public Shared Sub Main()
            Dim myProcess As New Process()

            Try                ' Get the path that stores user documents.

                myProcess.StartInfo.UseShellExecute = False
                ' You can start any process, HelloWorld is a do-nothing example.
                myProcess.StartInfo.FileName = "C:\\HelloWorld.exe"
                myProcess.StartInfo.CreateNoWindow = True
                myProcess.Start()
                ' This code assumes the process you are starting will terminate itself. 
                ' Given that is is started without a window so you cannot terminate it 
                ' on the desktop, it must terminate itself or you can do it programmatically
                ' from this application using the Kill method.
            Catch e As Exception
                Console.WriteLine((e.Message))
            End Try
        End Sub 'Main
    End Class
End Namespace

Open in new window

Avatar of jln1980

ASKER

Im hoping that there is a DLL that i can add to my application that will give me addtional options over just running the exe.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial