Oracle via ADO/ODBC

Re: Oracle via ADO/ODBC

Postby elvira » Mon Jul 29, 2013 3:15 pm

Dear Mr. Rao,

So according to your post, why don´t you always use at ADOCreateColSQL function same numeric field 0/1 for logical fields?.

Thank you.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: Oracle via ADO/ODBC

Postby elvira » Tue Jul 30, 2013 9:12 pm

?.

Thanks


This is Mr. Enríco´s approach:

Code: Select all  Expand view
           CASE cType = "L"
                //cQuery += aFld[ i, DBS_NAME ] + " INT, "   //int
                IF cMot == "JET" .or. cMot == "MSACCESS"
                    cQuery += aFld[ i, DBS_NAME ] + " YESNO, "   //int
                ELSEIF cMot == "MSSQL"
                    cQuery += aFld[ i, DBS_NAME ] + " INT, "   //int
                ELSEIF cMot == "MYSQL"  .or.  cMot == "SQLITE"
                    cQuery += aFld[ i, DBS_NAME ] + " BIT, "   //int
                ENDIF
 
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: Oracle via ADO/ODBC

Postby nageswaragunupudi » Tue Jul 30, 2013 9:36 pm

Field type BIT works with MSSQL, MSACCESS ( same as YESNO) also, just like MYSQL and SQLITE3

Please see the more elaborate functions in FWH 13.07.

Let me address your earlier post.

We are now supporting MSACCESS, MSSQL, MYSQL, SQLITE3 and ORACLE. Except Oracle, all others support BIT field type which is read as adBoolean by the ADO.

For Oracle, FWH funtions create NUMBER(1) field for logical values with CHECK CONSTAINT restricting the values to 1,0. Only in the case of Oracle field values can not be used as logical fields in our code. However, in the next release xbrowse and tdatarow will recoginize these fields as logical and appropriately deal with them transparently. Hopefully if we have a wrapper class for recordset then that class also can handle this issue transparently.

In any case, discussions about Oracle are mostly theoritical. We may get into serious programming in Oracle only for custom jobs from large Corporates and then the entire environment will be much different. We no more think in terms of XBase kind of tables and importing from DBFs.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Oracle via ADO/ODBC

Postby Enrico Maria Giordano » Tue Jul 30, 2013 10:10 pm

Elvira,

elvira wrote:This is Mr. Enríco´s approach:

Code: Select all  Expand view
           CASE cType = "L"
                //cQuery += aFld[ i, DBS_NAME ] + " INT, "   //int
                IF cMot == "JET" .or. cMot == "MSACCESS"
                    cQuery += aFld[ i, DBS_NAME ] + " YESNO, "   //int
                ELSEIF cMot == "MSSQL"
                    cQuery += aFld[ i, DBS_NAME ] + " INT, "   //int
                ELSEIF cMot == "MYSQL"  .or.  cMot == "SQLITE"
                    cQuery += aFld[ i, DBS_NAME ] + " BIT, "   //int
                ENDIF
 


No, my approach is just

Code: Select all  Expand view
CASE cType = "L"
    cQuery += aFld[ i, DBS_NAME ] + " INT, "


It works fine with Jet, MSSQL and MySQL.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Oracle via ADO/ODBC

Postby nageswaragunupudi » Tue Jul 30, 2013 10:37 pm

No, my approach is just

Code:
CASE cType = "L"
cQuery += aFld[ i, DBS_NAME ] + " INT, "


It works fine with Jet, MSSQL and MySQL.

Yes, this is what I remember and mentioned in my earlier post.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 89 guests