Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
3rdRail
Blackfish SQL
C#Builder
C++BuilderX
CodeCentral
Conference
DBArtisan
Delphi for PHP
Delphi Prism
Delphi-BCB
EDN
InterBase
JBuilder
JBuilder 2007
Kylix
Optimizeit
QualityCentral
Test project
You are not logged in.
Help
Print
Public Report
Report From:
[ Add a report in this area ]
Report #:
14242
Status:
Closed
Borland.Eco.Persistence.SqlServer.StringAsNText.ValueToParameter TypeCast exception
Project:
Build #:
Update 3
Version:
1.0
Submitted By:
Alec Yu
Report Type:
Basic functionality failure
Date Reported:
7/10/2005 11:51:14 AM
Severity:
Commonly encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
227253
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
10.0.2041.10104
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
Wrong code in Borland.Eco.Persistence.SqlServer.StringAsNText.ValueToParameter, parameter:IDataParameter is not of type BdpParameter but of type SqlParameter, and char[] not implementing IConvertible thus not accepted by SqlCommand as a right value type.
Wonder if the same error appears in Delphi 2005 as well.
Steps to Reproduce:
The steps to reproduce this error:
1. Create an ECO WinForm application
2. Put a PersistenceMapperSqlServer with corresponding SqlConnection with a proper connection string.
3. Specify Eco.PMapper properties of fields as StringAsNText
4. Create some eco objects with fields come with Eco.PMapper=StringAsNText
5. EcoSpace.UpdateDatabase
6. Crash with TypeCast exception
Workarounds
Created my own persistence mapper with its ValueToParameter method as:
procedure StringAsNText.ValueToParameter(value: TObject;
parameter: IDataParameter);
begin
parameter.Value := String(value);
parameter.DbType:=DbType.String;
end;
Attachment
None
Comments
Alec Yu at 7/10/2005 12:09:19 PM
-
Borland.Eco.Persistence.SqlServer.StringAsText.ValueToParameter should suffer from the same bug.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us