wizard-generated stored procedure for Null-Guid-Column

G

Gunnar Mohr

Hi,

- occurs with .Net 2.0 Beta 2 -

I have a typed-DataSet and some DataAdapters to provide the tables for the
DataSet. When I create the stored-procedures with the DataAdaper-Wizard for
a table with a Guid column, which can be NULL, the Wizard generates a wrong
Script. (only when "use optimistic concurrency" is true).

If you look at the script, the following part of the where-clause is faulty

....((@IsNull_FieldName = 1 AND [FieldName] IS NULL) OR ([FieldName] =
@Original_FieldName))...

(FieldName is defined as uniqueidentity, allow NULL)

obviously @IsNull_FieldName = 1 is wrong, because 1 is an Integer and not a
uniqueidentity.

But how to fix that?

regards Gunnar
 
R

Rogas69

Well the @IsNull_FieldName is not UUID, it's int. look at the source of
generated dataset
This parameter seems to be used to check if given value is null. This
parameter appears only for nullable fields it seems.

Peter
 
G

Gunnar Mohr

Hi,

Am Wed, 22 Jun 2005 15:24:58 +0100 schrieb Rogas69:
Well the @IsNull_FieldName is not UUID, it's int. look at the source of
generated dataset

no, the @IsNull_FieldName-Parameter must be a uniqueidentifier - if you
excerpt the scripüt from he wizard and run it in the query-analyser it has
an error, saying that int32 cannot converted to a uniquidentifier.
This parameter seems to be used to check if given value is null. This
parameter appears only for nullable fields it seems.

ack.

Gunnar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top