In case anyone is interested I have a bit of a status update, I am
getting records returned now!
Here is a sample:
#!/usr/bin/rexx
lib = 'libmyodbc3_r.so' --thread safe version
db = .dbconnx~new(lib)
db~connect('test', 'test', 'test')
sql = .sqlstatement~new(db)
sql~stmt = 'select * from dnis limit 50'
sql~prepare()
sql~execute()
sql~fetch()
retc = sql~sqlreturn()
do while retc == 0
cols = sql~numResultCols()
do i = 1 to cols
call charout , sql~getData(i)' : '
end
say
sql~fetch()
retc = sql~sqlreturn()
end
db~disconnect()
::requires 'orxsql.cls'
Thanks for all of the help, especially David Ashley! Still needs work,
but I am impressed so far.
I have a problem with the attributes not getting set that are defined in
a super class. Without my patch, this sample does not work for me. I get
"SQLRETURN" instead of a number. I await feedback on this issue, before
I continue.
--
Brandon Cherry
Network Engineer, Safe Data, Inc.
(910) 285-7200 ext 3017
http://www.safedatausa.com/
On 2/12/2010 10:35 AM, David Ashley wrote:
> All -
>
> I have started thinking about creating an SQL library for ooRexx. My
> plans at the moment look like this:
>
> 1. Use the ISO 92 specification with the Microsoft ODBC v3 extensions
> (also know as the CLI interface) as the portable API code in the
> library. All the major database vendors support these APIs and it is OS
> and platform independent.
> 2. I will create an oo-centric set of classes and methods to encapsulate
> the API. Two major classes will cover almost everything: database and
> statement classes. There will be a few minor classes but most of the
> interface will be in these two classes.
>
> There is one major difference between my design and the RexxSQL function
> library design. The RexxSQL design statically links to the database
> vendor's CLI library. Thus you need a different RexxSQL library for
> every vendor's library. I will use a dynamically linked solution where
> the vendor's library is loaded at run time rather than loaded at program
> initialization (or RexxSQL library initialization). Thus the user can
> specify at run time the vendor library they want to link to i.e. DB2,
> ODBC, Oracle, etc.
>
> The big advantage to this design is that it will be independent of any
> vendor's library. Thus the ooRexx library can access any vendor's
> library. Only one version of the library is needed for all database
> vendors. That also means the library can be distributed with easily.
>
> That is as far as my thinking has taken me so far. I would like to get
> opinions and other thoughts from everyone who care to comment on this as
> I believe this will become a high profile extension to ooRexx and I want
> to get it right.
>
> Thanks,
> David Ashley
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel