|
The first thing to try would be to put the full path and file name to winproj in the string. If that works then the problem lies in the OS not knowing where it resides.
sServerString = "C:\somefolder\subfolder\winproj.exe /s " & sServer
You could add a the path to Environment variables PATH statement
|
|
|
|
|
Hey Dave,
Thanks! Your suggestion led me to keep digging and it turns out that the Shell function was looking for winproj.exe in the Office14 folder and not the Office12 folder. The user has Office 2010, but MS Project 2007.
I went ahead and added the path for him. When i have time, which i dont I'll add some code to check for the version and determine what path to create or simply check for the existence of the file and folder....
Thanks again...
|
|
|
|
|
Glad you got there in the end
|
|
|
|
|
hi
i am a new user of vb and i would like to know how i can connect mysql database with my vb6.0 project. is there is connector setup will be there than how i can get this and how i will use that.
thanks
Regards
Umesh Chand Daiya
I will do my best?
The Web Soluution, Bikaner (Raj.), India
|
|
|
|
|
To connect MySQL to VB 6 you need to download the OBDC Driver for MySQL Here[^] although I would seriously recommend that you download Visual Basic Express 2010[^] and start your project with VB.Net. VB 6 was discontinued at least 6/7/8 years ago and is no longer supported. It would be much easier for you to find tutorials and stuff related to VB.Net these days, and would serve you in much greater stead. Good Luck whichever way you go.
Live for today. Plan for tomorrow. Party tonight!
|
|
|
|
|
No. Even before VB6 was launched ODBC was a deprecated technology. He should use ADO.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Firstly, don't use VB6 unless someone is putting a gun to your head; even then think hard about the choice.
Secondly, use ADO not ODBC. You will need to download the MDAC library from Microsoft, I assume it is still available. You need at least 2.5 but later versions may still work.
The better option is to go with .net.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
|
Hello !
have a form on vb.net bounded with a bindingsource on entity framework.
when the form is closed , should i dispose entity or bindingsource?
|
|
|
|
|
Rule of thumb: If the object has a Dispose method, call it before the object goes out of scope.
|
|
|
|
|
My request is for a specific situation :
Entity framework created directly from existing database (sql server), A form with a bindingsource.
When the form is open the code is :
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim f As unEntities
f = New unEntities
FaBindingSource.DataSource = f.fas
End Sub
What can i put on :
Private Sub Form1_FormClosed(sender As System.Object, e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
f.dispose ????????????????
FaBindingsource.dispose ??????
FaBindingsource.clear() ??????????
or ????????
End Sub
Thank you
|
|
|
|
|
I highly suggest you pick up and work through a book on C#.
Since f is declared in the Load event handler method, it cannot be seen outside of that method. Trying to do a f.Dipose() anywhere else will cause the compiler to throw an error at you.
Next, no, you don't have to Dispose a BindingSource, even though it has a Dispose method.
|
|
|
|
|
ok maybe my question is wrong . The real situation is :
i have a form with select buttons that i use to move through records.I select for example the third record and after that i close the form.If a reopen the form , the third record is selected.i don't want this situation.When the form is loaded , the first record should be selected.I know that i can put something like moveToFirst method , but i dont want this.I try to put bindingsource.dispose on closing form sub , and this has not resolved the problem.if i put bindingsource.clear() the problem is resolved.
So i just want to understand the situation , after the form is closed the bindingsource keeps the records ??
Anyway , thank you !
|
|
|
|
|
Disposing the thing doesn't have anything to do with this. It sounds as though your problem is that once you dismiss the form, you're reusing it instead of destroying it and creating a new instance of the form. But, you haven't said much about your application of what this form is for so it's pretty difficult to tell you where you're going wrong.
|
|
|
|
|
i have a menu on my application.And the code in menu item to open this form is :
form1.showdialog
After the form is closed using x button
|
|
|
|
|
OK, so after the .ShowDialog call, do what you need to do with the data on the form and .Dispose it. Then in the menu click code you can create a new instance of the form like it never existed before in the first place.
|
|
|
|
|
ok.
but should i call form1.dispose(true) or form1.dispose(false) ?
|
|
|
|
|
Neither.
You've never shown a dialog form before, have you?
|
|
|
|
|
As Dave said.
unless you didn't create, or cause the creation, of the object (as in Brushes.Black ).
|
|
|
|
|
There is a blog discussing Dispose on MSDN; when-to-call-dispose[^]
There is also a link within the blog on in depth guidelines on use and implementation of Dispose .
As you will see at the bottom of the Blog there is a summary guidance section details the MUST category and the Maybe's.......
|
|
|
|
|
I have a VB6 ActiveX EXE that I wrote some time ago and a VB6 application that references it. I am writing a C# version of that VB6 application.
In VB6 you can run the ActiveX EXE project in the IDE and set a reference to that ActiveX EXE VBP file in the other application's References. This lets you run both the application and the ActiveX EXE in their respective IDE's and step through the code in the application as well as the code in the ActiveX project.
I can find no way to set a reference to the VBP file in C#. I set the reference to the EXE file and my C# program works fine, but I miss being able to step through the ActiveX EXE code when debugging.
Is there some way to do this in C#?
I am using VS2005 for this project but I also have VS2010 installed.
Thanks in advance.
chiselca
|
|
|
|
|
You can't set a reference to a .VBP file, which would be the project file in VB6.
Debugging VB6 code is not supported in the .NET versions of Visual Studio.
[EDIT]
Let me rephrase that. You cannot modify VB6 code from VS2005 or 2010. You can step through it and still see it, so long as you're running the Debug version of your VB6 code and the source file can be found.
|
|
|
|
|
Dave,
I am not sure I understand what you mean. Are you suggesting that if I set a breakpoint in my C# project on a line of code that calls into my VB6 EXE, that I can step through the VB6 project's source code in the Visual Studio IDE if I compile with symbolic Debug info?
I have never done this so I am not sure how to set it up.
Any help would be appreciated.
chiselca
|
|
|
|
|
There's nothing to setup. You compile your VB6 .DLL as Debug instead of Release. Then, in your C# project, you add a reference to the Debug version of the resulting .DLL. Done.
When you set a breakpoint in your C# app, you can step right into the VB6 code like it was native.
|
|
|
|
|
Ok, maybe I am missing something here. I have been using VB6 since it was first released and I know of no way to choose a DEBUG build over a RELEASE build like you do with Visual Studio. You CAN compile to native code and select the option to "Create Symbolic DEBUG Info". Maybe that is what you mean.
In any case, I did that already and I set a breakpoint in my C# code, then clicked "step into" and got an error message like "There is no source code available...blah blah blah". So I just figured I did something wrong. Or maybe Visual Studio can't find the source code for my VB6 project? How do I fix that?
Incidentally, the VB6 component is an ActiveX EXE, not a DLL, so it runs in a separate process. Is this a problem?
Thanks,
chiselca
|
|
|
|