Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic sql, datagrid, save and HookSetDefaultValues pblm
Message
De
29/04/2008 20:41:38
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Dynamic sql, datagrid, save and HookSetDefaultValues pblm
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01314081
Message ID:
01314081
Vues:
59
Hi Kevin,

I have a form with a mmDataGrid. HookSetDefaultValues adds my primary key (a GUID) for new rows, all fine and the new guid shows in the grid. When I save the row, the row is saved, including the new guid, however then the column for that pk is cleared.
This doesn't happen when I switch to stored procedures, which is what I've been using up to now. I've repeated this test for several tables, same problem. (stored procedures causes a long 20 to 300 second delay when saving)

I'm guessing by default the save is expecting to return a new pk from the backend database, however the sql server isn't generating the keys the code is. I've looked (and looked and looked) however I cannot find a flag/switch for this behaviour, though I'm sure I read it somewhere. Is there a switch I can turn off so it isn't expecting the new pk back from the sql server?

Any suggestions?

thanks,
Larry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform