Jump to content
Xtreme .Net Talk

ramCC

Members
  • Posts

    9
  • Joined

  • Last visited

ramCC's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Nerseus ! I found the problem with this code, and it had nothing to do with DateTime object or the ToString function. The problem was the use of Concat ... I used: line = line->Concat(i_logEntry); instead of: line = String::Concat(line, i_logEntry); My common sense told me it will yield the same result, but I guess my common sense has no place in this world ... Thanks a lot anyways Ram.
  2. Hey Nerseus, thanks for your reply ! I am using the object further down, so I guess its not a compiler issue. the relevant function is: void txMgr::AddLogEntry(String *i_logEntry, Char i_warnning[], Char i_error[]) { String *line = DateTime::Now.ToString(L"dd/MM/yyyy HH:mm:ss", DateTimeFormatInfo::InvariantInfo); line = line->Concat(i_logEntry); if(line->Length > 255) line = line->Substring(0,255); m_logFile->WriteLine(line); m_logFile->Flush(); } The strange thing is that on my log file (m_logFile) on some cases I do see the date prefix and on other cases I dont (only the i_logEntry). On debugging I see that nothing comes back from DateTime::Now.ToString() even though I do see the Now object (when doing "DateTime now = DateTime::Now") . Maybe there is a problem with the ToString ? I have no idea ...
  3. Anybody with a clue on why this code (man c++): String *myTime = DateTime::Now.ToString(L"dd/MM/yyyy HH:mm:ss", DateTimeFormatInfo::InvariantInfo); sometimes facilitate 'myTime' with the correct time , and sometimes just stayed <undefined> (NULL) . Thanks.
  4. Hi all, I want to open a status file for both reading and writing. (Managed C++ or C#) I need to read a line, and than according to some logic change 1 char in the middle of it. (status) I know that I can use FileStream for read and write. but FileStream does not give me the option to read a whole line... I can go the hard way and read char by char until I get to a newline sign, for reading 1 full line from the file. But I'm sure that there is some way for me to be able to read a whole line , and do some manipulations on it. I also need to be able to scan the file with a file pointer so I will be able to change this 1 char I was talking about. Thanks for any help!
  5. PlausiblyDamp, appreciate your help ! It worked just fine for me ! Thanks, Ram.
  6. Thanks alot ! I will try that as soon as i can !
  7. sure ! http://server11/index.asp?FunctionName=miko^hagever&from_date=06/01/04 Thanks.
  8. Hello !!! anybody home ?
  9. Hi all ! I found out that the call to: WebRequest::Create(URL) , change the special symbols in URL (such as ^ and $) to their hexa equivalent (like %5E etc.) . Do you know of a way to stop that (sometimes) unwanted behaviour ? I'm connecting to a purely written web server that does not decode the %5E form back to ^ .... so i have to find a way to send it as is ! b.t.w when i paste the url on IE it works fine . (maybe it does not encode the URL ? ) thanks for all helpers ! and also for those who wanna help but dont know how :)
×
×
  • Create New...