FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO with DBF (accentuation)
Posts: 13
Joined: Mon Aug 02, 2010 05:15 PM
ADO with DBF (accentuation)
Posted: Thu Apr 17, 2014 01:44 PM
hi guys!

I'm use select in a table DBF with ADO, and the accentuation in RecordSet is wrong. Anyone know how to fix?

Code (fw): Select all Collapse
Function U_Teste()
Local oConn
Local cSQL
Local rsClaims

oConn:= CreateObject("ADODB.Connection")
oConn:Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\temp\dados;Extended Properties=DBASE IV")

cSQL := "SELECT * FROM SP50001"

rsClaims := CreateObject("ADODB.Recordset")
rsClaims:CursorLocation := 3  // adUseClient
rsClaims:CursorType := 3 // adOpenStatic
rsClaims:ActiveConnection:= oConn
rsClaims:Open(cSQL)

rsClaims:MoveFirst()
MsgStop(rsClaims:Fields("SP5_CODIGO"):Value)    //HERE IS TO SHOW 'MIRIÃ' BUT IS SHOWING 'MIRI+'

Return
Posts: 13
Joined: Mon Aug 02, 2010 05:15 PM
Re: ADO with DBF (accentuation)
Posted: Thu Apr 17, 2014 06:59 PM

I found!

Is just change de register in windows: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\xBase, DataCodePage=OEM to DataCodePage=ANSI

Thanks

Posts: 581
Joined: Tue Oct 11, 2005 11:28 AM
Re: ADO with DBF (accentuation)
Posted: Fri Apr 18, 2014 04:32 PM

Great!!! Thanks for sharing it.

Kleyber Derick



FWH / xHb / xDevStudio / SQLLIB
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Re: ADO with DBF (accentuation)
Posted: Sun Apr 20, 2014 08:26 AM

I have the same problem with MS SQL .

It is fine with xharbour and Fivewin 9.11 but with Harbour and Fivewin 2012 not .

What is the register key for Ms SQL .

Thanks.

Posts: 13
Joined: Mon Aug 02, 2010 05:15 PM
Re: ADO with DBF (accentuation)
Posted: Fri Apr 25, 2014 12:44 PM
Jack, look in the provider string connection, something like charset=ISOXXXX.


Jack wrote:I have the same problem with MS SQL .

It is fine with xharbour and Fivewin 9.11 but with Harbour and Fivewin 2012 not .

What is the register key for Ms SQL .

Thanks.

Continue the discussion