Open GoogleCodeExporter opened 9 years ago
Original comment by bniemyjski
on 25 May 2009 at 3:30
Hello,
Is this the same behavior for .netTiers 2.3?
Thanks
-Blake
Original comment by bniemyjski
on 25 May 2009 at 4:04
yes, i'm sorry, i meant 2.3 in the post, i just started using .netTiers at 2.3
Original comment by geria...@gmail.com
on 25 May 2009 at 5:47
Can you create a quick sql script that recreates this issue.
-Blake
Original comment by bniemyjski
on 25 May 2009 at 9:37
it's simple, the template for sql procedures in .netTiers, for insert
procedure, is
as follows:
INSERT INTO <%=fqTableName%>
(
<% for (int i = 0; i < colsUpdatable.Count;
i++) { %>[<%= colsUpdatable[i].Name %>]<% if (i < colsUpdatable.Count - 1) { %>
,<% } } %>
)
<% if (colsIdentityRowGuids.Count > 0 &&
IncludeDatabaseFeatures == MoM.Templates.DatabaseType.SQLServer2005) { %>
OUTPUT <% for (int i = 0; i <
colsIdentityRowGuids.Count; i++) {%>INSERTED.<%= colsIdentityRowGuids[i].Name
%><% if
(i < colsIdentityRowGuids.Count - 1) { %>,<% } } %> INTO @IdentityRowGuids
<%}%>
VALUES
(
<% for (int i = 0; i < colsUpdatable.Count;
i++) { %>@<%= GetPropertyName(colsUpdatable[i]) %><% if (i <
colsUpdatable.Count - 1)
{ %>
,<% } } %>
)
i created a quick fix, in which nullable columns aren't in the normal insert...
values..., but are added later:
IF NOT @Param IS NULL
UPDATE tableName SET colName = @Param WHERE idColumn = @IdParam
of course it's only after retrieving the new id...
the default values .netTiers does parse from the db should be set in the
instantiation of the entity.
Original comment by geria...@gmail.com
on 26 May 2009 at 7:17
Original comment by bniemyjski
on 26 May 2009 at 1:17
Hello,
I'm having same issue here, using the version 2.3-r891 (nightly build) that
mention that an issue with default values in date and time fields have been
fixed:
(2/17/2011) [Issue 329] – Default values correctly initialised for DateTime &
Time data types.
This is causing exception when Insert process is performed. How to fix this
issue, urge!, please.
Thank you
Original comment by cesar.q...@gmail.com
on 22 Nov 2012 at 2:24
Hello,
Never in mind my previous post. I'm missing set the ParseDbColDefaultVal
property. I think this property must to be checked by default.
Now all working fine. This problem was affecting me long.
Thank you.
Original comment by cesar.q...@gmail.com
on 22 Nov 2012 at 3:14
Original issue reported on code.google.com by
geria...@gmail.com
on 22 Apr 2009 at 12:54