Last post Mar 16, 2011 06:31 AM by bryanvanritter
Feb 21, 2011 04:36 PM|bryanvanritter|LINK
i am trying to use the host command within sqlplus for oracle and catch the output in a textbox. does anyone has an idea on how to accomplish this.
i am making a connection to oracle throug a webpage: like example beneath. i know this does not work because it is not a ligit statement. but i hope there is another way to do this.
Dim database As String
Dim strsql As String
database = Label2.Text
Dim test As String = "provider=oraoledb.oracle;Data Source=" & database & ";" & "User Id=xxxx" & ";" & "Password=xxx " & ";"
strsql = " host command df -h | grep " + Label1.Text + ""
Dim conn As New OleDbConnection(test)
Dim objCommand As New OleDb.OleDbCommand(strsql, conn)
Dim objDataReader As OleDb.OleDbDataReader = objCommand.ExecuteReader
TxtBoxInfo.Text = objDataReader("......")
thanks in advance.
Feb 21, 2011 06:40 PM|Lannie|LINK
You can SPOOL Oracle SQL output to text file, but it is better to populate an ASP.NET grid with your output.
Oracle has certain utilities that you can call from the command line that have host like activities for managing certain things, like TCP, IO, Encryption, etc.
See Oracle Utilities Guide
Oracle also has a C++ Call Interface
Mar 16, 2011 06:31 AM|bryanvanritter|LINK
oke , thanx, finally decided to download a free ssh library and worked like a charm