> From: Carolina Lizama [mailto:[EMAIL PROTECTED] > I need to access Oracle from UniVerse using a Basic program. > I am thinking of 2 Options. > > 1. Through ODBC - I am not sure whether it will be possible > at all. Whether the UniVerse ODBC driver comes along with the > basic Universe package. > > 2. Write a driver in C or C++, which can be called from the > Basic program through GCI.
Those seem like complex options to me :-) If you're on a unix host, ODBC can be expensive and/or tough. The C/C++ seems like overkill, depending on what you're doing. Some other options are: 3. EXECUTE "!sqlplus oracle/passwd @script.sql" CAPTURING OUTPUT The script.sql would be generated on the fly, and turn off headings, footers etc. Parsing the resulting string can be a challenge, but for simple requests this can work. 4. A more sophisticated version of #3 - run a perl script that executes the sql command and spits the output to stdout in a format easier to parse. You could use C/C++/Java/Python or whatever you like to use to connect to oracle, instead of perl. Sample code at http://www.pickwiki.com/cgi-bin/wiki.pl?UdtOra This works for me, getting tens of thousands of rows back. You wouldn't want to get a million back - the dynamic array handling would bog down. 5. If you have to run 10,000 insert or update statements, #3 has too much overhead - stopping and restarting perl for each request takes too long. In this case I start a perl script called udora_sync.pl that sticks around and send the requests/responses thru named pipes. Primitive, but it works fine. HTH, Ian ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
