cdx and area

cdx and area

Postby Silvio » Tue Aug 19, 2008 4:51 pm

I need to use two dbf in a program
on palm

Can I use cdx ?

Can i Use two areas ?

Why this sample not run ?
Code: Select all  Expand view
#include "FWCE.ch"


REQUEST DBFCDX, DBFFPT
External ordkeyno, ordkeycount,ordcreate



function Main()

   local oWnd

RddSetDefault( "DBFCDX" )

Select 1
if ! Db_Open( "customer", "customer" )
      RETURN NIL
   endif

Select 2
if ! Db_Open( "customer2", "customer2" )
      RETURN NIL
   endif

  DEFINE WINDOW oWnd TITLE "MyApp"
   
select 1
browse()

select 2
browse()


   ACTIVATE WINDOW oWnd
return nil


FUNCTION Db_Open(cdbf, cAlias )
   use &cDbf ALIAS  &cAlias index &cDbf
RETURN .t.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Aug 21, 2008 7:25 am

use &cDbf ALIAS &cAlias index &cDbf NEW
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41460
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Thu Aug 21, 2008 7:26 am

Silvio,

Also there is no need to use macros (&) there, simply do:

USE ( cDbf ) ALIAS ( cAlias ) INDEX ( cDbf ) NEW
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41460
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Thu Aug 21, 2008 7:52 am

Dear Antonio ,
I saw and init carles's sample
i take it as sample base
but now i must use 4 dbfs because  i can explain U : in a one browse i
have the tables of restaurant . the user select one table then the
procedure must open a browse  to insert products (comanda).
but in order the user must select from a dbf a category then the
procedure must open a listbox with products of that category  and the
the procedure must update and insert a product into browse of table of
restaurant .(comanda).
All dbfs  can be on palmar but in future i must link the procedure
with wifi and link this procedure with a pc and i must use the dbf are
in pc (they have cdx and ftp for memo)

I must use 4 dbfs , i need use cdx rdd and i have made a sample test
on forum can you see it and write why it not run?

I not want use tdatabase class (odbf) because i had problems  in past
with the error "alias don't exist"
For xharbour and fwh

Now  from 8 years i use a good method (from my friend Arteaga)

and it run ok , I not had problems with this method but i try to insert
on fwppc language and it make errors .
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Aug 21, 2008 9:44 am

Silvio,

What errors ? Please provide concrete examples and errors descriptions, thanks

No other users are complaining about DBFs management,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41460
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 9 guests