|
Guessing doesn't really work, does it. I'd try google, or perhaps even buy a book.
You delete records with SQL.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
how to clear datagridview in vb.net
|
|
|
|
|
Is it bound or not? You want to delete the bound items or just make the DataGridView not viewing them anymore?
Start by reading this[^].
Eslam Afifi
|
|
|
|
|
Depends on what your trying to do. If your just trying to hide the grid itself, you could just set the visible attribute to false.
Example:
gridview1.Visible = False
This would just hide the grid from the user. If you were talking about resting it to a default state you would need to write some logic for the gridview and just update the databinding based on conditions set for the gridview.
Hope this helps.
Matthew Vass
QA Analyst
mvass@hostmysite.com
http://www.hostmysite.com?utm_source=bb[^]
|
|
|
|
|
Hay
I'm developing application with 100 users. How to deploy new version of EXE file in the morning if someone did not close application when he left the office yesterday??
I know that web application is a solution, but because of limitation on the web we really would like to develope "ordinary" windows (exe) application.
I'll be grateful for any advice
|
|
|
|
|
You could restart all computers in the LAN, effectively closing every open application.
What are you going to do about the computers that are turned off in the morning? I tend to shut down my computer before I go home
I are troll
|
|
|
|
|
Restarting all computer is not acceptible, because from 500 PC, only about 100 is using my application. There should be a way to enforce replacing exe file or enforce app exit on demand...
|
|
|
|
|
You can create a small application to loop through all the running processes, and if one of the processes running on the target-computer has the same name as your application - terminate it
500 computers that may be left running at night. I wonder how much energy (and money) that would cost?
I are troll
|
|
|
|
|
Couldn't you create a timer that would implement some type of "inactive" logic and close the application. The other way to think about this is maybe to implement a version number that could be checked and inform the user that a new version is available. I kind of like the timer approach, you could sell it as a security feature, An application should not be left open for the cleaning people to sniff around. Not that I have anything against cleaning people ... jeez you have to be politically correct even when you post.
|
|
|
|
|
David Mujica wrote: An application should not be left open for the cleaning people to sniff around.
Cool idea, easy to implement, and good argumentation. I'm gonna use your idea too, thanks
I are troll
|
|
|
|
|
you are right about cleaning people, but our secure istructions are clear - we shouldn't leave our desk without locking the PC
|
|
|
|
|
I worked at a company where the Network Admin had implemented a Windows Policy that forced the workstation to go to the "workstation locked" logon screen after 15 minutes. It was actually a very good thing because my logon ID gave me access to lots of sensitive data. I always hit the "windows command button+L" key when I left my desk to lock the machine. You can't be too secure when it comes to sensitive data.
|
|
|
|
|
I absolutely agree. I work in the international bank and our policy demand win+L when leaving desk, even if I go to toilete (2 mins).
|
|
|
|
|
I guess that I will solve this problem "my way"
Security revision pointed that no user should work with old vesion if new one exists (even he already run the application)
I have control over class that communicate with DB (oracle). So I will implement
checking before select, insert or update statement if new version exists the mentioned
statements will fail, and user will get the message something like
"close app and start new version..."
On starting shortcut (thin client), application will download new class library (which
have all forms and logic inside)
|
|
|
|
|
I would be very careful where you add those version checks. Don't want to have them execute millions of times. I would see if you could execute them at a higher business-level logical transaction. For example, given a process that posts cash receipts for the day, check the version once at the beginning not for every record you are about to process.
My 2 cents.
|
|
|
|
|
We will not implement version checking on database level.
Because our communication with DB work via webservice on web server it is not difficult to look into web.config file for version. I see our point of increasing DB traffic if for every select statement you check version with another select, so I guess I didn't pointed out web.config checking (which is a least 100 times quicker)
|
|
|
|
|
We have apps that for the client to shut. There is a versions table that the client checks every 5 minutes. If the app version is different, a warning is displayed to the user (so the user can save current work). After about 5 more minutes, the app is auto killed if it's still running.
Can't remember if click once allows you to do that? I recall that you can have the client check for a new version on startup or shutdown, but not sure while running.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Restarting anyone's computer is not acceptable. period.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
There are several ways of doing this. Some companies have mandatory reboot policies in place. If you leave your machine on over the weekend, the machine gets rebooted automatically.
Another would be to have the app close itself after x number of hours of inactivity.
Another would be to have the app check in every so often to see if there was an updated version available on a central source. If there was, notify the user to restart the app. Upon launch, the app would have to launch an updater application that downloads the new version and replaced an files it has to to update the app, or just run an installer. The only problem with this would be the users would need admin rights to do this installation.
An another would be to use some application distribution software, like MS System Center Configuration Manager, or Altiris.
|
|
|
|
|
I prefer 3 or 4, not 1(reboot) or 2(timeout).
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Yeah I do to. But, where I work, we use all four methods. Number 1 is used to force machines to reboot themselves during Microsoft's monthly patch season.
|
|
|
|
|
Would it be practical to have two executables, one of whose job is to run the most recent version of the second? If the name of the second file were different for each version, an "update" would entail creating a new version and informing the "loader" about it; those things could easily be done while the original application was running.
Some additional code would be needed to deal with the possibility of trying to start the application while an instance of the old version was still active. Depending upon the nature of the application, one could simply start a new instance of the new application (especially if having multiple application instances open would be normal and expected), one could send invoke the old application (not using the new one until all instances of the old one had been shut down), or one could request the old application to save its state and quit, and hope the new application could read back the state and resume.
|
|
|
|
|
I have a program that what I want to happen is, when you type something into "txtEmployee" it will search the employeeID field in employee table and a message should appear saying "This employee does not exist" or show their details in "txtAddress" (Address 1 in table) "TxtPostcode" (Postcode in table)
Now what I don't want to happen is for the textboxes to be databound to the table fields, as I only want the textboxes to connect to the database table fields whenever I type something in. How would I do all this?
Thanks in advance
In the end we're all just the same
|
|
|
|
|
You should do something like that:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim txt, SQL As String
txt = Me.TextBox1.Text.Trim
'you should connect to DB only if lenght is greater for example 3
If txt.Length > 3 Then
SQL = "select EMP_ID from EMP_TABLE where EMP_ID like '" & txt & "%'"
Dim dt As DataTable
'call some your function that returns datatable or. write code here
'dt = getDatatable(SQL,"SOMETABLE")
If dt.Rows.Count = 0 Then
MsgBox("This employee does not exist")
End If
End If
End Sub
|
|
|
|
|
can help me i want source code programme on vb (read write from usb port + vb)plz
|
|
|
|