AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

SQL Parameter direction incorrect for updating children when using GUID for primary key (VB) #436

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two tables linked by GUID keys
2. Modify non-key child field
3. Save parent

What is the expected output? What do you see instead?
SQL is complaining about inserting null values into ID column.

What version of the product are you using?
1747

Template: EditableChild.DataAccess.StoredProcedures.cst
Method: Child_Update

Please provide any additional information below.
command.Parameters.AddWithValue("@p_id", Me.Identification)
->command.Parameters("@p_id").Direction = ParameterDirection.InputOutput<-

The second line above needs to be commented out.  Inserts work fine and the SQL 
statement appears to be OK.

There are other Child_Update signatures that I didn't test that seem to have 
the same statement in them.

Original issue reported on code.google.com by bill.n...@gmail.com on 29 Jun 2010 at 4:21

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 30 Jun 2010 at 7:02

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1778.

Fixed Issue 436: SQL Parameter direction incorrect for updating children when 
using GUID for primary key (VB).
Fixed many other issues with the CRUD operations not updating children or its 
values.
Fixed a bug in the stored procedures where a child stored procedure (proc) 
would generate a new ID when it required a FK Constraint value (input and not 
output..)

Original comment by bniemyjski on 8 Jul 2010 at 4:28

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 8 Jul 2010 at 4:29