Willy,
It works fine for basic database management.
Its good for using ADO if you don't know anything about ADO or if you want that ADO is managed automatically ![]()
Willy,
It works fine for basic database management.
Its good for using ADO if you don't know anything about ADO or if you want that ADO is managed automatically ![]()
digicad wrote:#include "adordd.ch"
REQUEST ADORDD
function Main()
LOCAL db
/*
// Example for creation of Oracle connection string
cDataSource := ""
cUserID := "digi"
cPassword := "digi"
OPEN CONNECTION "Provider=MSDAORA.1;Persist Security Info=False"+IIF( cDataSource == "", "", ";Data source=" + cDataSource ) + ";User ID=" + cUserID + ";Password=" + cPassword TO db
USE NewQuery VIA "ADORDD" QUERY "SELECT Objekat# AS Sifra, Naziv, NVL(X,0) AS XCOOR, NVL(Y,0) AS YCOOR FROM Objekat ORDER BY Sifra" NEW
*/
// Example for creation of MySQL connection string
cServer := "www.freesql.org"
cUserID := "myuser"
cPassword := "mypass"
cDatabase := "test00"
OPEN CONNECTION "DRIVER={MySQL ODBC 3.51 Driver};database="+cDatabase+";server=" + cServer + ";uid=" + cUserID + ";pwd=" + cPassword TO db
USE Accounts VIA "ADORDD" TABLE "ACCOUNTS" NEW
/*
// Example for creation of Access connection string
cDatabase := "Test.MDB"
OPEN CONNECTION "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + cDataBase TO db
USE SampleAccess VIA "ADORDD" TABLE "Tabla1" NEW
*/
Browse()
CLOSE ALL
return nil
I´m tring use more show me GPF when execute mysql.EXE
Hi antonio
i copied from a mail posted by Roberto lopez on harbour developer mailing list
testing adordd with harbour beta3 and found a problem with rddado sample.
Harbour 2.0 Beta 3 http://www.syenar.hu/harbour/
will the problem due by new ole?
The sample (contrib\rddado\access1.prg) works, but exiting browse with [ESC] it gives the following error:
Error BASE/3012 Argument error: FIND
Called from WIN_OLEAUTO:FIND(0) OPEN
Called from ADO_LOCATE(0) N(0)
Called from __DBLOCATE(0)
Called from MAIN(34) 0)
Called from MAIN(11)
I've compiled with: 'hbmk2 access2.prg'
If you modify the sample to display recno() value you'll find that it always return 0 (It worked fine in Harbour 1.01)
This problem causes that HMG RDDADO Browse samples to crash, since HMG browse control relies on values returned by recno() function (of course, this is a problem for non-HMG users too).
Will be usefull a function that return ado version using oConnection.Version
The only source of rddado.lib is rddado.prg & adordd.ch a rdd wil be
done in prg thanks to usrrd
   if( lOleError != S_OK )
     hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );  ErrorBlock( { | o | MsgInfo( WIN_OLEERRORTEXT(), ProcLine( 2 ) ) } )I receive error DISP_E_EXCEPTION after press esc to exit from browse
and after my recno() display 0
Please Antonio
Can you help me?
REQUEST ADORDD
function Main()
ErrorBlock( { | o | alert( WIN_OLEERRORTEXT(), ProcLine( 2 ) ) } )
DbCreate( "test2.mdb;table1", { { "FIRST", "C", 10, 0 },;
{ "LAST", "C", 10, 0 },;
{ "AGE", "N", 8, 0 } }, "ADORDD" )
USE test2.mdb VIA "ADORDD" TABLE "table1"
APPEND BLANK
test2->First := "Homer"
test2->Last := "Simpson"
test2->Age := 45
APPEND BLANK
test2->First := "Lara"
test2->Last := "Croft"
test2->Age := 32
GO TOP
Browse()
GO TOP
locate for TEST2->First = "Lara"
? FOUND()
? "Recno"
?? recno() // here display 0
USE
return nil
Massimo,
Have you tested it in Windows 7 ?
I try win7 in next hours (it is at home)
is sufficent run executable?
or want recompile entire harbour, or application
Follow result on win 7 (32 bit) seem similarof WINDOWS VISTA
Harbour with rddado Recompiled from CVS
access1.prg
Error base 3012 argument error Open
access2.prg
Work dbedit
after dbedit receive Error base 3012 argument error find
accesstst.prg modified version under Antonio's indication
DISP_E_EXCEPTION
if you send me via mail your executable renamed and zipped i can try with it Windows 7 32/64
Massimo,
We get the same errors here ![]()
It seems as Harbour new OLE is broken somehow or that ADO for MDB is different now.
Antonio Linares wrote:Massimo,
We get the same errors here
It seems as Harbour new OLE is broken somehow or that ADO for MDB is different now.
Massimo,
You have to do it this way:
ORS:FIND( "First = 'Lara'", 0 )
as the recordset already selected the Table1 table
Antonio Linares wrote:Massimo,
You have to do it this way:
ORS:FIND( "First = 'Lara'", 0 )
as the recordset already selected the Table1 table
Massimo,
Alias are automatically managed by the Harbour RDD engine.
ADO does not need to manage alias at all ![]()
Antonio Linares wrote:Massimo,
Alias are automatically managed by the Harbour RDD engine.
ADO does not need to manage alias at all