|
Hi,
I keep getting "The path is too long after being fully qualified. Make sure path is less than 260 characters." when I run the following recursive directory search. Could you tell me how to fix it?
Sub DoRecursiveSearch(ByVal dirname As String, ByVal filespec As String, ByVal recurseDirs As Boolean)
Dim fname As String
Dim fi As FileInfo
For Each fname In System.IO.Directory.GetFiles(dirname, filespec)
fi = New FileInfo(fname)
msgbox(fname)
Next
' recurse on subdirectory if so requested
If recurseDirs Then
For Each dname As String In System.IO.Directory.GetDirectories(dirname)
lnDirCount = lnDirCount + 1
DoRecursiveSearch(dname, filespec, recurseDirs)
Next
End If
End Sub
|
|
|
|
|
Without remapping things I don't think you can. The path limitation is not part of VB but rather the OS. Try accessing the file manually at the filesystem level to see...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
You can't fix this. This limitation is based in Windows, not VB or the .NET Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
Using this article:
http://www.codeproject.com/useritems/ByPassAutomation.asp
I've managed to run MS Word from within a VB.Net form... All very nice.
The problem I'm having is this. My project spec involves me having a form with an explorer style navigation window to find files to open (treeview control). The treeview must be visible at all times so that the user can choose other files from the treeview rather than within MS Word using the File>Open dialogue.
Word runs correctly the first time with the file selected from the treeview. If I choose another file, word crashes out and I get Unhandled exception:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Additional information: Process has exited, so the requested information is not available."
Can some one give me an idea of how to get it so I can continue clicking within the treeview as many times as I like, having word close the current file and open the new one without the above exception occuring.
McS.
|
|
|
|
|
I use the following code to open Ms word and it could open many word file as you want:
' Open file directly into Ms word...<br />
Dim appWordRtf As Word.Application = _<br />
New Word.Application<br />
<br />
appWordRtf.Documents.Open(FilePath)<br />
appWordRtf.Visible = True
Try to use this code, if it is possible, could you post your code that error on this forum? GOOD LUCK
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks for the response.
I'm having a problem with:
Dim appWordRtf As Word.Application = _
New Word.Application
It is saying 'Type Word.Application not defined'
The error received with regard to the intial post and its first response is:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Additional information: Process has exited, so the requested information is not available."
McS.
|
|
|
|
|
mcslemon wrote:
It is saying 'Type Word.Application not defined'
The error received with regard to the intial post and its first response is:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Have you add the reference of Ms word and office to your vb.net project yet??? If not then go to Project menu and click on Add Reference... Then go to the COM tab and find Microsoft Office x.0 Object Library then click select and find Microsoft Word x.0 Object Library and click select and click Ok. Then try to run your project again. Good luck
Note: x is the number of your Microsoft office version. If you use Office xp then x will equal to 10. You will see, Microsoft Office 10.0 Object Library.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Ok, I have the Object (Word.Application) working.
I still want to be able to load the application window into the Label as I stated in my original post using the example.
It would be great if someone could show me how to do this whilst using 'The man from SCN-COs' solution. I am having no luck on my own.
McS
|
|
|
|
|
Good day to you all and i hope you are well.
Not a direct code question guys, just in need of advice.
Imagine this scenario if you will,
You have a internet server with a SQL Server 2000 database and a client with a MSDE installation. Both are running the same database say MYDATABASE.
MYDATABASE on server is very large, say 100mb.
The client needs one table from the server to do the work they wish to do on their local machine.
They want to just get that one table (and all related obviously) updated on their machine as they don't need the full database as that would take ages (being 100mb).
How would you suggest passing that one table to the client, the client app updating the database on the local machine. Then, once they have done their work they re-connect to the internet server pass back the data they have added/updated and the server then updates accordingly.
Any help would be greatly appreciated.
My thoughts and ideas so far - DTS (not used this before though), dynamically formed SQL (clunky, unreliable).
Pleaaaaaseeee Help
Many Thanks
Harry
|
|
|
|
|
Hi,
Is it possible to do paging in VB.NET datagrid ?
I have search using Google and Yahoo but still couldn’t find any sample and references regarding this matter
Thank you very much in advance for any help and ideas.
Regards.
|
|
|
|
|
I've found code to display the name of the program that is currently running:
MsgBox(System.Reflection.Assembly.GetExecutingAssembly.GetName.Name)
and I've found code to display the sub routine I'm currently in:
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name)
Does anyone have code to display the class that the sub resides in?
Thanks for any input you can give!
Lost in the vast sea of .NET
|
|
|
|
|
Try:
System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name
|
|
|
|
|
Perfect!! Thanks!!
Lost in the vast sea of .NET
|
|
|
|
|
Hello All,
I want to send fax from a VB.Net form using rightfax.dll(version 8.5.0.103), can anyone pls provide me a insight of this by providing a piece of code or any article for the same.
your advice would be highly appreciated.
This is very urgent.
Regards
Pavan
|
|
|
|
|
Why don't you just Google for "rightfax vb"[^]...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i have urgent problem i don't know what i must do to solve it
the project that i work on consist of server and client application
it represent real Time system
and have three connections
on the client sied the problem is that:
i have found that the CPU usage is 100% this isn't the usaual case of the client
first :when i watch the threads from control panal-->performance i found that one thread go up
and take most resource
i don't know how to catch this thread
second :i note that if i put any break point to stop the applecation then let it run again
the CPU usage go down to a good level
ASwanee
|
|
|
|
|
Hi,
I am trying to create an vb app using winforms. I want to always have updated information in the app. So if there are more then one user, and one of users is adding a company, I want the other user to see the company as well after it has been added. Or when one user changes the status of a company I want this update to be send to the other users, if looking at the same data as well.
One of the obvious solutions would be to have a timer restrieving the data from the SQL db every couply of seconds, but I guess that will kill a network and there must be more elegant solution, pushing changed data forward. However all the docs I have read until now only talk about a single user and he or she pushing a button to update.
Can anybody give me some hints on where to go and some articles to read?
Thanks in advance
David J
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Depending on how much data is changed and how much data you have total you could do one of the following:
1. Give each table with data an extra column LastChange of type DateTime. If the column is indexed your clients can regulary ask for newly changed items.
2. Instead of marking ich item just make one field LastChange. Your clients poll this one and (if something changed) get all data.
3. Make some sort of server where your clients must log in. Let the server handle all data access to the db. This way the server gets to know all changes and can send any info he wants to all connected clients. Furthermore the clients wouldnt need to know the data layer - it would all be handled by your server.
|
|
|
|
|
i need to build an application that would first connect trough LAN, if that fails (outside LAN) trough internet, and if that fails trough modem, offcourse it is a database it should connect to. My problem is that i have no idee how to do this, any suggestions?
John
|
|
|
|
|
I am making an FTP Class I've been able to login,get filelist,enter into passive mode. but when I try to download any file as small as 1 Byte it stops responding I'm issuing ("RETR " & Filename) command to FTP Server. If there is any problem correct me.
Do While True
m_bytBuffer.Clear(m_bytBuffer, 0, m_bytBuffer.Length)
m_intByte = m_objClientSocket.Receive(m_bytBuffer, m_bytBuffer.Length, 0)
m_strMes += ASCII.GetString(m_bytBuffer, 0, m_intByte)
If (m_intByte < m_bytBuffer.Length) Then
Exit Do
End If
Loop
|
|
|
|
|
Hi,
vb 6.0
I have a control with several events, and a container form listening for such events. the control also has some methods which are called by the container form to update a listview.
Everything was working fine until I decided to compile the project. when compiling the project I get the message: procedure not found -- even though intelisense allows me to select the procedure and I provide the correct number of arguments (4 args).
Does anybody have any experience with this type of behaviour, I'm in the process of creating the release version for testing and can't seem to go past the compile process.
Thanks....
sun.lcr
|
|
|
|
|
Hi folks,
Solved my problem, I'm so deep in the forest that I can not see clearly...
anywho....
I had changed the function signature but did not bother to recompile the control project. Since the control project is in the same workspace as the form project calling it, I was making the wrong assumption that everything was getting compiled but the control project was not getting compiled therefore the diffrerence in method signatures....
duhhhhh.....
sun.lcr
|
|
|
|
|
Hi,
I am trying to convert the code in this document: http://www.codeproject.com/cs/miscctrl/custommenu.asp[^] into VB.net instead of C#. I have got most of it done but I am missing the final step, or at least I hope it is the final step. In the article all the menuitems have the following two events added:
this.menuItem3.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.OnDrawItemSec);
this.menuItem3.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.OnMeasureItemSec);
When I look at the source article used for this article, the author writes about going to the eventtab on each menuitem. I am guessing this is typically C# as I cannot find it in VB.net. So can anyone please tell me how to do this?
Thanks
David J
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Your are looking for the AddHandler statement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmAddHandlerStatement.asp
For your example:
<br />
AddHandler Me.menuItem3.DrawItem, AddressOf Me.OnDrawItemSec<br />
AddHandler Me.menuItem3.MeasureItem, AddressOf Me.OnMeasureItemSec<br />
|
|
|
|
|
Could someone please help me on how to disable database login in crystal report 9.0?
Here's how I did:
I created a customer.rpt file
then I wrote this code to call customer.rpt to make the report:
-------------------------------------------------------------------------
Private Sub CustomersPrintForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim CRYRpt As New Customers
Dim rst As MICControlLibrary.RecordSet = MICControlLibrary.DBContacts.DBSelectPrint(_contact_id)
Dim dtview As DataView = New DataView(rst.DataTable)
CRYRpt.SetDataSource(dtview)
Dim ParameterFields As CrystalDecisions.Shared.ParameterFields
Dim ParameterField As CrystalDecisions.Shared.ParameterField
Dim ParameterRangeValue As CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue
ParameterFields = New CrystalDecisions.Shared.ParameterFields
ParameterField = New CrystalDecisions.Shared.ParameterField
ParameterField.ParameterFieldName = "@contact_id"
ParameterRangeValue = New CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue()
ParameterRangeValue.Value = _contact_id
ParameterField.CurrentValues.Add(ParameterRangeValue)
ParameterFields.Add(ParameterField)
CrystalReportViewer1.ParameterFieldInfo = ParameterFields
CrystalReportViewer1.ReportSource = CRYRpt
CrystalReportViewer1.Refresh()
End Sub
----------------------------------------------
am I missing something? because when I run it, it prompt a database login asking me to login before view the report?
Thanks for helping.
|
|
|
|