RDDSETDEFAULT Inconsistent Behavior

RDDSETDEFAULT Inconsistent Behavior

Postby floebel » Sun Oct 14, 2012 6:52 pm

I am using Fivewin for Harbour.

The code below works when there are only 2 PRGs being compiled and linked

#include "fivewin.ch"

static cStatic

FUNCTION Main()

LOCAL nEpoch // Y2K
local oHand, oBmp, oBmpTiled

PARAMETERS arg1, arg2, arg3

REQUEST DBFCDX
RDDSetDefault("dbfcdx")

test_it() // see test_sub.prg

USE AFECD SHARED NEW
BROWSE()

RETURN( NIL )
*-----------------------------------------------------------------------------------------------------------------------------

But when I put this code in a more complex system with many PRGs I get the following message:

Error occurred at: 10/14/12, 13:42:27
Error description: Error DBCMD/1015 Argument error: RDDSETDEFAULT

Stack Calls
===========
Called from: => RDDSETDEFAULT( 0 )
Called from: .\A_SINGLE.PRG => MAIN( 0 )

Does anyone know why RDDSETDEFAULT does not work with many PRGs?

Thanks
Fulton
floebel
 
Posts: 4
Joined: Mon Aug 27, 2012 1:34 am

Re: RDDSETDEFAULT Inconsistent Behavior

Postby MarcoBoschi » Sun Oct 14, 2012 7:16 pm

ANNOUNCE RDDSYS

FUNCTION MAIN()
your code.....
RETURN NIL

INIT PROCEDURE RddInit
REQUEST DBFFPT
REQUEST DBFCDX
rddSetDefault( "DBFCDX" )
User avatar
MarcoBoschi
 
Posts: 1025
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: RDDSETDEFAULT Inconsistent Behavior

Postby floebel » Sun Oct 14, 2012 7:28 pm

I tried using the separate INIT function. I now get the error in the INIT function. I noticed that I only have three linked RDDs as shown below. Should I also have a linked DBFCDX?

Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
floebel
 
Posts: 4
Joined: Mon Aug 27, 2012 1:34 am

Re: RDDSETDEFAULT Inconsistent Behavior

Postby Rick Lipkin » Mon Oct 15, 2012 12:52 pm

Fulton

When you open a .dbf table do not forget to use the VIA clause

USE AFECD SHARED NEW


Select 1
Use AFECD via "DBFCDX" SHARED


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: RDDSETDEFAULT Inconsistent Behavior

Postby Gale FORd » Mon Oct 15, 2012 4:44 pm

VIA should not be needed if you use the rddsetdefault() function.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 39 guests

cron