|
Wow Thanks man
its So Easy.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
One more thing , how to i tell the Compiler the location of the File?, should i use the Path ? like
Process.Start("C:\ConsoleAppName.exe")
?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Thank you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi all,
i m creating directory structure (mean which contain subdirectory & other files). Everything is working well except one thing. In 40% case i get error -Access to the Path "Some Path & "\*.txt" is denied.
Here one thing, that i want to explain is that on every run, i select same folder
any body have idea where i am wrong ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Are your permissions set right?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
hi ponard,
i already specify that some time code works well but sometime not. Each time i select same path.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Can you please show the exact statement(s) that fail? and the exact error message?
are the difficult files freshly created by your app?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi luc .following is the code that i use
Private Sub CreateTextFile(ByVal Filepath As String, ByVal data As String)<br />
Dim oFile As System.IO.File<br />
Dim oWrite As System.IO.StreamWriter<br />
Dim oRead As System.IO.StreamReader<br />
Dim PreviousData As String = ""<br />
Dim CheckHypen As String<br />
<br />
If File.Exists(Filepath) Then<br />
oRead = oFile.OpenText(Filepath)<br />
While oRead.Peek <> -1<br />
If PreviousData = "" Then<br />
PreviousData = oRead.ReadLine()<br />
Else<br />
CheckHypen = oRead.ReadLine<br />
If CheckHypen <> "-" Then ' if file already exist then remove hypen from file. Hypen is last character of File<br />
PreviousData = PreviousData & ControlChars.NewLine & CheckHypen<br />
End If<br />
End If<br />
End While<br />
oRead.Close()<br />
End If<br />
oWrite = oFile.CreateText(Filepath)<br />
<br />
If PreviousData = "" Then<br />
PreviousData = data<br />
oWrite.WriteLine(PreviousData)<br />
Else<br />
PreviousData = PreviousData & ControlChars.NewLine & data<br />
oWrite.WriteLine(PreviousData)<br />
End If<br />
oWrite.Close()<br />
oFile.Delete(Filepath)<br />
PreviousData = PreviousData & ControlChars.NewLine & "-"<br />
oFile.AppendAllText(Filepath, PreviousData, System.Text.Encoding.Unicode)<br />
End Sub<br />
have any idea where i am wrong ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
So I guess your app just created this/these file(s) and now wants to delete them?
This is my standard answer for renaming/deleting new files:
if you want write or delete access (anything other than read access) to a file
that just got created (by yourself or someone else, does not matter),
chances are you will find the file is being accessed by some other process,
and your access is not granted.
The other process very likely is some server code that is there to assist you
somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so
they can inspect them.
Microsoft is aware of the consequences; Windows Explorer will try rename and
delete attempts up to five times (with one-second interval), and only reports
failure if the action continues to fail for that time.
The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi
i am having a webpage (developed in asp using vbscript) in it i have one hyperlink button when i click on that button file starts downloading from my system with that file name.its working fine, but now i want to download the file from another system which is connected to my system(say MS01 is another system name ) through LAN. can anybody send me the source code for this task.
|
|
|
|
|
sunilwise wrote: i am having a webpage (developed in asp using vbscript) in it i have one hyperlink button when i click on that button file starts downloading from my system with that file name.its working fine, but now i want to download the file from another system which is connected to my system(say MS01 is another system name ) through LAN. can anybody send me the source code for this task.
You could create a virtual directory inside your project, and set the directory for it to the network location on the other machine. You would just have to make sure that your domain user has read access to the folder on the other machine.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
It is posible to load local file from client to variable in active scripts like js or vbs.
But it is requires special permitions for web site. (full-trus in IE).
|
|
|
|
|
How can i blank out a column in a datagridview which is a datetime picker type column.
Sekhar
|
|
|
|
|
Hi folks,
I must create a module in a project I'm in, that concerns of transferring data from one host to any given one, in a given protocol. For now, used protocols are FTP and NetBIOS (windows folder sharing). For FTP I'm OK, but I don't know if in NetBIOS there is a better way than mapping a drive via the console command "net use x: blah blah blah", that is not much failure-compliant (I don't know if remote host is up and ready).
Hope it's clear.
Thanks in advance
Morenz
|
|
|
|
|
It would be nice to have a place just for VB6. Not everyone is "born again" C++ or VB.NET..... There is still a lot of life left in VB6 in spite of attempts to exterminate it. Here we use VB6 as a fast concept test platform before desiding what platform to use for the final product. Other platforms are not as fast to 'throw togeather' a quick proof of concept demo in order to get initial funding. Access to other VB6 users in simular circumstances was the primary reason that I signed on to the code project. We are offended when it is sugested that VB6 users should be "brought into the fold of VB.NET". VB6 is used for a reason just like C++, ASP.NET, VB.NET and others have their uses. Only monosylibic programers lack the diversity to expect everyone to "convert" to their platform. Broad experience allows one to know which platform is best suited for any given application. Diversity is key to being able to compete effectivly, just look at microsoft. "When you find yourself in a hole, Stop digging" (author unknown). They keep potting out crap code. Just don't throw away any tools just because you aren't familiar with them. How many of you can do assembly? The point is to learn as much as possible. Thank you.
Poly-programmer
|
|
|
|
|
lies..only those who are resistant to change, fearful of progression, or afraid of learning new, more powerful and overall superior concepts seem to think in this non-progressive backward ideal.
If your gonna try and start a counter-culture, i think you have little hope. Most people in these forums started with vb6...yet have made the transition to a better product. Microsoft does upgrade its software for more than profit. It upgrades its frameworks and developement tools because developement exists in such a way that old tools eventually become too old to be adapted to new tasks. You can't drive in a screw in with a stone tool (and please don't get pedantic and extend this analogy). Hence, progression is a necessary thing. It is as natural as evolution. It is those who refuse to "convert", as you so resistantly phrased it, that hold back the industry and wonder why they no longer understand who to provide solutions they understood how to a few years back, yet the syntax is still derived from the same language.
Besides that, VB6 was a mess, thrown together out of bits of other languages, held together by toothpicks, strin and blue tack which we know as the VB6 syntax. VB.Net is much more adept at handling so many more things than VB6...sure some things may seem foreign and more complex, but it is this complexity that allows expansion.
It is equivocal to C# in its power and, some would argue, easier to use, especially for readability and new users. Do yourself a favour and make the move, you won't regret it. Do the industry a favour and stop trying to create a counter-culture. No-one gains anything through anti-progressionism.
Polyphonic wrote: We are offended when it is sugested that VB6 users should be "brought into the fold of VB.NET".
Sorry if you get offended, but most people on this side of the metaphoric line don't know why they stuck with VB6 for so long.
Polyphonic wrote: There is still a lot of life left in VB6
Is that why microsoft doesn't support it anymore?
Polyphonic wrote: Just don't throw away any tools just because you aren't familiar with them
This is an invalid argument, why would you own tools you aren't familiar with.
Polyphonic wrote: Other platforms are not as fast to 'throw togeather' a quick proof of concept demo in order to get initial funding
Disagree. Once you gain a better understanding of VB.Net, i belive you can 'throw' something together in the same time and include more features.
Despite all this, this really isn't the place to have this argument, there is a suggestions forum, pitch it there, but i guarantee that if there is a seperate forum, it will only be one tenth as populated as this one. But VB.Net programmers would be glad to stop hearing about VB6 questions.
Sorry if some of this comes across aggressive, i really don't mean it, i'm adamently pro VB.Net and am willing to admit that there is inherent bias in this.
|
|
|
|
|
You sure put someone in their place. I recall that VB6 was also touted as being more powerful and possesed overall superior concepts as well. Granted that was in VB6's heyday. Some people, and we all are in some form of minority, still like to squeeze every bit sic) out of older information. Who knows there might be something to be learned.
Reguarding support from microsoft: They rarely do anything that dosen't PUSH people into a direction that greatly benefits the microsoft world idea. Mind you it is great that Bill has found a way to impose his world view through software. Not everyone has to follow behind him in lock step. Perhaps the old idea of fair competition should be forgotten. After all isn't the (insert platform name here) platform perfect and totally bug free, virus proof and crash resistant?
We do use VB.Net, C++ and others (even Assembly) but we also use VB6 it has uses.
The point is we are all on a "ladder" don't kick those below you or you might just get kicked by those above you.
Polyphonic
|
|
|
|
|
This is not the place for this crap. Perhaps you're looking for the Soapbox[^].
Polyphonic wrote: "When you find yourself in a hole, Stop digging" (author unknown).
Hence, I stopped using VB6 and switched to VB.NET. What a relief that was!
Polyphonic wrote: There is still a lot of life left in VB6
You just keep right on telling yourself that. I, on other hand, can see the writing on the wall...
|
|
|
|
|
Ohhh the young (less experenced) are so inclined to reinvent the wheel. Wait until you have a few decades of diverse experience under your belt and then see if you are so quick to 'toss' out the old for the new. By the way we also use VB.Net, C++, Unix and others when it is apropriate.
Polyphonic
|
|
|
|
|
Polyphonic wrote: Ohhh the young (less experenced) are so inclined to reinvent the wheel. Wait until you have a few decades of diverse experience under your belt and then see if you are so quick to 'toss' out the old for the new.
Does 32 years of programming/developing/support count?
|
|
|
|
|
You should be starting to understand it soon!
Polyprogrammer
|
|
|
|
|
Polyphonic wrote: Other platforms are not as fast to 'throw togeather' a quick proof of concept demo in order to get initial funding.
Speak for yourself. From my point of view VB6 is the slowest method to throw something together. I never did VB6 so it would be a steep learning curve for me. I'd much rather use C# (which is what I'm best at) for throwing something together quickly.
Polyphonic wrote: Just don't throw away any tools just because you aren't familiar with them.
I don't throw away anything. However if I don't know how to use a tool I'll not use it because it would take me a long time to figure out how to use it.
Your arguments may be valid for your individual situation, but it isn't valid for the majority of people out there.
|
|
|
|
|
Reguarding the "Majority" of people: Since we are all "Ego Centric" one often believes one's own group to be in the majority. A must read should be "How To Lie With Statistics". It is only about 200 pages long but packed with enabling information. I am not discounting C++ (it is one of many platforms we use here) just the mistaken belief that it is the "GOD" of the programming world. Every one of us is in the minority in some group somewhere. Just be careful when you discount something that you are inexperenced at using. C++ is great for what it does but then VB6 is also great for doing what it is intended for as well. Unix, Fortran, Cobal, Pascal even Assembly and others all have a valid use and place. We encourage people to not be limited
Polyphonic
|
|
|
|
|
Polyphonic wrote: Just be careful when you discount something that you are inexperenced at using
I always try to ensure I have a good overview of most technolgies so I can assess whether something would be worthwhile for me to learn nor not. Given that VB6 was discontinued about 5 years ago I feel that it comes in to the category of "insufficient possible return on investment" to be worthwhile learning. If you already have the skill and it is useful in your situation then go for it.
Another for instance, F# has just come on my radar. At the moment it is not currently worth learning, but could be useful in the future. So I'm keeping watch on it.
Polyphonic wrote: We encourage people to not be limited
I don't regard myself as limited. I try to take a more pragmatic approach to see if there is any longevity in the technology to make it worth while spending the effort learning it. I can imagine that at some point in the future it may be useful to me to revisit C++ (I did about 3 years ago and I may do again).
|
|
|
|