|
Hi,
I need to change some settings / values of the resource file (ini / XML) that I have added at runtime to my project.
How can I achieve this???
Thanks in advance,
Vaibhav
|
|
|
|
|
how can LogOff the computer in c# ?
can anybody help me ?
H.R
|
|
|
|
|
|
hi,
i just starting using C#, and i am trying to use login box, however when i tried to compile, theres an eror that come out like the title of this thread.
i tried to save my database file in that path, and also tried to make new file in other path, but the same error keeps coming out.
I am lookin forward for your help
Regard,
eQyZ
|
|
|
|
|
It seems the Jet Engine isn't installed on your system.
|
|
|
|
|
Hi
I am just starting c#. I am trying to build login box using c#. However, I got a problem that frustated me a lot
I use microsoft access for my database. and I always get following error Syntax error in string in query expression 'UserName= fds' Password = sdf'.
I have used oledb connection, oledb command, oledbdatareader. I think I have an error in my query in database
here is my querry
------------------------------------------------------------------------------------------
String sqlCommand = "SELECT Username, Password FROM [logindatabase]" +
"WHERE UserName= "+ username +"' Password = "+ password;
-------------------------------------------------------------------------------------------
I am wondering why I got that message.
but overall, the connection string is working successfully only this code make me stuck
I am really lookig forward for your suggestion .Thanks so much.
|
|
|
|
|
A) You left out the apostrophes.
B) You left out the AND.
C) Don't do it that way; use parameters:
cmd.CommandText = "SELECT Username, Password FROM logindatabase WHERE UserName=@username and Password=@password" ;
cmd.Parameters.Add ( "@username" , username ) ;
cmd.Parameters.Add ( "@password" , password ) ;
Access and the Jet Engine will allow named parameters, but they need to be in the same order as in the statement.
D) Why return the username and password? Why not a COUNT(*) or the user's ID or something? Returning a single value with ExecuteScalar is likely to be quicker.
E) I prefer not to use concatenation to split long strings of SQL; I use verbatim strings (note the @):
cmd.CommandText =
@"
SELECT Username
,Password
FROM logindatabase
WHERE UserName=@username
and Password=@password
" ;
And why do so many people use a separate local string variable?
F) Are you storing the plain-text password? I suggest using at least a hash of the password.
|
|
|
|
|
|
From within the project server 2007 event handler when i try creating the MS Project COMponent I get this error. I'm running application on windows 2003 server, using C# on VS2005. I've already configured the security settings of dcom, giving rights to "Network Service" user for launching/activating the MS project component. There is no issue in creating the COMponent if I do so using simple dialogue based application. The error is reported (Retrieving the COM Class factory for COMponent class factory with the CLSID {36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80080005) only if creating from within the Project server event handler, which runs as an exe (Microsoft.Office.Project.Server.Eventing ) under the user "Network Service".
Any help plz
Madni
|
|
|
|
|
|
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello everyone,
Just want to confirm,
1. by default, Http request will use system proxy setting, e.g. the setting in IE;
2. we can use WebRequest.Proxy to overwrite the proxy used for each Http request.
Both are correct?
thanks in advance,
George
|
|
|
|
|
correct
|
|
|
|
|
Thanks for review and confirmation, jkersch!
I am new to this topic.
regards,
George
|
|
|
|
|
Hello everyone,
For the namespace defined for WCF, e.g.
http://msdn.microsoft.com/en-us/library/ms731835.aspx
[ServiceContract(Namespace = "http://Microsoft.ServiceModel.Samples")]
my question is, what is it usage for developer? The only usage I found is used by the proxy class generated by meta data, and transparent to developer. When do we need to deal with namespace?
thanks in advance,
George
|
|
|
|
|
well, at least in my company, we use namespaces e.g. for versioning.
for example:
[ServiceContract(Namespace = "http://www.mycompany.com/product/2007/12")]
and
[ServiceContract(Namespace = "http://www.mycompany.com/product/2008/08")]
notice the difference? at least for us this eases versioning.
but i guess this is just one reason for using namespaces
|
|
|
|
|
Thanks jkersch,
But even if they are of different namespaces, the client of WCF does not need namespace information to access, just need endpoint address, correct? My question is, does the client of WCF needs to use the namespace?
regards,
George
|
|
|
|
|
hi george,
well...i guess this depends on your scenario. if you just want to simply consume a webservice, you probably won't need adding namespaces to your servicecontracts.
but if things get larger, complexer, ... i guess it's doesn't harm starting to add namespaces to you services, but as i said, if you're in a simple scenario, your clients probably don't care about namespaces at all.
regards
j.
|
|
|
|
|
Thanks jkersch,
I agree with your comments. But from WCF client point of view, there is no need to provide namespace information of the service, only endpoint information is fine. Agree?
So, my confusion is how could WCF client use namespace?
regards,
George
|
|
|
|
|
well, if you ask how you could retrieve the service namespace from withing the client, thats not very complicated. your service proxy has an Endpoint property that contains information about the service endpoint. there you can find a contract-property that contains (with some other information) the namespace.
it's up to you wheter you can use the service namespace in the client, but i guess in most cases where you just simply want to communicate with a service, do some stuff and disconnect after it, you don't have to bother with namespace on the client side.
But at least there is the possibility to use it (like most of the stuff in WCF, hardly anyone will ever use ALL of its features
regards
j.
|
|
|
|
|
Thanks jkersch,
1.
My question is, I have read through here,
http://msdn.microsoft.com/en-us/library/ms733133.aspx[^]
but it does not contain any description about how to use namespace information of the remote WCF service, do you have any samples or documents to refer to me about how to utilize namespace from client side?
2.
How namespace information is used at server side?
regards,
George
|
|
|
|
|
Hi,
How can set focus to one particular row in the DataGridView?
(I want to trigger a event like button_click or whatever)
What is the propriety for that?
nelsonpaixao@yahoo.com.br
|
|
|
|
|
Hi nelsonpaixao,
You may try this - YourDataGridView.Rows[rowindex].Selected = true .
Hope this help.
regards
cocoonwls
|
|
|
|
|
thanks i will chect that
nelsonpaixao@yahoo.com.br
|
|
|
|
|
Tonight I came accross an issue when using a Find method on a collection where I needed to idealy null test an item in the collection. The problem was the collection was a List of struct - and structs can't be null!
I got round it by testing a property in the struct (which was a class so null was possible).
I 'googled' and found this[^] interesting solution. Just wondered what the experts here thought about it?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|