Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic sql, datagrid, save and HookSetDefaultValues pbl
Message
From
30/04/2008 15:31:33
 
 
To
30/04/2008 11:17:51
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01314081
Message ID:
01314341
Views:
7
Hi Tim,
well you understood it enough to solve the problem! Thank you very much, that did the trick.

-Larry

>Hi Larry,
>
>I am not sure I completely followed your question but is this what you are looking for?
>
>In your ABusinessObject
>this.RetrieveAutoIncrementPK = false;
>I think this was intended for integers, but if it is set to true, maybe it is the problem.
>Just a guess really.
>Tim
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform