|
Thank u very much for your attention. Your help is very userful for me.![Rose | [Rose]](https://codeproject.freetls.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
include icon of the file-type, application that will be invoked when user run that file-type.
thanks.
|
|
|
|
|
|
|
I'm looking for book recomendations for developing against Active Directory with C#.
I've gone through the DirectoryServices namespace documentation in the MSDN library, but it falls short in covering the directory entry properties, etc... or I just haven't been looking in the right place.
Any good books or web references would be appreciated.
Thanks,
Jim
|
|
|
|
|
Hi, I have been trying to look in the msdn library, but found nothing, maybe because i dont know what i am looking for. If you know how to obtain a list of computers in a domain, it would be helpful if you told me, or told me where to look.
Thanks
|
|
|
|
|
In most cases, you can P/Invoke NetServerEnum in the Network Management API. There's no native way in .NET. You could possibly, however, use classes in the System.Management namespace to query WMI if you have an AD WMI provider. I can't remember off the top of my head if one comes with NT by default or now, or if it even exists. That's really about the only way without P/Invoking anything.
You can also use a slew of AD functions, but that will include P/Invoke functions and redefining structs and constants when needed.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Did you check out the System.DirectoryServices.DirectorySearcher class? Looks like it uses ADSI to do its dirty work. Good luck.
Thank you.
Jeff Varszegi
|
|
|
|
|
How can I make so happen? and how can I contact the "popserver" through my code?
please help...
Sashy
|
|
|
|
|
Check this control out http://www.codeproject.com/internet/cpop3conn.asp?target=email#Retrieve
You might also want to search a bit more on codeproject, as there are lots of pop3 apps.
|
|
|
|
|
Well i am not an very experienced programmer i think i might need to take a look at an application using this. And can I use those principals specified in the artical???..cause I´m not working on a .NET application, but an Windows appl?
thanks for your response! 
|
|
|
|
|
First thing: pick up a book on programming in C#/.NET. You'll definitely need it because this isn't a drag-n-drop solution and real skill is needed.
Second thing: C# (Csharp as you called it) only targets the .NET Framework. If you don't understand this, you're bound for trouble. You should not only read a good book on this but look over the first few topics in the .NET Framework SDK documentation to understand what .NET is.
Programming isn't something you can just jump into with any decency. If you want to learn, start basic. Creating an email application - especially one that uses specifications like POP3 - isn't an easy task. Start simple like just creating a simple Windows Forms application with a toolbar and some controls and make it do something.
CodeProject here offers a lot of articles for newbies and experienced developers alike. These forums are great for asking questions if you don't understand something in the documentation, but you should at least check the documentation first. Being able to research a problem is very important in any field - especially in programming. It's also a good idea to look over the .NET Base Class Library (BCL) to see what's available because there's a lot of things that can help, although nothing will solve your immediately problem directly.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hi,
i want to build a sql statement like following using DateTime field in where clause. but, it return invalid format.
strcmd = "select * from table_1 where datentime = '11/12/2003 17:45:34'";
// where type of 'datentime' is DateTime.
any method to convert a DateTime variable in C# into DateTime field in MSAccess?
thanks,
jim
|
|
|
|
|
AFAIK, you should be able to use the same standard date format as in SQL Server. What about this?
strcmd = "select * from table_1 where datentime = '2003-11-12 17:45:34'";
Thank you.
Jeff Varszegi
|
|
|
|
|
i did not try your format.
but, i have found a keyword to solve it.
take a look at below!
strcmd = "select * from table_1 where datentime = #12/31/2003 17:45:34#";
date format should be in this format, MM/DD/YYYY
thanks,
jim
|
|
|
|
|
Be careful, as Jeff suggested use the ISO date format of YYYY-MM-DD becuase if its run on a machine with different regional settings you may get caught out. If you use the ISO with the year leading in, Access recongnises this correctly. 11/12/03 can be interpeted as Nov 12 on a US machine, but on a UK machine its Dec 11.
Yes for dates you are supposed to use # instead of ' with Access. You can see the query builder add them in for you in Access.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
This is my conn string :-
server=Earth;database=Test;uid=Nish;pwd=nish123
Nish is a SQL server db user I added for the Test database using Enterprise Manager (today is the first I am seeign this weird app)
It says :- Login failed for use Nish; Reason: Not associated with a trusted sql server connection
Damnit that sucks. The sql server is running on this same machine (earth)
I am usiong System.Data.SqlClient.SqlConnection
Nish
Extending MFC Applications with the .NET Framework [NW] (coming soon...)
Summer Love and Some more Cricket [NW] (My first novel)
Shog's review of SLASMC [NW]
This post was made from Trivandrum city, India on a 0.0001 KB/s net connection
|
|
|
|
|
Does adding Integrated Security=false make a difference?
I only ever use Windows Authentication, but according to MSDN
Integrated Security
-or-
Trusted_Connection
'false' When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.
Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true.
Michael
'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
|
|
|
|
|
|
Have you tried this at the command prompt? This solved a similar connection problem on my computer.
osql -E -S (local)\DBNAME -Q "sp_grantlogin 'MACHINENAME\ACCOUNTNAME'"<br />
<br />
osql -E -S (local)\DBNAME -d Pubs -Q "sp_grantdbaccess 'MACHINENAME\ACCOUNTNAME'"<br />
osql -E -S (local)\DBNAME -d Pubs -Q "sp_addrolemember 'db_owner', 'MACHINENAME\ACCOUNTNAME'"
Substitute elements in UPPERCASE with the relevant informantion from your specific case.
Note: Contrary to you, I was using Windows Authentication instead of SQL Server Authentication.
|
|
|
|
|
Nish,
I apologize in advance if anything I say is stupid. I've never used SQL Server with Windows authentication at all.
In Enterprise Manager, go to your server, then Security - Logins. Right-click on the user in question and bring up the properties. Does it look like the user is set up to only use SQL Server authentication? Now, is the Test database set up so that it only accepts trusted Windows-authenticated user connections? Also, is it possible to add the user to the BUILTIN\Administrators group as a troubleshooting step?
Thank you.
Jeff Varszegi
|
|
|
|
|
Try this:
Data Source=Earth; Initial Catalog=Test; User ID=Nish; Password=nish123; Integrated Security=false
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Dear all
in the help you can find the cachedbitmap documented but you could not use it in the code in c# if anybody how can i use it of if there are any way to accelerate the drawing on a control ???
regards
mhmoud
|
|
|
|
|
hi there:
i have a dataset called "Employees", that have two tables "employees"and "jobs",employees have a foreign key called "jobid" that refrence the primary key "jobid" in the "jobs" table and tied together,i have a datagrid that each record of it have columns from "employee" table and have one column called "jobDesc", i write the following function to get the "jobDesc" column from "jobs" table by the foreign "jobid"column in the "emplyee table...........I want to translate this function into method in c#
Public Function BindJob(ByVal o As Object) As String
Dim drv As DataRowView = o
Dim dr As Employees.employeeRow = drv.Row
'Dim dp As Employees.jobsRow = dr.GetParentRow("jobsemployee")
'Return dp.job_desc
' Alternatively, since this is strongly typed:
Return dr.jobsRow.job_desc
End Function
|
|
|
|
|
public String BindJob(Object o){ //forget about ByVal
DataRowView drv = (DataRowView)o;
Employees.employeeRow dr = drv.Row;
return dr.jobsRow.job_desc;
}
|
|
|
|