nageswaragunupudi wrote:Please again try dolphin sample I sent you with your xHarbour and your libs for dolphin (dolphin lib for xharbour).
Please do not change anything except your connection parameters
Let us see what to do if you still have problem.
#include "FiveWin.Ch"
#include "tdolphin.ch"
#include "xbrowse.ch"
static cpw := "nimda"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oBrw, oFont
local oQry
FW_SetUnicode( .T. )
db()
oQry := TDolphinQry():New( "SELECT * FROM namesutf8", db() )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 500,300 PIXEL TITLE FWVERSION + " : TDolphin" ;
FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE oQry ;
COLUMNS "code", "name" ;
CELL LINES NOBORDER AUTOSORT FASTEDIT
WITH OBJECT oBrw
:nEditTypes := EDIT_GET
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
db():End()
return nil
//----------------------------------------------------------------------------//
function db()
static oCn
if oCn == nil
CONNECT oCn ;
HOST "localhost" USER "root" PASSWORD cpw DATABASE "easyfo"
endif
return oCn
//----------------------------------------------------------------------------//
nageswaragunupudi wrote:I shall send you the libs I am using to your personal mail.
nageswaragunupudi wrote:Yes, strange.
In other words Dolphin is working for Unicode but ADO and Dolphin are not compatible with each other.
What about viewing in WorkBench?
For me both ADO and Dolphin are working together without any issues.
nageswaragunupudi wrote:Yes.
We can also provide support if you are using MySql through ADO.
This is a working sample:
- Code: Select all Expand view
#include "fivewin.ch"
#include "adodef.ch"
static oCn
//----------------------------------------------------------------------------//
function Main()
local oRs, cSql, aStruct
local cTable := "namesutf8"
FW_SetUnicode( .t. )
? "Connecting to MySql Server"
oCn := FW_OpenAdoConnection( "MYSQL,localhost,fwh,root,India@1947", .t. )
if oCn == nil
? MsgStop( "Connect Fail" )
return nil
endif
if .not. FW_AdoTableExists( cTable, oCn ) .or. ;
MsgYesNo( "Recreate table " + cTable )
TRY
oCn:Execute( "DROP TABLE " + cTable )
CATCH
END
aStruct := { ;
{ "code", 'C', 2, 0 }, ;
{ "name", "VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" } }
FWAdoCreateTable( cTable, aStruct, oCn )
endif
oRs := FW_OpenRecordSet( oCn, cTable )
XBROWSER oRs FASTEDIT TITLE FWVERSION
oRs:Close()
oCn:Close()
return nil
//----------------------------------------------------------------------------//
{ "name", "VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci" } }
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 85 guests