|
We’ve deployed an app on 20 machines using xcopy deployment. The exe is on the intranet and everyone has a shortcut to it. Yesterday we corrected a bug we found in the initial rollout and I came in this morning early to replace the exe with the updated exe and received the error “Cannot copy… It is being used by another person or program” which means that one of our 20 employees simply locked their computer with the application still running.
Is there a utility that I can use to see which employee is accessing this exe file?
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
|
|
|
|
|
Now you know why it's bad idea to do that! Install it on the workstations to avoid this in the future. Why? Try to find out who has the file opened when you have 500+ workstations using it. You won't come up with 1 or 2 users who have left for the night, but you will come up with a couple dozen...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I agree and disagree....
I agree that it might not be a good idea for 500 people to share the same exe, but on the other hand if we load the exe locally on 500 systems we also have the issue of visiting 500 systems each time we want to upgrade.
So far we're a small shop with small apps, but I agree, as we grow and have vb apps on many computers we'll have to re-evaluate our implementation.
We're waiting for the final version of VS 2005 to come out this summer / fall to test and start using the ClickOnce technology, but till then our xcopy deployment works.
I also have a coworker looking for the same type of concept, but they're looking for code, that will show if a file is being accessed and if so, by who. Basically the code would continue a copy if the file was not accessed or alert the client that the file is being accessed and the file copy failed.
Any suggestions?
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
|
|
|
|
|
No you don't. There's a bunch of different software manangement solution out there. SMS Server, Altiris, Tivoli, ... They take care of deploying the software for you, so you don't have to visit those machines...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I haven't found any kind of a "WhoHas" utility for Windows. Netware, yes, all over the place, but not Windows. It makes me wonder if it's even possible to find out who has the file open...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Use Task Manager on the server to kill the running executable. Then you can copy the file.
Robert
|
|
|
|
|
hi,
i am developing a web service in vb.net. in this, what is required is.. that one web service calls the other. this is possible. however it is also required that the web service displays a message and takes user input. how do we take input from a user in a web service..?
pl reply
|
|
|
|
|
You don't! Web Services don't expose a user interface at all.
You're application that calls the Web Service must put up the user interface and call the Web Service with the required data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to prevet users from errors
Should I use "On Error goto" statement or "Try catch end try" block.
Although i dont want my program to rum slower due to error handling.
Do you know which method is faster?
Thanks in advance
|
|
|
|
|
|
Try/Catch blocks are very much the better way to go. Error handling doesn't add a huge overhead to your code, so I don't know why that's a concern... If your code errors out, Error Handling definately wins the speed competition, because if you don't the error, your code comes to a screeching halt.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
sure, but you cannot apply any Resume ... (even if - i aggree - goto s are quite bad to use...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
If your code is written correctly, why on earth would you need to?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
while programming in console mode, this becomes very useful when getting a bad user input and want to get it again until the user type its value correctly...
this can't be done with exceptions (try and catch blocks) except if you use explicit goto s, that behavies the same...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Wanna bet?! Just a little something off the top of my head...
Dim validInput As Boolean = False
Dim choice As Integer
Do
Try
choice = Console.ReadLine()
...Whatever else you need...
If choice is valid Then
validInput = True
End If
Catch ex As Exception
...Whatever you want here...
End Try
Loop While Not validInput
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok everybody,
This may sound kinda silly but this is what i m unable to do.
I was working on VS.NET and had MSDN fine and working. Now i need to work on VS6 but i unable to use MSDN through VS6 although its installed on my machine. How do i link MSDN with VS6???
Laddoo
|
|
|
|
|
I think you got a good question. Anybody out there to solve this?
Smith
KB Team
|
|
|
|
|
You installed both on the same machine? The MSDN Library hasn't supported integration with Visual Studio 6 for roughlt the last 2 years...
I can't remember if you can install two different editions of MSDN side-by-side. IMHO, I don't think you can...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't think there were any issues, but my laptop is evidence that you can have 2 MSDN installed at the same time. I have one from October, ???? which was the last full MSDN before .Net, and I have the one from VS.Net 2003. They both work properly from their respective development environments.
|
|
|
|
|
Anyone of u know how to export crystal report to word without using textboxes??
thanks...
|
|
|
|
|
Does somebody knows how to call Oracle Stored Functions in VB Net, I am very very tired trying one time and once again, and so on.
Please is urgent!!
Thanks in advanced.
|
|
|
|
|
Use the OleSqlwhateveritis generic class provided by ADO.NET for all sources except SqlServer. You aren't saying what you've tried, or what is happening, but my memory of Oracle ( which I am trying to erase, Oracle is crap ), was that the issue was finding a driver that worked properly. May you have driver issues ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian, I think is not an issue with drivers becouse I can call Stored Procedures fine, however I can't call Functions which are stored in Oracle Packages.
I am using the next code in VB Net:
Public Sub MY_PKG_ADD_NEW_ITEM(ByVal ConnectionString As String _
, ByRef N_ITEM_ID_O As Integer _
, ByVal V_ITEM As String)
Dim oConn As New OracleConnection(ConnectionString)
Dim oraCmd As New OracleCommand("", oConn)
oraCmd.Connection = oConn
oConn.Open()
oraCmd.CommandText = "MY_PKG.ADD_NEW_ITEM"
oraCmd.CommandType = CommandType.StoredProcedure
'oraCmd.Parameters.Add(New OracleParameter("N_ITEM_ID_O", OracleType.Number, 3)).Direction = ParameterDirection.Output
'oraCmd.Parameters.Add(New OracleParameter("V_ITEM", OracleType.VarChar, 2000)).Value = V_ITEM
'oraCmd.Parameters(1).Direction = ParameterDirection.Input
Try
oraCmd.ExecuteNonQuery()
N_ITEM_ID_O = oraCmd.Parameters("N_ITEM_ID_O").Value
Catch
'MsgBox(Err.Description)
Finally
oraCmd.Dispose()
oConn.Close()
End Try
End Sub
The error what I am receiving is:
ORA-06550: line 1, column 7:
PLS-00221: 'ADD_NEW_ITEM' is not a procedure or is not defined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The software I am using is:
VB Net 2002 version
Oracle driver is System.Data.OracleClient (.NET Framework Data Provider for Oracle)
I am getting conected to an Oracle 9i data source.
I hope this info complete my scenario so to get more help from you.
Thanks in advanced !!
|
|
|
|
|
you need to set a returnValue parameter (where the function result will be
stored) and execute as "ExecuteNonQuery"
Ishak
|
|
|
|
|
Here is a differente way to prepare the calling to the stored function:
Public Sub ADD_NEW_ITEM(ByVal ConnectionString As String _
, ByRef ITEM_ID_O As Integer _
, ByVal V_ITEM As String)
Dim oConn As New OracleClient.OracleConnection(ConnectionString)
Dim rtnVal As New OracleClient.OracleParameter("", Conn)
Dim inpVal As New OracleClient.OracleParameter("", Conn)
Dim outVal As New OracleClient.OracleParameter("", Conn)
Dim oraCmd As New OracleClient.OracleCommand("MY_PCKG.ADD_NEW_ITEM", oConn)
oraCmd.CommandType = CommandType.StoredProcedure
outVal = oraCmd.CreateParameter
outVal.ParameterName = "ITEM_ID_O"
outVal.OracleType = OracleType.Number
outVal.Direction = ParameterDirection.Output
outVal.Value = DBNull.Value
oraCmd.Parameters.Add(outVal)
inpVal = oraCmd.CreateParameter
inpVal.ParameterName = "V_ITEM"
inpVal.OracleType = OracleType.VarChar
inpVal.Size = 2000
inpVal.Direction = ParameterDirection.Input
inpVal.Value = V_ITEM
oraCmd.Parameters.Add(inpVal)
Try
oConn.Open()
rtnVal.Direction = ParameterDirection.ReturnValue
rtnVal.OracleType = OracleType.Number
rtnVal.ParameterName = "ITEM_ID"
rtnVal.Value = oraCmd.ExecuteNonQuery
oraCmd.ExecuteNonQuery()
Catch
MsgBox(Err.Description)
Finally
oraCmd.Dispose()
oConn.Close()
End Try
End Sub
So I get the same results.
Thanks for your answer, do you have some other idea ?
|
|
|
|