Re: Oracle via ADO/ODBC
Posted:
Mon Jul 29, 2013 3:15 pm
by elvira
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.
Re: Oracle via ADO/ODBC
Posted:
Tue Jul 30, 2013 9:12 pm
by elvira
?.
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
Re: Oracle via ADO/ODBC
Posted:
Tue Jul 30, 2013 9:36 pm
by nageswaragunupudi
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.
Re: Oracle via ADO/ODBC
Posted:
Tue Jul 30, 2013 10:10 pm
by Enrico Maria Giordano
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
Re: Oracle via ADO/ODBC
Posted:
Tue Jul 30, 2013 10:37 pm
by nageswaragunupudi
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.