|
Unfortunately, any:
0<br />
10<br />
105.91<br />
NaN (I won't to write it in real application)
Sincerely
AW
|
|
|
|
|
DataRow[idx] fails as well
DataRow.ItemArray[idx] works
Sincerely
AW
|
|
|
|
|
Could it be that the data in "fieldname" could be null? If so, you could try this:
protected object getField(string FieldName)
{
if (m_row != null)
{
object retval = m_row[FieldName];
if (retval != null && retval != System.DBNull.Value)
{
return retval;
}
else
{
return ;
}
}
else
{
return null;
}
}
Jim Stewart
|
|
|
|
|
My data couldn't be null. Thanks
Hi,
AW
|
|
|
|
|
the following code is a shortend but same version that is in my program. the problem is i want to open wordpad with the command args of a directory so it opens that file on start up. The directory comes from the string FileName in the following code. the problem is FileName contains spaces "in this case My New Text.txt" and the wordpad program will only reconize My beacause it stops at the space's. how can i send word pad the Literal version of the directory string FileName
Jesse M
Code Snippet:
<br />
private void ShortendVoid(string FileName){<br />
System.Diagnostics.Process process = new System.Diagnostics.Process();<br />
System.Diagnostics.ProcessStartInfo pStart = new System.Diagnostics.ProcessStartInfo(); <br />
pStart.FileName = @"C:\Program Files\Windows NT\Accessories\wordpad.exe";<br />
<br />
pStart.Arguments = Path.GetFullPath(FileName); <br />
process.StartInfo = pStart;<br />
process.Start(); <br />
Application.Exit();<br />
}<br />
The Code Project Is Your Friend...
|
|
|
|
|
Hi Jesse,
Amend this line
jtmtv18 wrote:
pStart.Arguments = Path.GetFullPath(FileName);
as
pStart.Arguments = "\"" +Path.GetFullPath(FileName) +"\"";
N.B.: Quite interestingly, notepad is able to recognize paths and filenames with embedded spaces, but WordPad is not able to. I am using Windows XP Professional.
|
|
|
|
|
thanks alot =)...i had no clue...thats all there was to it then huh ?
The Code Project Is Your Friend...
|
|
|
|
|
Is there anyone help me?
I'm looking for How can I find MS-SQL Server List in same area network.
When I user MS SQL Query Analyzer, it gives me the available Server List.
I want to develop just like that with C#.
Thanks a lot.
|
|
|
|
|
|
|
http://www.codeproject.com/csharp/ServerComboBox.asp[^]
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Thanks for your help..
But,
It doesn't work Windows 98....
Unfortunately, I need a help how to run on Windows 98....
If you know any other solution. Plz.. Let me know.
Thanks anyway..
|
|
|
|
|
I use this function to encrypt my password to store them in database:
UnicodeEncoding encoding = new UnicodeEncoding();
byte[] hashBytes = encoding.GetBytes( mystringpassword );
SHA1 sha1 = new SHA1CryptoServiceProvider();
byte[] cryptPassword = sha1.ComputeHash ( hashBytes );
return cryptPassword;
now how can I get string format from binary password that I stored in database?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
like this:
mystringpassword = BitConverter.ToString( hashBytes );
|
|
|
|
|
Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Sorry,I have problem with that.It gives me password like this:
FA-1D-95-84-5B-D6-8D-61-4C-29-8A-1F-E5-4F-72-31-72-41-26-5B-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
!!!!!!!
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Ok then, a couple of options spring to mind:
1) use a loop to convert each byte to a char and append it to a string, e.g.:
<br />
string mtstringpassword = String.Empty<br />
foreach(byte b in hashBytes)<br />
{ mystringpassword += (char)b; }<br />
2) Use base64 encoding to store the hashed password in a "safe" string format and then decode it when needed, or simply compare it to a hashed & base64 encoded pwd when authenticating, e.g:
<br />
string base64HashedPassword = Convert.ToBase64String(hashBytes);<br />
byte[] hashBytes = Convert.FromBase64String(base64HashedPassword);<br />
|
|
|
|
|
Sorry,Do you mean this:
string base64HashedPassword = Convert.ToBase64String(mypasswordin bytes);
byte[] hashBytes = Convert.FromBase64String(base64HashedPassword);
string mystringpassword = String.Empty;
foreach(byte b in hashBytes)
{ mystringpassword += (char)b; }
But it gives me some meaningless characters,even if I write only second paragraph,the results are the same.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Either 1 OR 2 - I gave you two different options, don't mix them together now
|
|
|
|
|
Mazdak wrote:
t it gives me some meaningless characters
That's the idea of Hashing a passhrase - once hashed you can never get your original password back.
|
|
|
|
|
Just hash the entered password the same way and compare it against the version in the database.
|
|
|
|
|
Sorry could you give ore details or code? Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Well it depends on what you are after but the most common way of handling passwords in databases is to first use a hash algorithmn to hash the password and store it in a database.
When you need to compare a password with the one in the database (such as when a user is logging in) you do the following:
1. Hash the user entered password using the same algorithmn as above.
2. Get the hashed correct password from the database and compare against the user entered password.
3. If they match then the entered password is correct, otherwise the entered password is incorrect.
A hash is a way of uniquely identifing an object, however you cannot retrieve the object from the hash value. Therefore applying a hash to an object is one-way.
You shouldn't really ever need to display someone's password as clear text.
|
|
|
|
|
I have a collection that contains Row objects. One of the classes derived from Row has its own collection of Row objects (called GroupRow ).
Now. If i specify the row number of 10, it may not be in the original collection, but could be part of the GroupRow objects collection..or better still, one of the rows in the grouprow objects collection could be a group object and its in there....to an infinite extent.
My problem is, i need to be able to get the row - no matter how many groups i have to go through to get it - only i cant work out how im supposed to do this...any ideas?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
This sounds like a heirarchy problem - can you provide an example of how you have setup the RowsCollection class?
|
|
|
|