Page 1 of 1

Insert error

Posted: Thu 07 Jul 2011 10:42
by olegP
Component MSQuery Options.DefaultValue=False. Some fields have DefaultExpression=aaaaa
WITHOUT quotes!!

When I try to add record I get error
The multi-part identifier "aaaaa" could not be bound.
In Profiler I see
SELECT aaaaa , aaaaa
If I set DefaultExpression='aaaaa' (with quotes) It's OK.

Posted: Thu 07 Jul 2011 13:56
by AndreyZ
Hello,

Such behaviour is correct. SDAC allows using server functions in the DefaultExpression property. That's why you should quote the string value in the DefaultExpression property.

Posted: Thu 07 Jul 2011 14:19
by olegP
Thanks. It's OK.