Board index » delphi » ClientDataset applyupdates problems

ClientDataset applyupdates problems


2004-05-13 01:10:15 AM
delphi168
Hello!
When I use my program and connect to my local mysql-database, everything
works fine. But when I connect to remote mysql-database, everything seems to
work fine, but when I restart my application, no changes to the remote
database has been made ?!
I use Delphi 8, TSQLConnection, SQLQuery, Datasetprovider, clientdataset and
datasource components and display the result in DBGrid.
I think my problem has something to do with the apply-updates, but I new to
delphi so I can not seem to find the problem...
Any suggestion where to search for the problem ?
Thanks for you help!
Marko Lahtinen
 
 

Re:ClientDataset applyupdates problems

I to DBGrids with the same kind of component structure, but they access
different tables in my database. The second dataset works fine in both
situtations; in local system and when I connect to the remote mysql-server.
But the other works only, when I connect to my local mysql-server. The only
difference between the two databases is the Mysql version. In my local
system, I use Mysql 4.0.18 and in the remote system Mysql 3.23.58.
When I connect to the remote database and try for example delete a record, I
get the following error:
'Record not found or changed by another user'
I installed mysql 3.23.58 to my local system, and I get the same error. The
funny thing is that my other dataset still works fine... If I alter the
first dataset, so that it fetches only one column for the table, I can
remove rows and edit them.
Any ideas ?
Marko
"Asim" <XXXX@XXXXX.COM>writes
Quote
Dear Marko,
Please note that you have not stated the problem or error message.
Regards,
Asim.


>Hello!
>
>When I use my program and connect to my local mysql-database, everything
>works fine. But when I connect to remote mysql-database, everything
seems to
>work fine, but when I restart my application, no changes to the remote
>database has been made ?!
>
>I use Delphi 8, TSQLConnection, SQLQuery, Datasetprovider, clientdataset
and
>datasource components and display the result in DBGrid.
>
>I think my problem has something to do with the apply-updates, but I new
to
>delphi so I can not seem to find the problem...
>
>Any suggestion where to search for the problem ?
>
>Thanks for you help!
>
>Marko Lahtinen
>
>
>

Asim Khan

--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

Dear Marko,
Please note that you have not stated the problem or error message.
Regards,
Asim.
Quote
Hello!

When I use my program and connect to my local mysql-database, everything
works fine. But when I connect to remote mysql-database, everything
seems to
work fine, but when I restart my application, no changes to the remote
database has been made ?!

I use Delphi 8, TSQLConnection, SQLQuery, Datasetprovider, clientdataset
and
datasource components and display the result in DBGrid.

I think my problem has something to do with the apply-updates, but I new
to
delphi so I can not seem to find the problem...

Any suggestion where to search for the problem ?

Thanks for you help!

Marko Lahtinen



Asim Khan
--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

I had Delphi 7 trial installed before I purchased it...
I have only the two datasets in my application.
I did some experimenting and noticed, if I use select * from table in my
TSQLQuery and fetch all fields to it and my clientdataset, it doesn't work,
but when I used select column1, column2. column3, column4 from table it
worked fine...
Marko
"Asim" <XXXX@XXXXX.COM>writes
Quote
Dear Marko,
Did you ever install the trial version of dbExpress, the native driver
dlls in trial version allow database operations on a maximum 6 coloumns
of the database table. Otherwise make sure that there are no other active
datasets, elsewhere in your application.

Asim.

Asim Khan

--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

dbexpmysql.dll version is 7.0.2.113 and size 93,5
dbexpmys.dll version is the same and size is 92,0
"Asim" <XXXX@XXXXX.COM>writes
Quote
Dear Marko,
Pls make sure the two files namely dbexpmys.dll and
dbexpmysql.dll in Winnt/System32 (i.e. windows directory) are 92 and 94
KB respectively, in case they are not, possibly they have not been
overwritten during licensed version installation, please verify and
replace them with the files on your installation CD.
Regards,

Asim Khan

--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

Dear Marko,
Did you ever install the trial version of dbExpress, the native driver
dlls in trial version allow database operations on a maximum 6 coloumns
of the database table. Otherwise make sure that there are no other active
datasets, elsewhere in your application.
Asim.
Asim Khan
--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

Dear Marko,
Pls make sure the two files namely dbexpmys.dll and
dbexpmysql.dll in Winnt/System32 (i.e. windows directory) are 92 and 94
KB respectively, in case they are not, possibly they have not been
overwritten during licensed version installation, please verify and
replace them with the files on your installation CD.
Regards,
Asim Khan
--- posted by geoForum on delphi.newswhat.com
 

Re:ClientDataset applyupdates problems

This usually implies that it can not find the record. In
your source dataset (not the CDS), set the
Fields.ProviderFlags properties for each field. Make
sure that the primary key is specified and I'd suggest
making that the only field(s) in the where clause. The
error should go aways, if it isn't a real bug in the
driver.
Marko Lahtinen writes:
Quote

'Record not found or changed by another user'

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
www.bss-software.com
sourceforge.net/projects/dbexpressplus
 

Re:ClientDataset applyupdates problems

Thanks for your advice. That fixed the problem. I had only marked the
primary key fields. after I changed pInWhere=false in other field everything
worked fine.
Thank you very much!!
Marko
"Thomas Miller" <XXXX@XXXXX.COM>writes
Quote
This usually implies that it can not find the record. In
your source dataset (not the CDS), set the
Fields.ProviderFlags properties for each field. Make
sure that the primary key is specified and I'd suggest
making that the only field(s) in the where clause. The
error should go aways, if it isn't a real bug in the
driver.

Marko Lahtinen writes:

>
>'Record not found or changed by another user'
>

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

www.bss-software.com
sourceforge.net/projects/dbexpressplus