June 9, 2008

Generic SQL error

WOW! I'm sooooo happy when I receive such deterministic errors.

After saving an account, this message popped up. And you guessed it - it appeared just SOMETIMES!

After a little of SQL profiling i found the reason:
I extended the account's address1_line1 field from 50 to 100 characters. After saving the account, CRM automatically creates/updates also the customeraddress entity.

Extend the customeraddress entity, extend attribute line1, match the length to length of the account address line.


Anonymous said...

My console application takes care of transferring data from Client's dbase to MS CRM. Talking of the contact entity address_line1 entity is an nvarchar field with 2000 chars and in the client's dbase its datatype is varchar(2000). on calling service.Create() method, I get this error: "Generic SQL error".
Can anyone help, where am I missing something?

Yitz said...

Thank you for that tip! I have been struggling with the same thing.

Did it change the field width for that field in the FilteredAccount view as well??

Dejan Dular said...

FilteredAccount is a view, so the field length is "updated" automatically from AccountBase table.

Yitz said...

I did this eventually but when I looked at the definition of the FilteredAccount view it still showed width 50.

I was concerned but I found that when I queried the view I got the data in the table even if it was more than 50 characters.