Board index » delphi » Ms sql update problem

Ms sql update problem


2008-02-25 05:54:17 AM
delphi178
hello
I am new in delphi
I am using delphi 2007
I have a database on my web server I can connect with sqldatasource or
dbxdatasource. I have set update commands in to the sqldatasource.
I am using gridwiev tp display and navigate to data I can see the data at
rows. Gridwiev has add a edit button that creates the update link itselt
too.
My database has 5 fields
skind
Gkind
City
Town
Village
My update string is below
UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?', Village
= '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town = '?' AND
Village = '?'
this looks like works becouse doesnt give any error but
doesnt updates aswell
It doesnt deletes too
Where did I do wrong ?What is my shortness I couldnt figure out please help
what else must I do like coding or something else ?
I use to use delphi 2005 and I were doing all this things wit bdp components
very easyly and nicely I am totaly lost since installed delphi 2007
becouse of bdp components are depriated and not works. Please help
Regards
Eddie
 
 

Re:Ms sql update problem

Pleas change your posting name to something other than borland. Someone
might believe that you are a Borland employee.
--
Bill Todd (TeamB)
 

Re:Ms sql update problem

Orion writes:
Quote
Can I have ansver to my requests please
As soon as someone reads your question who knows the answer I am sure
you will get an answer.
--
Bill Todd (TeamB)
 

Re:Ms sql update problem

Bill Todd [TeamB] writes:
borland writes:
Quote
>I am new in delphi

Pleas change your posting name to something other than borland.
Someone might believe that you are a Borland employee.
I hope not ;-)
--
Pieter
 

Re:Ms sql update problem

I am so sorry I havent seen till displays in the newsgroups
It happened itself while adding borland newsgroups in to my outlook
Can I have ansver to my requests please
"borland" <XXXX@XXXXX.COM>, haber iletisinde žunlar?
yazd?XXXX@XXXXX.COM...
Quote
hello
I am new in delphi
I am using delphi 2007
I have a database on my web server I can connect with sqldatasource or
dbxdatasource. I have set update commands in to the sqldatasource.
I am using gridwiev tp display and navigate to data I can see the data at
rows. Gridwiev has add a edit button that creates the update link itselt
too.
My database has 5 fields

skind
Gkind
City
Town
Village

My update string is below

UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?',
Village = '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town =
'?' AND Village = '?'

this looks like works becouse doesnt give any error but
doesnt updates aswell
It doesnt deletes too
Where did I do wrong ?What is my shortness I couldnt figure out please
help what else must I do like coding or something else ?
I use to use delphi 2005 and I were doing all this things wit bdp
components very easyly and nicely I am totaly lost since installed
delphi 2007 becouse of bdp components are depriated and not works. Please
help
Regards
Eddie


 

Re:Ms sql update problem

hello
I am new in delphi
I am using delphi 2007
I have a database on my web server I can connect with sqldatasource or
dbxdatasource. I have set update commands in to the sqldatasource.
I am using gridwiev tp display and navigate to data I can see the data at
rows. Gridwiev has add a edit button that creates the update link itselt
too.
My database has 5 fields
skind
Gkind
City
Town
Village
My update string is below
UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?', Village
= '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town = '?' AND
Village = '?'
this looks like works becouse doesnt give any error but
doesnt updates aswell
It doesnt deletes too
Where did I do wrong ?What is my shortness I couldnt figure out please help
what else must I do like coding or something else ?
I use to use delphi 2005 and I were doing all this things wit bdp components
very easyly and nicely I am totaly lost since installed delphi 2007
becouse of bdp components are depriated and not works. Please help
Regards
Eddie
 

Re:Ms sql update problem

Quote
UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?',
Village
= '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town = '?' AND
Village = '?'
This is a very strange string. It looks like you have parameters, but this
doesn't really tell us what they are.
Oliver Townshend
 

Re:Ms sql update problem

Oliver Townshend writes:
Quote
>UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?',
>Village
>= '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town = '?' AND
>Village = '?'

This is a very strange string. It looks like you have parameters, but
this doesn't really tell us what they are.

Oliver Townshend
Indeed very strange. But I don't see parameters here, I see simple strings.
It looks like you are trying to set all fields to '?' in all records
where all fields already contain '?'.
It could very well be working perfectly. How would you know?
 

Re:Ms sql update problem

Hello
Oliver
I use to use delphi2005 and bdp components. Bdpdataadapter were creating
the sql strings and it was working very nice. With delphi 2007 Bdp
components has been depriated there is only sql components available
Existing bdp components are not working well like at d2005 giving errors
with insert command and update those components works only with xml files at
readonly condition. I am realy confused with delphi2007 there is new
components SQLdatasource that I have copy the update string from
bdpdataadapter to sqldatasource update tab but it doesnt work
please help me I have write my fielsd please write me the update string how
should be I will use as reference for my other databases
Regards
Eddie
"Oliver Townshend" <oliveratcodelegaldotcomdotau>, haber iletisinde sunlari
yazdi:XXXX@XXXXX.COM...
Quote
>UPDATE Emlak11 SET skind = '?', Gkind = '?', City = '?', Town = '?',
>Village
>= '?' WHERE skind = '?' AND Gkind = '?' AND City = '?' AND Town = '?' AND
>Village = '?'

This is a very strange string. It looks like you have parameters, but
this doesn't really tell us what they are.

Oliver Townshend

 

Re:Ms sql update problem

Quote
I use to use delphi2005 and bdp components. Bdpdataadapter were creating
the sql strings and it was working very nice. With delphi 2007 Bdp
components has been depriated there is only sql components available
Existing bdp components are not working well like at d2005 giving errors
with insert command and update those components works only with xml files
at readonly condition. I am realy confused with delphi2007 there is new
components SQLdatasource that I have copy the update string from
bdpdataadapter to sqldatasource update tab but it doesnt work
please help me I have write my fielsd please write me the update string
how should be I will use as reference for my other databases
So because they are deprecated you aren't using them any more, and instead
you are using SQL datasource components? Well if they are deprecated, they
will probably still work so you could keep using them couldn't you? They
aren't the same as the SQLdatasource components. can not you get the new
component to generate the update and delete SQL for you? Because copying
isn't going to work.
Not that I have used either of these components.
Oliver Townshend
 

Re:Ms sql update problem

Hello Oliver
I dont know have you checked the delphi2007 and sqldatasources properties ?
It doesnt have any sql string query for update , insert and delete only for
select and parameterized select !!!!
so I want to put the sql update string to activate gridview's edit and
update navigation support
Bdp components are working only for readonly condition like if you want to
display data on dbwebgrid it shows the data but doesnt update or delete or
insert.
Update string created by bdpdataadapter is gives error with sqldatasource at
delphi2007. This means each component uses their specific sql strings to
navigate data isnt it ? If you use sqldatasource component in delphi2007
and if you update your data successfully please send me the update string I
will dedicate and will find out where I do wrong
Regards
Eddie
"Oliver Townshend" <oliveratcodelegaldotcomdotau>, haber iletisinde sunlari
yazdi:XXXX@XXXXX.COM...
Quote
>I use to use delphi2005 and bdp components. Bdpdataadapter were creating
>the sql strings and it was working very nice. With delphi 2007 Bdp
>components has been depriated there is only sql components available
>Existing bdp components are not working well like at d2005 giving errors
>with insert command and update those components works only with xml files
>at readonly condition. I am realy confused with delphi2007 there is new
>components SQLdatasource that I have copy the update string from
>bdpdataadapter to sqldatasource update tab but it doesnt work
>please help me I have write my fielsd please write me the update string
>how should be I will use as reference for my other databases

So because they are deprecated you aren't using them any more, and instead
you are using SQL datasource components? Well if they are deprecated,
they will probably still work so you could keep using them couldn't you?
They aren't the same as the SQLdatasource components. can not you get the
new component to generate the update and delete SQL for you? Because
copying isn't going to work.

Not that I have used either of these components.

Oliver Townshend
 

Re:Ms sql update problem

Quote
so I want to put the sql update string to activate gridview's edit and
update navigation support
Try it without it, it may work.
Oliver Townshend