Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic sql, datagrid, save and HookSetDefaultValues pblm
Message
From
29/04/2008 20:41:38
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Dynamic sql, datagrid, save and HookSetDefaultValues pblm
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01314081
Message ID:
01314081
Views:
58
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
Next
Reply
Map
View

Click here to load this message in the networking platform