|
How do I detect whether the machine is joined to an Active Directory domain (versus in Workgroup mode)?
Started by DSO on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Even better:
System.DirectoryServices.ActiveDirectory.Domain.GetComputerDomain()
Throws an ActiveDirectoryObjectNotFoundException if the machine is not....
Such as NetGetDcName which will return a null/empty string for a non domain-joined machine.
|
|
Hi,
Let's say we have
SELECT * FROM A INNER JOIN B ON [....]
Assuming A has 2 rows and B contains 1M rows including 2 rows linked to A :
B will be scanned only once with "actual # of rows" of 2 right?
If I add a WHERE on table B :
SELECT * FROM A INNER...
Started by Mike Gleason jr Couturier on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Or if your statistics are bad so it doesn't know that the join filter would pare B down to just two rows, it would do the WHERE table, then a read of the temporary....
Is indexed but the join column is not, it will likely do the xyz filter first.
|
|
I've had a look around on StackOverlow but haven't been able to find a definitive answer on this.
Below I have a code snippet of what I currently have, and I will explain what I am trying to achieve.
Table<Gallery> galleries = pdc.GetTable<Gallery...
Started by Robsimm on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In galleries join image in images on gallery.id equals image.galleryid into joinedimages join comment.
|
Ask your Facebook Friends
|
I have 2 large mysql tables: Articles and ArticleTopics. I want to query the DB and retrieve the last 30 articles published for a given topicID. My current query is rather slow. Any ideas on how to improve it?
More details: The tables:
Articles (~1 million...
Started by Mike A. on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Or:
SELECT a.articleId, a.pubDate FROM Articles a INNER JOIN ArticleTopics t ON t.articleId.
|
|
I have two tables that are joined together.
A has many B
Normally you would do:
select * from a,b where b.a_id = a.id
To get all of the records from a that has a record in b.
How do I get just the records in a that does not have anything in b?
Started by Sixty4Bit on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
You will probably get a lot better performance....
Select a.* from a left outer join b on a.id = b.a_id where b.a_id is null
select * from a where id not in (select a_id from b)
select * from a left outer join b on a.id = b.a_id where b.a_id.
|
|
I'm trying to map a joined-subclass scenario using Fluent NHibernate. I have a class Entity defined in the namespace Core, and a class SubClass : Entity in the namespace SomeModule
Now I obviously don't want class Entity to know about its derived types...
Started by Prise on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
A different id to the value the base and subclass join on, otherwise you'd start to see this_ inner join Entity this_1 on this_.Id=this_1.Id.
|
|
I'd like to return an object with the following signature
class AnonClass{ string Name {get;} IEnumerable<Group> Groups {get;} }
I have tried the following query, but g only returns a single entity, not all the joined entities
var q = from t in ...
Started by mcintyre321 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I think you want "join into" instead of just "join":
var q = from t in dc.Themes join g.
|
|
I have 2 tables, a "document" table and a "content" table. They look like this (simplified):
document table: docID docTitle content table: contentID docID dateAdded content
For every content change, a new record is inserted into the "content" table. This...
Started by Jon Tackabury on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Could you not just do a simple join, and order by date added, and grab only the first record?
SELECT docTable.docId, docTable.docTitle from docTable INNER JOIN content ON content.docID:
select [TblDocument].* from [TblDocument] inner ....
|
|
I have two tables joined together with entities like this (entities anonymized, and trimmed of irrelevant properties):
Email - Email_ID - Title - Body (hibernate uses a Body_ID field here)
Body - Body_ID - Body_Text
I'd like to retrieve all Email entries...
Started by jsight on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Assuming you have an Email object with a @OneToOne or @ManyToOne to Body:
select e from Email as e where e.body is null
assuming email can have only one body:
from Email e where e.body is null .
|
|
For some reason, ldap and directory services does not work when the computer is not joined to the domain. The error messages from .net is domain not available. Anyone know what needs to be done?
the basic...
domainAndUsername = domain + @"\" + username...
Started by Michael Evanchik on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This code....
It means a ActiveDirectory Domain.
Note that domain does not mean a domain name from the domain name system .
So you need to add the machine to an Domain or explicitly supply the domain controller .
Directory services rely on an ActiveDirectory.
|