JC wrote:Antonio and friends,
This is my example for testing!
Please, modify and check!
http://rapidshare.com/files/189783905/ADODB.zip.html
Application
===========
Path and name: E:\FWXHARB\ADODB.EXE (32 bits)
Size: 1,675,264 bytes
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 01/26/09, 20:26:40
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: ACTIVECONNECTION
Args:
[ 1] = L .F.
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:ACTIVECONNECTION(0)
Called from: ADODB.prg => MYSQLRECORDSET(152)
Called from: ADODB.prg => EXECCONNECTION(29)
Called from: ADODB.prg => MAIN(14)
cConnectionString := "Driver={MySQL ODBC 5.1 Driver}" + ;
";Server=127.0.0.1" + ;
";DefaultDatabase=genesis" + ;
";Database=aservit" + ;
";Port=3306" + ;
";User=genesis" + ;
";Password=genesis" + ;
";Option=3;"
Enrico Maria Giordano wrote:Sorry, I haven't MySql to test your sample.
EMG
SELECT reg_id, reg_data, reg_update FROM mytable ORDER BY reg_update DESC
SELECT reg_id, CAST( reg_data AS CHARACTER ) AS reg_data, CAST( reg_update AS CHARACTER ) AS reg_update FROM mytable ORDER BY reg_update DESC
JC wrote:Dear friends,
Maybe the error is on datatype convertion of xHarbour, for fields like TIMESTAMP!
If you make a cast convertion, works!
reg_id = numeric, auto_increment, not null
reg_data = timestamp, notnull, default '0000-00-00 00:00:00'
reg_update = timestamp, notnull, default '0000-00-00 00:00:00'
Error:
- Code: Select all Expand view
SELECT reg_id, reg_data, reg_update FROM mytable ORDER BY reg_update DESC
When the field is filled with any value like '2009-01-27 16:42:25', the ADO return this value like this 2009-01-27, as date
Ok:
- Code: Select all Expand view
SELECT reg_id, CAST( reg_data AS CHARACTER ) AS reg_data, CAST( reg_update AS CHARACTER ) AS reg_update FROM mytable ORDER BY reg_update DESC
In this case, any value of field return a value like this '2009-01-27 16:42:25' as string (because typecast)
And xBrowse do not show the complete value of field... only the data part!
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 93 guests