Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NewID()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
01096277
Message ID:
01096376
Vues:
21
Well, I had never used newid() with remote views and have always used identity without any problems. Glad you got it resolved.

Tell your brother a fellow Bethel-ite says hello :)

It really is a small world.


>I had many problems with Identity columns in the past. I gave up.
>
>The problem was that rv_Advogados was not open. Everything is fine now.
>My brother lives in Bethel too.
>
>Regards,
>
>>First, NewID() is a procedure that is used to add one to the last value used as a primary key. Last values used for each table are stored in the ID table in your database. It is created in the MM framework and is added into your VFP database container. It was needed prior to VFP 8.0 since VFP didn't have an IDENTITY type. If you're using VFP 8.0 or later as your database this default value is not necessary if you make the column an IDENTITY type.
>>
>>For remote views, (SQL Server), the same goes. Make your id column an IDENTITY type column and the database handles this for you.
>>
>>If you were to use The NewID procedure in your remote database, you would have to rewrite that procedure for your remote database, add a table called ID and make the default value in your database column call this proc (but as mentioned above, this is not necessary due to the IDENTITY type of variable).
>>
>>HTH
>>
>>
>>>Hi, I have a Table and records are added via 2 different Views (Forms). I´m using Remote Views and the NewID() Default Value is not in the Table itself. It´s in the Views. How can I reference the same entry in ID Table for both Views? When I´m using rv_Advogados the Default Value for id_advogado is NewID() and I have an entry in ID Table with "v_Advogados", but when I´m using rv_Advogados_Cliente I can´t put NewID("rv_advogados") as Default Value for id_advogado.
>>>
>>>Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform