BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi 2006 clientdataset problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
sham
Guest





PostPosted: Fri Nov 03, 2006 7:00 pm    Post subject: Delphi 2006 clientdataset problem Reply with quote



Hi to all,

I posted this question about 3 months ago but did not get a reply.

We have a D7 program that has been re-built in D2006.
We have found that in D2006, a section of the code that queries an access
database is not returning the correct data. A column which should be an
integer is given as 1.234....E-607 and I get errors saying 0.0 is not a
timestamp.

I created a demo app using the same code which interacts with the access
table but there I CANNOT reproduce the problem.

When I debug my original app in D2006, there seems to be a problem when I
open a client dataSet.
The stack dump I have is :

FMTBcd.CurrToBCD(595,???,32,???)
DB.TDataSet.DataConvert($244AE80,$12EC9C,$24E3E28,True)
ADODB.CurrToBuffer(595)
ADODB.VarToBuffer
ADODB.TCustomADODataSet.GetFieldData($244AE80,$24E3E28,True)
ADODB.TCustomADODataSet.GetFieldData(???,???)
ADODB.TCustomADODataSet.GetFieldData(???,???)
Provider.TDataPacketWriter.PutField($1F0A248)
Provider.TDataPacketWriter.WriteDataSet($1F081A0,((1, $1E10210, $1F081A0,
10, False, False, (Provider.TDataPacketWriter.PutWideStringField,$2570330),
1, nil), (2, $1E10120, $1F081A0, 30, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 2, nil), (3,
$244AC60, $1F081A0, 8, False, False,
(Provider.TDataPacketWriter.PutField,$2570330), 3, nil), (4, $1E10030,
$1F081A0, 8, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 4, nil), (5,
$1E108A0, $1F081A0, 24, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 5, nil), (6,
$1E106C0, $1F081A0, 38, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 6, nil), (7,
$244AE80, $1F081A0, 34, False, False,
(Provider.TDataPacketWriter.PutField,$2570330), 7, nil), (8, $1E105D0,
$1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 8, nil), (9,
$1E104E0, $1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 9, nil), (10,
$1E10990, $1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 10, nil), (11,
$1E10A80, $1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 11, nil), (12,
$1E10B70, $1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 12, nil), (13,
$1E10C60, $1F081A0, 100, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 13, nil), (14,
$1E10D50, $1F081A0, 30, False, False,
(Provider.TDataPacketWriter.PutWideStringField,$2570330), 14, nil), (15,
$1E10E40, $1F081A0, 8, False, False,
(Provider.TDataPacketWriter.PutField,$2570330), 15, nil)),2147483647)
Provider.TDataPacketWriter.GetDataPacket($5C69E0,-1,Unassigned)
Provider.TDataSetProvider.CreateDataPacket([grMetaData],[poUseQuoteChar],-1,Unassigned)
Provider.TBaseProvider.InternalGetRecords(???,???,[grMetaData],'',Null)
Provider.TDataSetProvider.InternalGetRecords(-1,-1,???,'',Null)
Provider.TCustomProvider.DoGetRecords(-1,-1,1,'',Null,Unassigned)
Provider.TCustomProvider.GetRecords(???,-1,1,'',Null,Unassigned)
Provider.TLocalAppServer.AS_GetRecords('',-1,-1,1,'',Null,Unassigned)
DBClient.TCustomClientDataSet.DoGetRecords(-1,-1,1,'',Null)
DBClient.TCustomClientDataSet.OpenCursor(False)
DB.TDataSet.SetActive(???)
DB.TDataSet.Open
BabelClasses.TADOCursor.FillClientDataSet
BabelClasses.TCustomCursor.ReadData
ViewSQLDataFrmUnit.TViewSQLDataFrm.FormShow(???)
Forms.TCustomForm.DoShow

Like I mentioned above all works fine in my demo app (which is built in
D2006) but not in the original app.

Any clues on what is going on and why does it go in FMTBcd?

The application has a clientdataset and a datatsetprovider which is then
tied to an adoquery.

Sham.
Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Fri Nov 03, 2006 10:50 pm    Post subject: Re: Delphi 2006 clientdataset problem Reply with quote



sham wrote:
Quote:

We have a D7 program that has been re-built in D2006.
We have found that in D2006, a section of the code that queries an
access database is not returning the correct data. A column which
should be an integer is given as 1.234....E-607 and I get errors
saying 0.0 is not a timestamp.

The CDS apparently thinks this is a float field, not an integer field. Check
the actual type all the way through - in the Access database, in the field
type within the dataset used to retrieve this data, in the CDS (presuming
you have created persistent fields in one or both datasets), and in any code
accessing that field in either involved dataset.

If you are not using persistent fields in either dataset, then perhaps
BDS2006 is interpreting that Access field differently, what is the actual
type in the database?

--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"It used to be that other people's achievements were considered an
inspiration, not a grievance."
Back to top
sham
Guest





PostPosted: Mon Nov 06, 2006 5:42 pm    Post subject: Re: Delphi 2006 clientdataset problem Reply with quote



Hi Wayne,

Thank you for the reply.

I am not using any persistent fields in the datasets.

As I mentioned before, I did not get this problem in the build with D7.
I have simple query (select pavail from prop_inf) and I get the DIFFERENT
stack dump as follows:

exception class : EOleException
exception message : Parameter pvail has no default value.

main thread ($fe4):
006c27bd +0b9 Babel.exe ADODB 3580
TCustomADODataSet.OpenCursor
0054dd15 +05d Babel.exe DB 9241 TDataSet.SetActive
0054dae2 +00e Babel.exe DB 9197 TDataSet.Open
0073f33d +0ad Babel.exe BabelClasses 169
TADOCursor.FillClientDataSet
0074055a +0f6 Babel.exe BabelClasses 51 TCustomCursor.ReadData
007fe3b9 +025 Babel.exe ViewSQLDataFrmUnit 32 TViewSQLDataFrm.FormShow
004ce80d +021 Babel.exe Forms 2994 TCustomForm.DoShow
004d34c8 +0ac Babel.exe Forms 5021
TCustomForm.CMShowingChanged
004b5441 +335 Babel.exe Controls 5143 TControl.WndProc
004ba178 +4cc Babel.exe Controls 7246 TWinControl.WndProc
004cf295 +551 Babel.exe Forms 3284 TCustomForm.WndProc
004b4fee +036 Babel.exe Controls 5018 TControl.Perform
004b9678 +100 Babel.exe Controls 6970 TWinControl.UpdateShowing
004b9705 +059 Babel.exe Controls 6989
TWinControl.UpdateControlState
004bc5f1 +03d Babel.exe Controls 8273
TWinControl.CMVisibleChanged
004b5441 +335 Babel.exe Controls 5143 TControl.WndProc
004ba178 +4cc Babel.exe Controls 7246 TWinControl.WndProc
004cf295 +551 Babel.exe Forms 3284 TCustomForm.WndProc
004b4fee +036 Babel.exe Controls 5018 TControl.Perform
004b34cc +03c Babel.exe Controls 4168 TControl.SetVisible
004ceb89 +055 Babel.exe Forms 3099 TCustomForm.SetVisible
004d3dec +00c Babel.exe Forms 5350 TCustomForm.Show
004d4050 +14c Babel.exe Forms 5414 TCustomForm.ShowModal
008001aa +04e Babel.exe ADOCursorFrmUnit 54
TADOCursorForm.btnViewDataClick
004b59fe +086 Babel.exe Controls 5226 TControl.Click
00497c2d +031 Babel.exe StdCtrls 3574 TButton.Click
00497d96 +01e Babel.exe StdCtrls 3626 TButton.CNCommand
004b5441 +335 Babel.exe Controls 5143 TControl.WndProc
004ba178 +4cc Babel.exe Controls 7246 TWinControl.WndProc
00497a5a +086 Babel.exe StdCtrls 3513 TButtonControl.WndProc
004b4fee +036 Babel.exe Controls 5018 TControl.Perform
004ba33c +03c Babel.exe Controls 7292 DoControlMsg
004babc1 +015 Babel.exe Controls 7489 TWinControl.WMCommand
004b5441 +335 Babel.exe Controls 5143 TControl.WndProc
004ba178 +4cc Babel.exe Controls 7246 TWinControl.WndProc
004b9838 +034 Babel.exe Controls 7021 TWinControl.MainWndProc
0047c0b0 +014 Babel.exe Classes 11572 StdWndProc
77d4b8fe +044 USER32.dll SendMessageW
77d4e900 +016 USER32.dll CallWindowProcA
004ba2c0 +13c Babel.exe Controls 7273 TWinControl.DefaultHandler
004b5f25 +015 Babel.exe Controls 5357 TControl.WMLButtonUp
004b5441 +335 Babel.exe Controls 5143 TControl.WndProc
004ba178 +4cc Babel.exe Controls 7246 TWinControl.WndProc
00497a5a +086 Babel.exe StdCtrls 3513 TButtonControl.WndProc
004b9838 +034 Babel.exe Controls 7021 TWinControl.MainWndProc
0047c0b0 +014 Babel.exe Classes 11572 StdWndProc
77d496c2 +00a USER32.dll DispatchMessageA
004d861e +136 Babel.exe Forms 7670
TApplication.ProcessMessage
004d8663 +00f Babel.exe Forms 7689 TApplication.HandleMessage
004d88fe +0a6 Babel.exe Forms 7773 TApplication.Run
008103a7 +053 Babel.exe Babel 57 initialization

Pavail is of type date/time in the access database.

Sham.


"Wayne Niddery [TeamB]" <wniddery (AT) chaffaci (DOT) on.ca> wrote in message
news:454b736b$1 (AT) newsgroups (DOT) borland.com...
Quote:
sham wrote:

We have a D7 program that has been re-built in D2006.
We have found that in D2006, a section of the code that queries an
access database is not returning the correct data. A column which
should be an integer is given as 1.234....E-607 and I get errors
saying 0.0 is not a timestamp.

The CDS apparently thinks this is a float field, not an integer field.
Check the actual type all the way through - in the Access database, in the
field type within the dataset used to retrieve this data, in the CDS
(presuming you have created persistent fields in one or both datasets),
and in any code accessing that field in either involved dataset.

If you are not using persistent fields in either dataset, then perhaps
BDS2006 is interpreting that Access field differently, what is the actual
type in the database?

--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"It used to be that other people's achievements were considered an
inspiration, not a grievance."
Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Mon Nov 06, 2006 8:50 pm    Post subject: Re: Delphi 2006 clientdataset problem Reply with quote

sham wrote:
Quote:

I am not using any persistent fields in the datasets.

As I mentioned before, I did not get this problem in the build with
D7. I have simple query (select pavail from prop_inf) and I get the

exception class : EOleException
exception message : Parameter pvail has no default value.

Pavail is of type date/time in the access database.


No Where clause in the above simple query? Strange that it's claiming pavail
as a *parameter*.

This isn't a problem with the CDS then, but at the ADO component/Access
level. I'm not an Access expert and cannot think of what else could be
causing this but I expect there's an answer. I suggest you repost this
information in the borland.public.delphi.database.ado group and hopefully
someone there will be able to figure it out for you. That you seem to have a
reproducible case should help.

--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"The two most abundant elements in the universe are hydrogen and
stupidity." - Harlan Ellison
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.