PDA

View Full Version : Run Oracle


Shuang
03-03-2004, 03:42 PM
Can "Run SQL" be used to run against an Oracle database? If not, what would be the best way within a VBP?

Thanks.

kinook
03-04-2004, 08:51 AM
The Run SQL action is specific to SQL Server (wrapping its osql.exe command-line tool). If Oracle provides a similar command-line client, you could use the Run Program action to call it. Otherwise, you could use ADO via script (see the ADO.bld sample).

ambalboa
10-12-2007, 12:23 PM
Where do I find the ADO.bld file sample? I did a search through the whole VisBuildPro6 directory for it and I got no matches.

kinook
10-12-2007, 12:28 PM
The ADO samples are now in Server.bld.
http://www.visualbuild.com/Manual/ado.htm
http://www.visualbuild.com/Manual/serversample.htm

Also, there now is a Run Oracle Script action for Oracle.
http://www.visualbuild.com/Manual/oracle.htm

ambalboa
10-17-2007, 03:40 PM
I do recall viewing an 'ADO' action step dealing with Oracle, but I don't see it anywhere in the Server.bld sample you are referring to. I do remember seeing something about running Oracle in a 'Run Program' action step. I'm thinking it was probably a .bld file that was attached to a post somewhere in the forum which I downloaded. I can't remember exactly where it is though, assuming I'm correct. I have VBP 6.2 installed. I don't have the 'Oracle' action step available but it's using SQLPlus to generate a command line. I now use the following in the 'Run Program' action step:

sqlplus -S username/password@oracleserver @C:\filepath\filename.sql

The output seems to be less, making it easier to read. Another thing, when choosing to read the output from a file, it doesn't work. I use C:\filepath\filename.txt to try and log the output in that file. I have the file created beforehand. Sometimes it doesn't run, saying it can't open the file; other times it runs but nothing is logged in the file. What am I doing wrong?

kinook
10-17-2007, 09:25 PM
Update to v6.6, try again, and send the info requested here if still a problem:
http://www.kinook.com/Forum/showthread.php?threadid=3044