|
This is a known problem/effect, and there is a Microsoft article about that you can probably find if you look for it. There is also a previous thread about it here on CP.
If you create a file with the same name as a previously deleted file, it will get the same creation date as the previous file.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Does this mean if someone uninstalls my program and reinstalls it, it will have the old creation date ? That's helpful to know for doing trial licensing and so on.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Please can you help me.
I've got an application that's a diary and contains 4 text boxes, and a Month Calendar. I've worked it so that I add an entry and save the details to the table. No probs. I've got a DIARYID, FKOWNERID and FKPONYID.
The problem I've got is where the Owner has 2 ponies. When they select the 2nd pony then the Diary loads the 1st ponies details. It is not going through the binding source at all.
The code I'm using is below:
Imports System.Data.SqlClient
Public Class SOCIALDIARY
Dim AddNewEntry As Boolean = False
Dim DeleteNewEntry As Boolean = False
Public Sub PonysDiaryLoad()
Dim i As Integer = 0
Hallofrm.MYOWNERBindingNavigator.BindingSource = Me.MYPONYSDIARYBindingSource
Me.MYPONYSDIARYTableAdapter.FillByPony(Me.Database1DataSet.MYPONYSDIARY, CurrentPonysId)
Hallofrm.btnClosePony.Visible = False
If Me.Database1DataSet.MYPONYSDIARY.Rows.Count > 0 Then
CurrentDiaryID = Me.Database1DataSet.MYPONYSDIARY.Rows(Me.MYPONYSDIARYBindingSource.Position).Item("DIARYID")
Dim DiaryDates(Me.Database1DataSet.MYPONYSDIARY.Count - 1) As DateTime
For Each dr As DataRow In Me.Database1DataSet.MYPONYSDIARY.Rows
DiaryDates(i) = dr("DiaryDate")
i += 1
Next
MonthCalendar1.BoldedDates = DiaryDates
End If
lblDiaryId.Text = CurrentDiaryID
lblPonyID.Text = CurrentPonysId
End Sub
Any advise would be greatly appreciated.
Thanks:
Kris MCP
modified on Thursday, February 21, 2008 9:44 AM
|
|
|
|
|
I'm working in a project for blind people.
Every windows OS has it's own text to speech engine and voice, this voice is the awfull MICROSOFT SAM voice. It can be ok if you are English and you have no ears, but for foreign languages it is useless and blind people have very sensitive ears...
Appart from the discussion we should have about why if I buy and pay an OS in Spanish I do have to deal with an English voice I wonder if one of you, CODE GURUS, should be able to make a small installer masterpiece that will replace the old MICROSOFT voice with another nicer and from desired language. For blind people it is hard to configure windows, so the nicest thing is to have an app that changes the features by itself, so after executed, the default voice should be the new one...
Normally, if you want to add a new voice, forums said that you need folowing files:
msagent.exe
agtx0c0a.exe
lhttsspe.exe
spchcpl.exe
I have installed all of them and nothing happened...
You can download them from here:
http://www.telecable.es/personales/jrubi/index.htm?trucos/tip00225.htm
Maybe there's already a similar app, any tips will be wellcome !!
|
|
|
|
|
I can't beleive nobody can help with this.
I have already an installer with all the required files embeded on it, the only thing I need is an app that changes the windows registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech to the new speech voice. At least give me some hints on how to do it, because do it manually is quite difficult for someone dissabled.
|
|
|
|
|
Okay Q, a few tips:
1. the amount of participants on this forum who do not work for Mickeysoft is much larger than the amount of people who do, and even the ones who do, probably have nothing to do with your friend SAM. Even if you are frustrated about something not working out, you're really going to kill your chances of getting help by suggesting that anybody here is responsible for your problems, and that they should help you. Angry rambling will get you nowhere.
2. guilt trips may have helped you get things done in the real world, but this is the internet (100 stories and 1000 lies), we will just have to take your word for it that you are helping disabled people, instead of writing a virus.
3. ask an actual question, as suggested in the very first post on this forum. You are much more likely to get a helpful answer. People here will try and help you solve your problem, they will hardly ever just hand over ready solutions to vague problem descriptions.
4. you are apparently competent enough to find solutions on the web. You prove this with your own answer to your first post. You made it onto this forum, so supposedly you know some programming. If you type your question in Google, you will find loads of articles on how to write a small app that will make the necessary changes in the registry, for example: http://vbcity.com/forums/faq.asp?fid=30&cat=Registry[^]
it isn't all that hard. If you think this is, you need to buy yourself a book on programming and learn, or else you need to hire someone to write the program for you.
I am sorry if my answer pisses you off, and I do wish you good luck solving your problems.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Well, actually it is true that I'm working for dissabled people at the moment, and your thoughts and escepticism, even though they are reasonable, they show the kind of person you are.
I'm not rambling angry, this is your own understanding of my lines. For you it looks like I'm trying to make you responsible of my problems, that only shows again the kind of person you are. I was just trying to encourage you.
I don't think it is necessary to mention dissabled people to get some help on the Internet, fortunately, there are a million people clicking around that will help without any use of guiltyness.
Yeah, you pissed me off, do you know why?
Because you came here making serious acusations without even knowing a single thing about me.
If you have a solution or an answer, you can just drop it and keep your sick thoughts for yourself and your toilet time, you don't need to prove how smart you are and neither need to make me read those awful lines just to give me this tip. I know what is Internet, thank you for the advice.
Thank you too for your link, even though it is not only a question of changing registry, but more extense.
But you are right, I did not explain myself pretty well and I was in the wrong forum too.
I wont come back, so keep your energy and don't answer me back.
|
|
|
|
|
When I ran the debugger I get an error that says that it can't find this column in the database. I know the column exists.
Does anyone know why?
Dim dcDay As New DataColumn("Day of Week", GetType(String), "lpDataSet.tbl_teach_sched.ts_dayColumn")
modified on Wednesday, February 20, 2008 12:57 PM
|
|
|
|
|
It can't find the column because the expression you supplied isn't valid. You shouldn't be specifying DataSet names and tables in it. All it needs is column names or some expression that assumes the correct table.
|
|
|
|
|
I did not have option strict on and when I ran the debugger I got an error message that said conversion from DBNull to Date is invalid. I checked my database and I do not have any NULL's in the database at all.
Why am I getting this error?
Then I turned option strict on and I get errors that say implicit conversion from type object to either date, Integer or string are not valid.
Dim dr As DataRow<br />
Dim intDay As Integer<br />
Dim intDays As Integer<br />
Dim intStudID As Integer<br />
Dim intLessID As Integer<br />
Dim startTime As DateTime<br />
Dim endTime As DateTime<br />
Dim lessTime As DateTime<br />
Dim foundRows() As Data.DataRow
Here is the code that is underlined with option strict on.
intDay = dr("ts_day")<br />
startTime = dr("ts_from")<br />
endTime = dr("ts_to")<br />
intStudID = foundRows(0)("stud_id")<br />
intLessID = foundRows(0)("less_id")<br />
lessTime = foundRows(0)("less_time")<br />
intDays = foundRows(0)("less_day") - 1<br />
' This is at the end of the loop to increment the start time<br />
startTime += startTime.Add(timeInterval)
To use option strict on how should I do this? The dataRows hold information from the database.
|
|
|
|
|
You're getting the errors because you're not explicitly converting the values returned by the DataReader to the appropriate types. You're still relying on implicit conversions. All of your "dr(something) expressions return an Object, not an Interger or String or DateTime. You have to explicitly convert those Objects to the appropriate types:
intDay = Convert.ToInt32(dr("ts_day"))
|
|
|
|
|
When I declare startTime I declare it as a DateTime. Also timeInterval is declared as a timespan. Why does this give me an error that it can't convert from date to string?
startTime += startTime.Add(timeInterval)
|
|
|
|
|
Don't know. There isn't enough information to tell. Possibly, your datetime is stored in the database as a string??
|
|
|
|
|
I created a UDT named time from dateTime. The database stores both the time and the date 1/1/1900. Then with the following code I convert it to dateTime because the info is in a dataRow. Does this help?
startTime = Convert.ToDateTime(dr("ts_from"))
|
|
|
|
|
AAGTHosting wrote: The database stores both the time and the date 1/1/1900. Then with the following code I convert it to dateTime because the info is in a dataRow. Does this help?
None of this makes any sense, so no.
You created your own datatype, inheriting from DateTime?? May I ask why and what the implementation looks like?
|
|
|
|
|
The code is equivalent to:
startTime = startTime + startTime.Add(timeInterval)
As you see, you are trying to add two DateTime values. There is no operator overload for the addition operator that does that, so the compiler tries to convert the values to types that can be added. The only conversion that gives data types that can be added, is converting them to String s. Therefore the compiler assumes that you are trying to do this:
startTime = startTime.ToString() + startTime.Add(timeInterval).ToString()
However, as you are using Option Strict On , implicit conversions from DateTime to String is not allowed.
The statement is illogical. Is it not this that you are trying to do really?
startTime = startTime.Add(timeInterval)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Good evening All
I have found a new job and they want me to Stop vb.net and move to C#. well i have done C++ and Java in my Academic days and never used it again, and now that Pain world comes in again. i have never used C# , in VB.net we drop controls to the forms and start code behind the Control using different Events, in C++ its a Pain to Create a Form in old Java JDK 1.2 its realy a pain to design a Form, because you had to align the Controls in the pane. So what i want to know is that , If C# is a .NET language, do you still Drop a Control and Code its Event ? or its still a Pain of Creating UI ? and a lot or Arrays declaration, Threads ?, Cant i design my logics in vb.net and Allow a C# developer to Access those Logics ? cant we be on the same team but using different languages? is vb.net going to Die? What is it, that is in C# that we cannot do in vb.net? Cant vb.net do handle security ? are they not .NET languages ? on the Same PlatForm? is there a realy a need to move from vb.net to C#?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Writing forms etc, in VB.net or C# is more or less the same. The syntax in C# pushes you to write slightly neater code, to my mind, but essentially there is no difference.
|
|
|
|
|
The reason to move is simply that you cannot write an application in mixed languages. So, you have to conform to your team. The differences are mostly just syntax, everything else works the same. I don't use VB.NET ( I hate it ), but I answer questions here all the time, because my knowledge of C# translates easily to vB. I just hate the syntax.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Vuyiswa wrote: I have found a new job and they want me to Stop vb.net and move to C#.
Good for you.
Vuyiswa wrote: If C# is a .NET language, do you still Drop a Control and Code its Event ?
Yes, you actually use the same designer as with VB.NET. It's just the language in the code file that differs.
Vuyiswa wrote: Cant i design my logics in vb.net and Allow a C# developer to Access those Logics ?
If you work in separate projects, it would be possible to use different languages, but I wouldn't recommend it. I don't think that your boss wants code in different languages, code maintenence is hard enough as it is.
Vuyiswa wrote: is vb.net going to Die?
Sadly, no.
Vuyiswa wrote: What is it, that is in C# that we cannot do in vb.net?
Actually very little, as they use the same framework.
Don't fear the C#. It's actually a quite nice language. If in the end you find that you still like VB.NET better, you will have gained a better understanding of the framework and programming in general, so you will have become a better VB.NET programmer also.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks guys for Advice
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I'm looking at someone else's code and noticed that they have placed a Dim statement inside a loop. What is the impact of doing such a thing ?
I'm used to declaring all of my variables at the top of a function/procedure and not anywhere else in the code. (Just my preference - Old school)
Here is a snipet of code:
For i as Integer = 0 to ref.Length - 1
DIM STAT AS INTEGER
< ... lines of code removed..>
STAT = Cint(ObjProperty("STATUSIND","FORMULA",ref(i)))
<... lines of code removed ...>
next
Thanks,
david
|
|
|
|
|
There is no performance hit. It's actually faster than if you put "STAT = 0" in the same spot and put the Dim outside the loop.
|
|
|
|
|
I am more concerned that by having a "Dim" statement inside a loop that it would cause some excessing memory usage or potentially a memory leak. Initially, I wasn't concerned about performance. Thank you for your quick response.
|
|
|
|
|
Dave Kreskowiak wrote: It's actually faster than if you put "STAT = 0" in the same spot and put the Dim outside the loop.
You are comparing code that is not equivalent. The variable is initalised to zero only once, regardless of where in the code it's declared. Where the Dim statement is placed only affects the scope of the variable, the generated code is exactly the same regardless if the variable is declared inside or outside the loop.
Example:
Dim s As String = String.Empty
For i As Integer = 1 To 5
Dim x As Integer
If i = 3 Then x = 1
Console.WriteLine("{0}: {1}", i, x)
Next
The output:
1: 0
2: 0
3: 1
4: 1
5: 1
As you see, the variable x is initialised to zero eventhough it's not assigned any value until the third iteration in the loop. Once it's assigned a new value, it retains the value for the remaining iterations, demonstrating that the variable is never re-initialised.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|