See my article on the CommandBuilder.
http://www.betav.com/msdn_magazine.htm
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Nedim" <(E-Mail Removed)> wrote in message
news:249C71E6-8F0C-4C2A-A9C0-(E-Mail Removed)...
> is there a way to influence the sql command that the commandbuilder
> generates???? by default, those are extremely "ugly" sql commands, and i
> don't really understand the purpose of all the sql that is generated
>
> below is one such command, and i'm using a database (fox .dbc file) that
> errs "sql statement too long" when i try to run this command (using
> dataadapter.update() method for updating a row in a table)
>
> what is the parameters after the where ... clause? i understand the first
> part where it searches for the matching row via a primary key value but
> those
> ?= 1 OR something parts really confuse me.
> please help
>
> UPDATE rsdkdat SET rs_datrea = ? , rs_posmat = ? , rs_datdok = ? ,
> rs_datpre
> = ? , rs_datpri = ? , rs_novter = ? , rs_opimov = ? , rs_tipvla = ? WHERE
> (
> (rs_brjdok = ?) AND ((? = 1 AND rs_datrea IS NULL) OR (rs_datrea = ?)) AND
> ((? = 1 AND rs_tipnal IS NULL) OR (rs_tipnal = ?)) AND ((? = 1 AND
> rs_posmat
> IS NULL) OR (rs_posmat = ?)) AND ((? = 1 AND rs_brjlok IS NULL) OR
> (rs_brjlok
> = ?)) AND ((? = 1 AND rs_primat IS NULL) OR (rs_primat = ?)) AND ((? = 1
> AND
> rs_sifmov IS NULL) OR (rs_sifmov = ?)) AND ((? = 1 AND rs_stabro IS NULL)
> OR
> (rs_stabro = ?)) AND ((? = 1 AND rs_napom1 IS NULL) OR (rs_napom1 = ?))
> AND
> ((? = 1 AND rs_napom2 IS NULL) OR (rs_napom2 = ?)) AND ((? = 1 AND
> rs_demdin
> IS NULL) OR (rs_demdin = ?)) AND ((? = 1 AND rs_vriskl IS NULL) OR
> (rs_vriskl
> = ?)) AND ((? = 1 AND rs_staslg IS NULL) OR (rs_staslg = ?)) AND ((? = 1
> AND
> rs_valpla IS NULL) OR (rs_valpla = ?)) AND ((? = 1 AND rs_indskl IS NULL)
> OR
> (rs_indskl = ?)) AND ((? = 1 AND rs_tipkup IS NULL) OR (rs_tipkup = ?))
> AND
> ((? = 1 AND rs_datdok IS NULL) OR (rs_datdok = ?)) AND ((? = 1 AND
> rs_radmod
> IS NULL) OR (rs_radmod = ?)) AND ((? = 1 AND rs_datpre IS NULL) OR
> (rs_datpre
> = ?)) AND ((? = 1 AND rs_terpre IS NULL) OR (rs_terpre = ?)) AND ((? = 1
> AND
> rs_vrjpre IS NULL) OR (rs_vrjpre = ?)) AND ((? = 1 AND rs_tipser IS NULL)
> OR
> (rs_tipser = ?)) AND ((? = 1 AND rs_sersav IS NULL) OR (rs_sersav = ?))
> AND
> ((? = 1 AND rs_usenam IS NULL) OR (rs_usenam = ?)) AND ((? = 1 AND
> rs_brjori
> IS NULL) OR (rs_brjori = ?)) AND ((? = 1 AND rs_regozn IS NULL) OR
> (rs_regozn
> = ?)) AND ((? = 1 AND rs_datreg IS NULL) OR (rs_datreg = ?)) AND ((? = 1
> AND
> rs_kilome IS NULL) OR (rs_kilome = ?)) AND ((? = 1 AND rs_brjsas IS NULL)
> OR
> (rs_brjsas = ?)) AND ((? = 1 AND rs_brjmot IS NULL) OR (rs_brjmot = ?))
> AND
> ((? = 1 AND rs_datpri IS NULL) OR (rs_datpri = ?)) AND ((? = 1 AND
> rs_vrizak
> IS NULL) OR (rs_vrizak = ?)) AND ((? = 1 AND rs_vripre IS NULL) OR
> (rs_vripre
> = ?)) AND ((? = 1 AND rs_novter IS NULL) OR (rs_novter = ?)) AND ((? = 1
> AND
> rs_sifrad IS NULL) OR (rs_sifrad = ?)) AND ((? = 1 AND rs_orgjed IS NULL)
> OR
> (rs_orgjed = ?)) AND ((? = 1 AND rs_vrsrad IS NULL) OR (rs_vrsrad = ?))
> AND
> ((? = 1 AND rs_gorivo IS NULL) OR (rs_gorivo = ?)) AND ((? = 1 AND
> rs_zamdje
> IS NULL) OR (rs_zamdje = ?)) AND ((? = 1 AND rs_tiprad IS NULL) OR
> (rs_tiprad
> = ?)) AND ((? = 1 AND rs_opimov IS NULL) OR (rs_opimov = ?)) AND ((? = 1
> AND
> rs_tipvla IS NULL) OR (rs_tipvla = ?)) )
>