Computer Games Forum
 

Go Back   Computer Games Forum > Tech > The Workshop > Limbaje de programare

Notices

Căutare produse PC Garage: Şterge căutarea

Reply
 
LinkBack Thread Tools
Old 07-07-2006, 01:07   #1 (permalink)
Mezzoman
 
cyfaws's Avatar
 
Join Date: Feb 2005
Location: KG
.NET - Folosire "Union" intr-un DataAdapter

Se poate folosi un Union intre doua selecturi in SelectCommand-ul unui SqlDataAdapter?

Am incercat cu union(all) intre cele doua interogari, am pus union si la inceputul amandorura dar nu mege. Exista vreun mod de a face asta direct sau trebuie sa folosesc neaparat doua comenzi diferite, succesive pt DataAdapter? Ca asa merge.
__________________
The most terrifying thing about the Universe is not that it is hostile but that it is indifferent. If we can come to terms with this indifference and accept the challenges of life within the boundaries of death, our existence as a species can have genuine meaning and fulfilment. However vast the darkness, we must supply our own light.
Stanley Kubrick
 
cyfaws is offline    Reply With Quote
Old 07-07-2006, 16:17   #2 (permalink)
Registered User
 
cloud's Avatar
 
Join Date: Oct 2003
Location: Bucuresti
ce mesaj de eroare iti da? la mine merge cu ceva de genul "select -1 as Id, 'Unspecified' as Nume union all select Id, Nume from Tabela".
 
cloud is offline    Reply With Quote
Old 07-07-2006, 18:32   #3 (permalink)
Mezzoman
 
cyfaws's Avatar
 
Join Date: Feb 2005
Location: KG
Eroare la generarea comenzii Select:
There were errors configuring the data adapter.

In SQL Query Analyzer imi merge dar nu si in parserul(sau cum s-o chema) adaptorului.

Comanda era asta.
Quote:
SELECT cursa.id_cursa, cursa.cnp, cursa.id_v, sofer.nume + sofer.prenume AS numes, cursa.plecare, cursa.din, cursa.la
FROM cursa left outer join sofer on cursa.cnp=sofer.cnp where (cursa.cnp IS NULL) AND (cursa.id_v IS NULL)
union all
SELECT cursa.id_cursa, cursa.cnp, cursa.id_v, sofer.nume + sofer.prenume AS numes, cursa.plecare, cursa.din, cursa.la
FROM cursa left outer join sofer on cursa.cnp=sofer.cnp where (cursa.cnp IS not NULL) AND (cursa.id_v IS not NULL)
Dar nu ma conteaza pentru ca intre timp mi-am dat seama ce zevzec eram(ce-i drept si obosit la ora scrierii codului) pentru ca puteam folosi foarte bine un "ORDER BY cursa.cnp" .
__________________
The most terrifying thing about the Universe is not that it is hostile but that it is indifferent. If we can come to terms with this indifference and accept the challenges of life within the boundaries of death, our existence as a species can have genuine meaning and fulfilment. However vast the darkness, we must supply our own light.
Stanley Kubrick
 
cyfaws is offline    Reply With Quote
Advertisment
Reply

  Computer Games Forum > Tech > The Workshop > Limbaje de programare

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +2. The time now is 22:33.


Advertisement System V2.5 By   Branden
This site is copyrighted ©1997 - 2008, Computer Games Online SRL