InterviewSolution
| 1. |
Solve : vb program not searching? |
|
Answer» i have thisprogram working on 3 computers but wont work on this one. it is windows 10 and is a vb program short and has worked PREVIOUSLY quite well. when I search I input the file name where all names are stored. e.g. horse.dat and then a name it then vanishes off the screen this extract is from one that works on windows 10 on one computer and transferred to the one that doesn't work it is not working on the computer that I want it to work. any clues it seems to find horse.dat it allows the input of the name to search and then it vanishes. Visual Basic .NET (VB.NET or VB .NET) is a version of Microsoft's Visual Basic that was designed, as part of the company's .NET product group ... Geek, read the code. It's VBScript. OP, try running it in a console under Cscript.exe and report any error messages Thanks for responding. I am not a vb programmer so cant answer some of what you are saying. this is the story. i have this program running on 2 other computers. it used to run on this one now windows 10 but was running on 7 and stopped running on 7. When i run it and ask it to search e.g. put in the name to search and hit enter it flashes off the screen and disappears. It gives me the impression it the data file to search is not in the right FOLDER but I am of the impression that it is. I have copied a working copy of the vbprogram to the computer and still the same result. it was working but now it just flashes off the screen. the series that I conduct is click the program (VB) it asks for the data file. i enter the data file hit enter and it then asks for a name to search. I put in the name to search and hit enter and it all disappears. would be INTERESTED on your thoughts.sometimes it gives a wrong filehandle error if i try to run it from the folder but from the BATCH file it behaves as i have said it asks for the datafile name then the name to search and vanishes. I feel it is searching the wrong folder and not finding the target datafile. even if you confirm this i will go back to the drawing board and keep moving it.solved changed horse.dat to horse.txt and it now works. this works with horse.dat on my other computers go figure.changed file to txt and it now searches. wouldn't find dat file. I think what you have got is not a "VB program"; it is a Visual Basic Script (VBScript) script. Possibly the problem you had is that the extension .dat is used by Windows for system data files and possibly on the problematic computer a permission setting or file association setting has resulted in your vbs script being denied access. Or .dat files are hidden by default on that system. To confirm this, try renaming the horses.dat file to any other extension, not just .txt and see if it works. I previously suggested running the script from a command prompt in a console window using the cscript engine e.g. cscript //nologo scriptname.vbs. This might cause an error message to be shown. If you just click on the script you may miss this, especially if the default script engine on the system is wscript.exe. all my computers search for .dat file. so did this one. I changed the data file to a txt file and it now works. thank also had trouble with toolbar not retreating. it was java trying to update. once I dealt with this it was okay. |
|