Hi All,

I modify the mytstrddprg  (from testrdd.prg) as follow:

Plese hbmk2 mytstrdd.prg then try

1.) mytstrdd.exe     ->  no error 
2.) mytstrdd.exe 1   -> error commes out 

The above error indicate that dBRequest() or hb_dbrequest() run into error
if there is no any Alias at ZeroSpace (or the virtual work space) .... ??


/*
 * $Id$
 */

function main( P1 )

   local aRdd := rddList()
   local aStruct := { { "CHARACTER", "C", 25, 0 }, ;
                      { "NUMERIC",   "N",  8, 0 }, ;
                      { "DOUBLE",    "N",  8, 2 }, ;
                      { "DATE",      "D",  8, 0 }, ;
                      { "LOGICAL",   "L",  1, 0 } }

   REQUEST DBFCDX

   SET EXCLUSIVE OFF

   QOut( "Registered RDD's:", LTrim( Str( Len( aRdd ) ) ), "=>" )
   aEval( aRdd, { | cDriver | QQOut( "", cDriver ) } )
   QOut()
   rddSetDefault("DBFCDX")
   dbCreate( "testdbf", aStruct, "DBFCDX" )

   If P1==NIL
       dbUseArea( ,, "testdbf.dbf", "ALIAS_1" )
       If HB_DBDetach("ALIAS_1")
           ? "DBRelease ALIAS_1 OK"
           If HB_dBRequest("ALIAS_1", .T.)
               ? "DBRequest ALIAS_1 OK"
               ? "BOF() is " + IIF(Bof()," TRUE", "FALSE")
           Endif
       Endif
   Else
      If HB_dBRequest("ALIAS_1", .T.)
          ? "DBRequest ALIAS_1 OK"
          ? "BOF() is " + IIF(Bof()," TRUE", "FALSE")
      Else
          dbUseArea( ,, "testdbf.dbf", "ALIAS_1" )
          If HB_DBDetach("ALIAS_1")
              ? "DBRelease ALIAS_1 OK"
              If HB_dBRequest("ALIAS_1", .T.)
                  ? "DBRequest ALIAS_1 OK"
                  ? "BOF() is " + IIF(Bof()," TRUE", "FALSE")
              Endif
          Endif
      Endif
   Endif
   dBCloseArea()
   dBCloseAll()
Return( NIL )




Shum
-- 
View this message in context: 
http://n2.nabble.com/dBRequest-runtime-error-tp4843816p4845952.html
Sent from the harbour-devel mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to