|
Without seeing the code you're using to cancel the operation, what the data source is, it's kind of difficult to tell. CancelEdit only works if the data source supports the IEditableObject interface and EndEdit must NOT be called between the time the edit is started and the call to CancelEdit.
|
|
|
|
|
Dim dt As New DataTable
Dim ad As New SqlClient.SqlDataAdapter("Select Top 5 * from T010011", "server=.; database=WSS_4;uid=sa;pwd=; current language=us_english")
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cb As New SqlClient.SqlCommandBuilder(ad)
ad.Fill(dt)
DataGridView1.DataSource = dt
DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
End Sub
Private Sub GlassButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GlassButton1.Click
ad.Update(dt)
End Sub
Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
DataGridView1.Rows(e.RowIndex).Cells(1).Value = My.Resources.top_left_back
End Sub
Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
If DataGridView1.Rows.Count > 0 Then
'DataGridView1.Rows(e.RowIndex).Cells(1).Value = My.Resources.top_left_back 'CType(iconColumn, DataGridViewImageColumn)
End If
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
If e.ColumnIndex = 0 Then
DataGridView1.CancelEdit()
Else
End If
End Sub
//////////////////////////
A user can edit 10 rows and in the end wants to update only 5 of them so rest he can cancel by clicking cancel button in the Grid.
|
|
|
|
|
Hi All,
I am developing one application with VB 6.0 and MS Access.
I am using the following connection string to connect to database.
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\9.124.124.90\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb"
In the above I have given the IP address of the system where the database OT_Log.mdb is located.
But I am facing problem that is, Since the IPAddress is dynamic I cannot give the IP address , so I thought of using the MAC Address of the System ( Which is static even the IP address is changed). (Mac Address - Physical Address).
But I dont have any idea how to give the MAC address in the connection string instead of IPAddess.
Or is there any code to recover ip address by giving the mac address.
Please Please help me.
Thanks you all in advance,
Regards
|
|
|
|
|
I would suggest looking into something like DynDNS and using that
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Thanks lot.
Can you give me little more about DynDNS.
Regards,
|
|
|
|
|
Please read the article I link to in my sig.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Can you not use the computer name rather than its IP Address?
e.g.
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\MyDataServer\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb"
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi,
Thanks lot.
Yes I tried by giving the computer name.
But the problem is, when i install it in other's system, in some of the system it is connecting and working fine, but in some system it is not connecting with the system name that I have given in connecting string. It is because those users are in different subnet in network. So who are all in same subnet of the server (That is the system given in connecting string) they can able to connect to the application and work well.
Can you please give me some ideas to overcome this problem. It is really very very urgent.
Thanks lot.
Regards,
|
|
|
|
|
This question was asked and answered before. You have a DNS configuration issue on your network. Only your LAN Admin can fix this problem so that all the machines on the network can resolve the name of the server to it's IP address. This is your ONLY possible solution!
You can NOT use the MAC address in the connection string. The MAC address isn't usable by your code at all. It's a physical layer address used to transmit packets between network cards on the same physical subnet. The MAC is completely meaningless to your application.
|
|
|
|
|
Using VS05
I have a thread pool requirement. I grabbed the threadpool articles by Xiangyang Liu and it was very instructive. However I have large long running processes that are interdependant and all the thread pools seem to be directed at independant, small, high volume processes. Also I cannot use a queue because I need to check for dependancies already in the work list and extract from other than the 1st position. So I intend to use object lists and the RemoveAt method.
Is there a reason to support a minimum number of threads in the pool. I am intending to create a new thread up to the max setting (4 only) and destroy the thread when it is compleated, is this reasonable? Some of the processes take 90 minutes.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: However I have large long running processes that are interdependant and all the thread pools seem to be directed at independant, small, high volume processes
Threads are a division of work, which should, ideally, be divided into small, atomic operations.
Mycroft Holmes wrote: Some of the processes take 90 minutes.
This sounds like a candidate for an entirely seperate process, not a thread out of the pool. But, that depends on the operation. If it's a small operation that just takes a long time, then a thread may work. If it's a long step-by-step, non-repeating operation (many steps to get a job done), a seperate process may be in order.
|
|
|
|
|
Hmm I may be using the wrong approach.
I have a number of processes which are required to be completed. Approx 60, all are methods that call stored procs and can take from seconds to 90 minutes to complete.
I am proposing to have a "process queue" so the user can dump in as many as required and these will process in the background. This would be fairly striaght forward with 1 additional thread to service the queue. However I wanted to have multiple threads (just to overload the server ) and am looking at a thread pool.
Maybe I should use a single thread and forget the pooling bit!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
OK. In that case, I'd have a couple of threads running that take jobs out of a task queue and execute execute them on the SQL Server. The problem with the 90 minute job is that the connection will timeout before the stored proc gets around to returning. But, I wouldn't have this queue on the client side. I'd probably have a service component running on the SQL Server machine that manages the queue and executes jobs from it. Having your client side app executing the jobs is problematic if the client gets disconnected from the server or locks up unexpectedly. The problem then becomes how do you recover from such a situation??
|
|
|
|
|
Thanks dave
I ripped the 90min job out so it is not queued, changed it to 1 thread only - no dependancy issues and am building it in that fashion.
I may extend this to have multiple queue/threads for each set of dependants but this would allow a possible 9 thread/queue sets to be running simultaneously, probably not a good idea
|
|
|
|
|
Might be worth taking a look at workflow foundation as well.
|
|
|
|
|
Not a chance - this bloody thing is in production and I'm just trying to make it incrementally better, there is no way I'm going to introduce new tech to the app .
Besides I have a nice shiny new project to play with where I can introducing WCF , small steps.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I am writing a program in VB.NET (VS2005)
I need to know which references are in used in my project. I wrote the following code:
Imports EnvDTE80
Imports Microsoft.VisualBasic
Imports System.Windows
Imports System.Windows.Forms
Imports System
Dim DTE As Object
DTE = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0")
Dim myProj As Integer
Dim prjVSProject As VSLangProj.VSProject
Try
For myProj = 1 To DTE.Solution.Projects.Count - 1
prjVSProject = DTE.Solution.Projects.Item(myProj).Object
Dim myRef As VSLangProj.Reference
For Each myRef In prjVSProject.References
MsgBox(myRef.Identity)
Next
Next
Catch err As System.Exception
MsgBox(err.Message)
End Try
The code is working well but the problem is that I didn't get the entire list of dlls, for example I didn't get a dll that I wrote and add to the reference.
Please help.
Thank you
Shay Noy
|
|
|
|
|
I have a simple question. Is it possible to have the process be a different name than the Assembly name? Or, is it possible to rename the process when a form loads? Like say I have the assembly name is Example, when the form loads I want the process name to be Example2. Thanks for any replies.
|
|
|
|
|
Are you talking about the Process name as it shows up in Task Manager?? No, you can't change that unless you make a copy of the .EXE and rename it to whatever you want.
|
|
|
|
|
Yea that's what I mean, so the only thing I can do is name it something else and just tell people that's the name of the program?
|
|
|
|
|
The Process name is the executable filename and shows up under the Processes tab in TM. You cannot change this name without renaming the executable. The Window name shows up in the Applications tab. All you have to do to change this is change the Text property of your app's window.
|
|
|
|
|
Yea I know that, but when the solution is built with the assembly name, that's what shows up as the process name, and that's what shows up on the icon to deploy the exe. So I was just wondering if there was the ability to have the icon name different than the assembly name when it gets built.
|
|
|
|
|
Maffyx wrote: but when the solution is built with the assembly name, that's what shows up as the process name,
True. That's the .exe name.
Maffyx wrote: and that's what shows up on the icon to deploy the exe.
I have no idea what you're referring to here.
<blockquote class="FQ"><div class="FQA">Maffyx wrote:</div>I was just wondering if there was the ability to have the icon name different than the assembly name </blockquote>
Again, I have no idea what you're calling the "icon name".
|
|
|
|
|
Let me rephrase, the shortcut name, sorry. So the name that shows up in the process list is different than the one that shows up on the shortcut.
|
|
|
|
|
The shortcut can have any name it want's. That name won't show up anywhere except the shortcut. The name that shows up in the Processes tab will always be the name of the .EXE file the shortcut launched.
|
|
|
|