Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error inserting records in a table of a non-default database
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Error inserting records in a table of a non-default database
Divers
Thread ID:
00177589
Message ID:
00177589
Vues:
65
Hi,

I´m using 2 databases. One for the MM tables and views that is called CMM and another one for application specific data (SPI - Default Database). Everything was working fine, but now, when I have to deal with the Users form (I need to have my own Users´ form) an error is occurring when I try to add a record.
After some tracing and tests, I understood that DBGETPROP only works with the default database (the current one).

"Returns a property for the current database or for fields, named connections, tables, or views in the current database."

IF I open CMM database first :

OPEN DATABASE c:\projetos\spi\data\cmm.dbc SHARED
OPEN DATABASE c:\projetos\spi\data\spi.dbc SHARED
USE c:\projetos\spi\data\users.dbf SHARED
lcDefaultValue = DBGETPROP("users.cid", "Field", "DefaultValue")

I get the error :

"Function argument value, type, or count is invalid (Error 11)"

IF I open SPI database first :

OPEN DATABASE c:\projetos\spi\data\spi.dbc SHARED
OPEN DATABASE c:\projetos\spi\data\cmm.dbc SHARED
USE c:\projetos\spi\data\users.dbf SHARED
lcDefaultValue = DBGETPROP("users.cid", "Field", "DefaultValue")

Now everything is ok.

What should I do ?

P.S. : The form is working fine, I just cannot add a record.

Regards,
José Augusto Cavalcanti
Global Connection
jose.cavalcanti@globalconnection.com.br
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform