× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



We used to ship a version of ibm_db_django that worked with the ibm_db_dbi
on IBM i, but it was only supported to Django 1.8. You could try using
upstream ibm_db_django (which is what we based django-ibmi off of), but I
don't know how well it works with Db2 for i in its current state. It has
rudimentary ODBC support, but it's primarily designed to work with ibm_db,
which would require a Db2 Connect license to run from Linux.
 
 

----- Original message -----
From: "Roberto José Etcheverry Romero" <yggdrasil.raiker@xxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] Re: [IBMiOSS] Query IBMi From Django
Date: Wed, Nov 18, 2020 11:35 AM
 
I think the problem lies in whether or not Django's ORM has support for
DB2
for i. Django abstracts the DB using that ORM to simplify the
programmers'
life.

On Wed, 18 Nov 2020 at 13:29, Jack Woehr
<jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

> You mean, effectively, connect from Python, correct?
> *ODBC* for choice.
> Driver comes in the Application Package with iACS.
>
> On Wed, Nov 18, 2020 at 8:24 AM Quintin Holmberg <
> qholmberg@xxxxxxxxxxxxxxxx>
> wrote:
>
> >
> > For those of you who are, what method did you use to connect to the
IBMi
> > databases?
>
>
> Here's my (sanitized) .odbc.ini on my workstation:
>
> [IEXAMPLE]
> Description=IBM i Access ODBC Driver
> Driver=IBM i Access ODBC Driver
> System=iexample.example.com
> UserID=jwoehr
> Password=foobar2u
> Naming=0
> DefaultLibraries=QGPL
> Database=A1234567
> ConnectionType=0
> CommitMode=2
> ExtendedDynamic=1
> DefaultPkgLibrary=QGPL
> DefaultPackage=A/DEFAULT(IBM),2,0,1,0,512
> AllowDataCompression=1
> MaxFieldLength=32
> BlockFetch=1
> BlockSizeKB=128
> ExtendedColInfo=0
> LibraryView=ENU
> AllowUnsupportedChar=0
> ForceTranslation=0
> Trace=0
>
> Here's a connect example:
>
> import pyodbc
>
> cn = pyodbc.connect("DSN=IEXAMPLE")
> cursor = cn.cursor()
> cursor.tables()
> rows = cursor.fetchall()
> for row in rows:
>   print(row.table_name)
> cursor.close()
>
> cursor = cn.cursor()
> try:
>     cursor.execute("Select * from ICECREAMP") # in default library
QGPL
> (see odbc.ini above)
>     rows = cursor.fetchall()
>     for row in rows:
>         print(row)
> except:
>     print('cursor.execute("Select * from ICECREAMP") didn''t work.')
> finally:
>     cursor.close()
> --
> Jack Woehr
> Absolute Performance, Inc.
> 12303 Airport Way, Suite 100
> Broomfield, CO 80021
>
> NON-DISCLOSURE NOTICE:  This communication including any and all
> attachments is for the intended recipient(s) only and may contain
> confidential and privileged information.  If you are not the intended
> recipient of this communication, any disclosure, copying further
> distribution or use of this communication is prohibited.  If you
received
> this communication in error, please contact the sender and
delete/destroy
> all copies of this communication immediately.
> --
> This is the IBMi Open Source Roundtable (OpenSource) mailing list
> To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: [1]https://lists.midrange.com/mailman/listinfo/opensource ;
> or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at [2]https://archive.midrange.com/opensource ;.
>
> Help support midrange.com by shopping at amazon.com with our affiliate
> link: [3]https://amazon.midrange.com ;
>
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [4]https://lists.midrange.com/mailman/listinfo/opensource ;
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [5]https://archive.midrange.com/opensource ;.

Help support midrange.com by shopping at amazon.com with our affiliate
link: [6]https://amazon.midrange.com ;
 

 

References

Visible links
1. https://lists.midrange.com/mailman/listinfo/opensource
2. https://archive.midrange.com/opensource
3. https://amazon.midrange.com/
4. https://lists.midrange.com/mailman/listinfo/opensource
5. https://archive.midrange.com/opensource
6. https://amazon.midrange.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.