The following Query works flawlessly with MySql Version 5.7.20 (Community) but gives out blank entries (that is, it shows blank entries in DB and Table columns though shows no of records correctly) with Version 8.0.15 (Community), Hope someone can throw some light on the same.
Using Harbour 3.2+SqlMix
hbmk2 ShowDb Sddodbc.hbc -run
Code: Select all
/*Code */
#include "dbinfo.ch"
request SQLMIX , SDDODBC
Function Main
local cQuery := "", nConnectionInfo := 0
local cIP := '127.0.0.1',cUser := 'sa', cPw := 'sa',xRootDB := 'Vyapari', cDB := 'as1819'
setmode(25,80)
RDDSETDEFAULT( "SQLMIX" )
nConnectionInfo := rddInfo( RDDI_CONNECT, { "ODBC", "Server="+cIP+";Driver={MySQL ODBC 5.3 Unicode Driver};dsn=Vyapari;User="+cUser+";Password="+cPw+";database="+xRootDb+";" })
IF nConnectionInfo == 0
hb_alert("Unable connect to the server!"+Chr(13)+Chr(10)+Str(RDDINFO( RDDI_ERRORNO ))+Chr(13)+Chr(10)+RDDINFO( RDDI_ERROR ))
Return nConnectionInfo := 1 // 0 in nLogin means Mediator is sucessfully logged
ENDIF
cQuery := "SELECT table_schema as 'Db',table_name as 'Dbf' FROM information_schema.tables " +;
"where table_schema NOT RLIKE('SCHEMA|MYSQL|SYS|WORLD|SAKILA') order by Upper(Table_schema),Upper(table_name)"
/*cQuery := "SELECT table_schema,table_name FROM information_schema.tables "+;
"where table_schema LIKE('%"+cDB+"%')" */
DBUseArea(.t.,"SQLMIX",cQuery,"ShowDB",.t.,.t.)
browse()
dbcloseall()
return NIL
/*End of Code*/
I had posted this query in Harbour Newsgroup also but did not receive any response.
Warm regards,
Jayadev