Board index » delphi » Non-Blob.Identity fields Problems SQL 6.5

Non-Blob.Identity fields Problems SQL 6.5

I'm programming a C/S aplicattion with Delphi 4 (sp. 2) and MSSQL Server
6.5.
I have a problem when I want insert a record in a table with an Identity
field, I get
"Non-Blob Column required to perform this operation".
If I change the field kind (not identity) I dont get the problem but I
need this kind of  field.
If you know something about this matter, be sure I will thank you
eternaly.
Please write me.

Thank You.

rcarra...@pandasoftware.es

 

Re:Non-Blob.Identity fields Problems SQL 6.5


Hello,
We don't use the Identity type in MSSQL. It doesn't work w/ D4 - or we
haven't found a way to make it work. Why not just create a key column(type:
numeric) and control the value yourself. One of our guys wrote an object
that will essentially return the next available key value. The problem is
when to execute the object's GetKey function. The best place would be on the
BeforePost event, however, per Delphi Help, all key fields on a table are
verified, Then BeforePost event is fired. How we use is is call the function
on the AfterInsert event and then again on the PostError event (to catch
collisions)

Help?
-Glen

Quote
Rubn Carrasco Pe?a wrote:
> I'm programming a C/S aplicattion with Delphi 4 (sp. 2) and MSSQL Server
> 6.5.
> I have a problem when I want insert a record in a table with an Identity
> field, I get
> "Non-Blob Column required to perform this operation".
> If I change the field kind (not identity) I dont get the problem but I
> need this kind of  field.
> If you know something about this matter, be sure I will thank you
> eternaly.
> Please write me.

> Thank You.

> rcarra...@pandasoftware.es

Re:Non-Blob.Identity fields Problems SQL 6.5


This is a know problem when you have your identity as key field or DEFAULT
columns. BDE doesn't automatically refresh the identity/default columns the
server inserted and that is the problem. If you refresh your query then it
will work but that might be an expensive operation when working with large
result sets.

Workaround is to have a unique key on a non identity column. We have plans
on fixing this issue.

T.Ramesh.

Quote
Rubn Carrasco Pe?a wrote:
> I'm programming a C/S aplicattion with Delphi 4 (sp. 2) and MSSQL Server
> 6.5.
> I have a problem when I want insert a record in a table with an Identity
> field, I get
> "Non-Blob Column required to perform this operation".
> If I change the field kind (not identity) I dont get the problem but I
> need this kind of  field.
> If you know something about this matter, be sure I will thank you
> eternaly.
> Please write me.

> Thank You.

> rcarra...@pandasoftware.es

Re:Non-Blob.Identity fields Problems SQL 6.5


This worked great with the BDE that came with D3.  What happened?

In article <364A2E21.D1E85...@inprise.com>,
  Ramesh Theivendran <rtheivend...@inprise.com> wrote:

Quote
> This is a know problem when you have your identity as key field or DEFAULT
> columns. BDE doesn't automatically refresh the identity/default columns the
> server inserted and that is the problem. If you refresh your query then it
> will work but that might be an expensive operation when working with large
> result sets.

> Workaround is to have a unique key on a non identity column. We have plans
> on fixing this issue.

> T.Ramesh.

> Rubn Carrasco Pe?a wrote:

> > I'm programming a C/S aplicattion with Delphi 4 (sp. 2) and MSSQL Server
> > 6.5.
> > I have a problem when I want insert a record in a table with an Identity
> > field, I get
> > "Non-Blob Column required to perform this operation".
> > If I change the field kind (not identity) I dont get the problem but I
> > need this kind of  field.
> > If you know something about this matter, be sure I will thank you
> > eternaly.
> > Please write me.

> > Thank You.

> > rcarra...@pandasoftware.es

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:Non-Blob.Identity fields Problems SQL 6.5


Hello Rubn,
I'm using Delphi 3 with Sqlserver 6.5 and  think that I can help you !
Try using sql strings to insert data into table like this:

query1.sql.clear;
query1.sql.add('insert into table (field1, field2...) values (value1,
value2, ...);
query1.execsql;

Using this kind of code you don't assing value to your identity field.

Hope help,

Alexandre

Quote
"Rubn Carrasco Pe?a" wrote:
> I'm programming a C/S aplicattion with Delphi 4 (sp. 2) and MSSQL Server
> 6.5.
> I have a problem when I want insert a record in a table with an Identity
> field, I get
> "Non-Blob Column required to perform this operation".
> If I change the field kind (not identity) I dont get the problem but I
> need this kind of  field.
> If you know something about this matter, be sure I will thank you
> eternaly.
> Please write me.

> Thank You.

> rcarra...@pandasoftware.es

Re:Non-Blob.Identity fields Problems SQL 6.5


I'm getting the same message Rubn. It occurs when I try to post a record.

The more intersting thing is that the trouble just began when I recreate the
table and all your constraints. Until this event, my interface was working
very good.

If something new happens, please let me know. My research will go on too,
and I'll make you know about the news.

Sorry Alexandre, but I don't agree with write all the queries in source
code. I just do this when theres no other way. The message that occurs when
you try to set a value to Identity fields is different: "Attempting to
insert explicit value for identity column in table ... when IDENTITY_INSERT
is set to OFF".

What Rubn related was "Non-Blob Column required to perform this operation",
that sounds like a FORGOTTEN REQUIRED FIELD.

Best regards,

Gustavo Hurtado
Senior Developer
Oracle Consultant
UNISYS Brasil
--------------------------------
hurt...@mailbr.com.br

Re:Non-Blob.Identity fields Problems SQL 6.5


I'm getting the same message Rubn. It occurs when I try to post a record.

The more intersting thing is that the trouble just began when I recreate the
table and all your constraints. Until this event, my interface was working
very good.

If something new happens, please let me know. My research will go on too,
and I'll make you know about the news.

Sorry Alexandre, but I don't agree with write all the queries in source
code. I just do this when theres no other way. The message that occurs when
you try to set a value to Identity fields is different: "Attempting to
insert explicit value for identity column in table ... when IDENTITY_INSERT
is set to OFF".

What Rubn related was "Non-Blob Column required to perform this operation",
that sounds like a FORGOTTEN REQUIRED FIELD.

Best regards,

Gustavo Hurtado
Senior Developer
Oracle Consultant
UNISYS Brasil
--------------------------------
hurt...@mailbr.com.br

Other Threads