The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Records inserted / updated in hostdatabase (History) but fields truncated in generated TEF
Posted: 28 Jun 06 4:49 AM
|
fiogf49gjkf0d Hello,
I made an external program in C# .Net using SLXProvider which inserts/updates records in History table (SLX 6.2 SP1). All fields are correctly updated in host database but the syncserver generates TEF in which fields are truncated with 41 caracters => Consequently, data are truncated in remote database ! Has anybody the same problem ? What is the solution ? Thank you ! |
|
|
| |
| |
|
Re: Records inserted / updated in hostdatabase (History) but fields truncated in generated TEF
Posted: 28 Jun 06 10:38 AM
|
fiogf49gjkf0d This is a known issue related to defect 1-39307. Basically, the problem happens with any varchar parameters being truncated because internally it is defaulting to a WCHAR data type for string values, which is not supported by the provider. Since a DataAdapter internally maintains separate Command objects to perform inserts, updates, etc via parameters from the DataSet upon Update, you're seeing the same problem.
Two options to fix this:
1) Upgrade to SP4 2) Change your code so you're doing all updates & inserts via SQL statements (not parameterized). This means you also have to account for dates being ISO formatted and also worry about invalid chars in your string along with single quotes. This route sucks, see #1.
It may not be good news, but at least you won't have to keep fighting with this wondering what is wrong |
|
|
| |
| |
|
Re: Records inserted / updated in hostdatabase (History) but fields truncated in generated TEF
Posted: 28 Jun 06 11:53 AM
|
fiogf49gjkf0d Thank you very much Ryan ! I've changed my code (i use a first query using dataset technic in order to insert the new record with somme fields, such as datetime fields. And just after I use a ExecuteNonQery in order to update string fields with a SQL statement "update HISTORY set xxx='fool fool fool fool fool...'". And it seems to work fine !
Chris |
|
|
|