FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Program Freezing using SQLRDD
Posts: 25
Joined: Mon Jan 26, 2015 09:53 AM
Program Freezing using SQLRDD
Posted: Thu Jan 29, 2015 09:59 PM

I just start using SQLRDD for evaluating, The connection is OK, I checked if my table is there (SR_ExistTable), but my program freeze with this simple command for testing

USE TABLE1 VIA "SQLRDD"

What could it be? :|

Posts: 25
Joined: Mon Jan 26, 2015 09:53 AM
Re: Program Freezing using SQLRDD
Posted: Thu Jan 29, 2015 10:58 PM

I realized that it freezes when I try to open a table create by myself inside the "data manager", but if I create with the command (DbCreate) it works perfectly!!! :shock:

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 05:12 AM

Rubem,

if you are about to start the development of a new app, better use ADO and forget about SQLRDD

With ADO you will have full source code and total control over your app code.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 10:07 AM

I´m Using SQLRDD from FWH 11.05 and I use it now, I never had problems with it even changin from 11.05 to 13.01, and it is really atractive that you'd use the same software with different database managers and with dbfs by changing a single line of code, but when you work with big tables, if you want performance, you will have to rewrite many of your source, and you couldn't use it with harbour , harbour64 or fwh64, I agree that as Antonio said Ado is a better way if it's a new application, If I had to create a new application I would prefere to do it with ado, tdolphin or any other solution open source.

In that way you would have think that is really important to have control of the source, and IT IS FREE :)

If I have to develope a new software I believe I would use tDolphin, It's supported by a member of the FWH team and It's excelent.

Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"
Posts: 25
Joined: Mon Jan 26, 2015 09:53 AM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 11:13 AM

No, It is not a new APP, I am linking a new database on my existing one. :|

So I think It's better to use SQLRDD, right?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 11:24 AM

If it works, then it may be the fastest way to migrate your app without modifying your source code :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 25
Joined: Mon Jan 26, 2015 09:53 AM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 11:35 AM

I am not that hurry, how big are the changes?

Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 01:38 PM
to use the "use table" in sqlrdd , it is necessary that the same rdd have created the table , since adiconalmente and internally tables are created with field definitions and indexes , if you try to open a table created is not directly could and dara error.

if you try to read or manipulate a table created by another app or from this is necessary from sql instruccione and indicate when making the connection:

please note the CONNECT_QUERY_ONLY, this permite work only with sql instruction.

Code (fw): Select all Collapse
nHandle := SR_AddConnection( CONNECT_ODBC + CONNECT_QUERY_ONLY, _cConn )
...
IF select("MYTABLA") > 0
 MYTABLA->(dbclosearea())
ENDIF
...
nError := oSql:Exec( "SELECT * FOR USUARIOS", .t., .t., NIL, "MYTABLA" )
...
MYTABLA->(xbrowse())

here MYTABLA is a table create with dbfcdx rdd is exclusive for you, is only for view or search not for append or replace.
for alter table (append o replace) you should use sql instruction ( INSERT OR UPDATE to table in database) and requery data again

Code (fw): Select all Collapse
IF select("MYTABLA") > 0
 MYTABLA->(dbzap())
ENDIF
...
nError := oSql:Exec( "SELECT * FOR USUARIOS", .t., .t., NIL, "MYTABLA" )
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 25
Joined: Mon Jan 26, 2015 09:53 AM
Re: Program Freezing using SQLRDD
Posted: Fri Jan 30, 2015 03:03 PM

Thank you Carlos... :)

Continue the discussion