|
Thanks for all your help.
I used CDbl to on the number and it is working.
|
|
|
|
|
Hi guys I have very big question
I have a project on Visual Studio, this project include table SQL data. I notice when I add records or add rows with information . imagine that I add more than 1000 rows full with a lot of names and number. the crazy thing that all these data will be removed once I change a little code or add. I wonder how can I protect my data even I make change code time to time.
|
|
|
|
|
What makes you think that changing the code in your project magically causes the data in the database to disappear?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Probably those crazy things he mentioned.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Richard MacCutchan wrote: crazy things
Yeah probably. I would not be able to guess which one, out of the 4 or 5 billion crazy things that it could be, is causing the problem
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
well that what happen to me every time I create SQL table and after save some record like add rows full with information it will be saved and fine but once I change any code or for example create new button on the form the data on the GridviewData will disappear I am not sure if that because I have to change something on the Proprieties
|
|
|
|
|
romo22 wrote: I have to change something on the Proprieties
I would have to say no.... the things that you are describing is not possible. If your data was saved then it was saved. You are possibly creating a transaction and not committing. More likely you are clearing the table somewhere in your code. Adding a button to your project will not magically make data in a database just disappear.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Trying to guess what is going on from what you told us is quite tough...
What could happen is that you have your database as a .sdf or .mdb file ; when you change your code, and recompile, the datafile is copied to the output directory.
So when you recompile, you overwrite the datafile in the output directory of your projet (the datafile that your application is actually using).
But it's just a guess. Unfortunately I lost my crystal ball
...No memory stick has been harmed during establishment of this signature.
|
|
|
|
|
|
Please don't expect people to go to other sites to try and understand your question. Explain clearly what your problem is, showing code extracts where necessary, and show what results you expect and what you get.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
you don't even tell us your billion data gone from database or dataset..
|
|
|
|
|
Why are you telling me this?
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
sometimes words leads you to understand different thing or doesn't make sense for you . reading my words not enough to understand my problem because my English not good enough to express what I need to say it. I speak different language, I don't even understand what database means on my language I just understand what database do.
we spent a lot of times chat to each other write to each other youtube that I did will save our time please watch you will not lose anything you are here because you need to help me,
http://www.youtube.com/watch?v=jDj_ZD10y0k[^]
|
|
|
|
|
romo22 wrote: English not good enough
I fully appreciate that English is not your native language. Nothing is stopping you from using Google translate to translate your native language into English and then posting that here.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Did you research philo's answer? Did flagging the database not to compile fix the problem?
Maybe try that first. If you run the app, stop and then rerun, outside of your IDE and the data is still lost, then you are not saving the data. You need to save the data.
"You get that on the big jobs."
|
|
|
|
|
Hello All,
How would you prompt UAC (for entering a password), for security reasons, like in order to save settings for a antivirus software I'm creating. And to tell if the UAC was canceled or OK (and the password was correct).
Simple Thanks and Regards,
Brandon T. H.
Been programming in Visual Basic for 4 years this point forward, and is very good at it (I can even create programs completely on code, without dragging those items from the toolbox). Programming C++ for 1 year so far and the same with C#.
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|
|
I'm not sure that you can do this on demand, as it is controlled by the system. However, the documentation[^] may be able to answer your question.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
I'd do something that requires Admin-rights, and check if the action succeeded (perhaps writing to the program files folder?). On the other hand, people might have disabled UAC altogether.
Bastard Programmer from Hell
|
|
|
|
|
When your program requires elevation, that must be known at startup of the program already (imbed a manifest, and add a
requestedExecutionLevel<br />
level="requireAdministrator" . It is not at all possible to change the elevation level while the program is already running (you could pretend to do so by closing and then restarting your program, or running another application pretending to be a form of your application etc.).
|
|
|
|
|
let me put it this way that a company has four visits in my company and i need to create an alert or a pop-up window by feeding some sort of data which reminds me that abc.co has a visit in 2 days. can someone help me out with this?
|
|
|
|
|
Create a list that includes company name and date of visit(s). Check the date against today's date and show the alert if it's nearly time for the visit. What part of this are you having problems with?
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Use Outlook to create recurring meetings. I don't see the issue. Maybe if you gave more details?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
i found some messenger code, modify and use it,
my problem is, txtMessage keydown event that will automatically click button send is not working,
and again everytime my form loads, focus is on txtDisplay, not on txtMessage.
i copied some of the code below.
is this caused by add handler and thread?
Option Strict On
Imports System.Windows.Forms
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Text
Imports DevExpress.XtraEditors
Namespace Forms
Public Class Messenger
Delegate Sub AddMessage(ByRef message As String)
Private Const port As Integer = 33333
Private Const broadcastAddress As String = "255.255.255.255"
Private receivingClient As UdpClient
Private sendingClient As UdpClient
Private receivingThread As Thread
Public Sub New()
InitializeComponent()
AddHandler btnSend.Click, AddressOf btnSend_Click
End Sub
Private Sub txtMessage_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
Select Case e.KeyCode
Case Keys.Enter
btnSend.PerformClick()
End Select
End Sub
Private Sub Messenger_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Objects.Classes.Universal.Variables.formMessenger = True
InitializeSender()
InitializeReceiver()
Me.txtMessage.Text = ""
Me.txtMessage.Focus()
End Sub
Private Sub btnSend_Click(sender As System.Object, e As System.EventArgs)
txtMessage.Text = txtMessage.Text.Trim()
Dim toSend As String =
"(" +
DateTime.Now.ToString("HH:mm") +
")" +
Objects.Classes.Universal.Variables.Username + " > " + txtMessage.Text
Dim data() As Byte = Encoding.ASCII.GetBytes(toSend)
sendingClient.Send(data, data.Length)
Me.txtMessage.Text = ""
Me.txtMessage.Focus()
End Sub
Private Sub MessageReceived(ByRef message As String)
txtDisplay.Text += message + vbNewLine
End Sub
Private Sub InitializeSender()
sendingClient = New UdpClient(broadcastAddress, port)
sendingClient.EnableBroadcast = True
End Sub
Private Sub InitializeReceiver()
receivingClient = New UdpClient(port)
Dim start As ThreadStart = New ThreadStart(AddressOf Receiver)
receivingThread = New Thread(start)
receivingThread.IsBackground = True
receivingThread.Start()
End Sub
Private Sub Receiver()
Dim endPoint As IPEndPoint = New IPEndPoint(IPAddress.Any, port)
Dim messageDelegate As AddMessage = AddressOf MessageReceived
While (True)
Dim data() As Byte
data = receivingClient.Receive(endPoint)
Dim message As String = Encoding.ASCII.GetString(data)
Invoke(messageDelegate, message)
End While
End Sub
End Class
End Namespace
|
|
|
|
|
have you looked at the tab order of the two textboxes?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
yes, i put tabindex for txtMessage = 0 and 99 for txtDisplay.
but still the txtDisplay was focused when i open the form.
|
|
|
|