Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using AutoInc fields
Message
De
24/06/2010 13:09:11
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01470401
Message ID:
01470430
Vues:
31
Ah,

I guess it wasn't working for me because I was displaying the Agent # field (albeit readonly) in an mmtextbox. If I remove that control it does save.

OK, so now, how do I display the number, ideally padded left with zeroes? I would like to display this number on a lookup form in a grid so that the user can click on the agent number to edit the agent details by displaying another form for just this agent as well as on the Agent edit form. Should I change my Stored procedure to extract a formatted field, or should my BO do something to format it, or do the formatting in the UI? Or are there other better options?

Is it recommended to use VFPToolkit for .NET to get functions like PADL()?

>Frank,
>
>The warning is just that, a warning. Your code should work but the warning is telling you that you never are assigning a value to a defined variable which will be handled by SQL Server when you add a new row.
>
>Update: Are you sure it is Identity column in database?
>
>HTH
>
>>Hi,
>>
>>using MM.NET 3.6 and SQL Server 2008.
>>
>>If I have an AutoInc field (Identity in SQL Server) and use the Business Layer Generator, I then get a warning when I build my project:
>>
>>Field 'SamaanSystems.IAS.Business.AgentEntity._agentNumber' is never assigned to, and will always have its default value 0
>>
>>Now, I have not set this field as a Primary Key as it is actually being used as a Candidate Key. Also the value never gets generated as far as I can tell.
>>
>>What do I need to do to get this to work?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform