FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Oracle via ADO/ODBC
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: Oracle via ADO/ODBC
Posted: Mon Jul 29, 2013 03: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.

Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: Oracle via ADO/ODBC
Posted: Tue Jul 30, 2013 09:12 PM
?.

Thanks


This is Mr. Enríco´s approach:

Code (fw): Select all Collapse
            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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Oracle via ADO/ODBC
Posted: Tue Jul 30, 2013 09: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Oracle via ADO/ODBC
Posted: Tue Jul 30, 2013 10:10 PM
Elvira,

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

Code (fw): Select all Collapse
            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 (fw): Select all Collapse
CASE cType = "L"
    cQuery += aFld[ i, DBS_NAME ] + " INT, "


It works fine with Jet, MSSQL and MySQL.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Oracle via ADO/ODBC
Posted: 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

Continue the discussion