|
I've never seen anything like that in any version of .NET, and I doubt there's any code in the SqlClient classes to pop up a message box. If there was, it would be a major bug that would have been discovered and widely reported by now.
What does the Write_To_Event_Log method look like?
Is there any code executing when you access Gdetails.sConnectionString ?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Gdetails.sConnectionString is simply a string property with the connection string in it. No code is run there at all.
Write To Event Log just writes whatever message is sent to the event log. Here is the code:
sSource = "Email Report Distribution"
sLog = "ERDS Error Log"
If Not EventLog.SourceExists(sSource) Then
EventLog.CreateEventSource(sSource, sLog)
End If
Dim ELog As New EventLog(sLog)
ELog.Source = sSource
Try
ELog.WriteEntry(sEvent, EventType, EvtID)
Catch ex As Exception
End Try
Your comment made me second guess this, just I just did a quick test of that by adding a couple of calls into the code that would write some event logs to check they didn't pop up something, and it didn't, so I'm pretty sure that's not it. (Actually, if it was the message would be a bit different. So it definitely couldn't be).
|
|
|
|
|
Have you considered doing a remote debug attachment? When the message box pops up, you could break the program and see where it is currently executing.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I tried that, but couldn't get it to work. However, I do have logging code throughout the application that basically updates the database to show where it's up to, so I can see that it's run that line and then the failure is either between there and the next logging point or the failure occurred doing the next logging.
And what that is showing is that it's coming up in all sorts of different places. The subroutine that was doing this was running asynchronously, so I thought maybe it didn't like that, and I tried changing things to use the openasync connection method instead of the standard open, that made no difference, so I tried changing it from being an asynchronous process to having a timer that runs every 30 seconds and runs this process synchronously on the tick. I came in this morning and the logs all showed up to date, and were continuing to update every 30 seconds, but when I logged into the server it still had a pop up there. It's like the timer ticked, ran the process, it got the pop up and stopped, but then on the next tick it ran it again and that one ran fine.
Technically that partially fixes the problem because it's not being stopped from functioning by this pop-up, probably just one of the times it ran it failed, but I really need to get rid of these pop-ups altogether. It'd driving me rather crazy. It just doesn't make sense. It's working most of the time. The process makes lots of SQL connections each time it cycles and they are working constantly, but then at some point, usually in the middle of the night, one is doing this in a way that no error handling is able to catch it.
|
|
|
|
|
Dear All,
I create one SQL Script like Insert Query and Save into Text File. I need to execute the Text File Content into Data Base using batch or whatever from VB.net Application. How to achieve this?
|
|
|
|
|
|
Hi Everyone,
Is there is an replacement/Mappings for AspTypeLibrary component. I have an VB6 legacy application migrated to VB.NET .
Iam searching for replacement to avoid registry entries and placing only in GAC.
Req = ContextUtil.GetNamedProperty("Request")
Sever = ContextUtil.GetNamedProperty("Server")
Dim Appln As ASPTypeLibrary.Application
Appln = ContextUtil.GetNamedProperty("Application")
Any help is appreciated.
Regards,
Manowj
-- modified 17-Feb-16 10:28am.
|
|
|
|
|
what the subject says
I have a server where the skript is running. Now I have the PC-Name, where i will show the inputbox. How can i do that?
|
|
|
|
|
You can't.
The script MUST be running on the client computer in order to show a user interface on it.
You'll have to entirely rethink how you're doing whatever process you're doing.
|
|
|
|
|
As Dave said, you cannot do this. You would have to install a client version of your software that is listening on a certain port. Then you can have a server version of your software that sends messages on that port.
However, if you do not need to ask for input and all machines are Win7 or higher, you can use msg. Open a command line and type msg and you'll see the options, http://pcsupport.about.com/od/commandlinereference/p/msg-command.htm[^].
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a datacolumn which contain same data field, i want to get it into combobox JUST one items (remove duplicate in combobox).....please help me, I'm really sorry, my english very BAD....
modified 12-Feb-16 0:44am.
|
|
|
|
|
|
Thanks very much...I'll try it...
|
|
|
|
|
Hi There
I Have A Text box That I Want The Content To Display The Content In Percent
Thanks In Advance
|
|
|
|
|
|
please i was given this error message (Conversion from string "GH¢6" to type 'Integer' is not valid.) when i tried to save my records
here is my code below
|
|
|
|
|
Perhaps you should not add the text "GHC" to the value, but simply show it in a label after the textbox. The textbox should only contain numbers if you want to convert it to an integer (so, no decimals!), or you should remove the characters before converting.
Ask your teacher for some extra explanation on data-types.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
As a further comment, this site is not the best place for your questions until you have a good understanding of both .NET and Visual Basic. You should get hold of a good study handbook on these subjects, rather than trying to learn by posting questions here.
|
|
|
|
|
i want the code on how to Attach a Ghanian cedi currency symbol to a text box called txt_Cost
|
|
|
|
|
|
Please i have created a form with several textboxes i want the error indicator code to prompt a user to type a value in case the user did not put any value in the text box click on the save button
modified 10-Feb-16 5:13am.
|
|
|
|
|
You probably need to subscribe to one of the events that fires when text changes: TextBox Events (System.Windows.Forms)[^]. You should also disable the Save button until all text fields have been successfully validated.
|
|
|
|
|
Well, you're not going to get any code. This is a education problem. You have to learn how validation works and write your own code.
Google for vb.net Windows Forms validation tutorial[^] and start reading.
|
|
|
|
|
Hi i want that merge columns of string values join in single cell in vb report by using group
Data
ID Name
1 paint
1 cross
1 less
2 to
2 gain
3 increase
I need in report as
ID Name
1 paint, cross, less
2 to, gain
3 increase
|
|
|
|
|
Was a bit trickier than I first thought - but here it is :
Dim arr() As String = New String() {"ID Name", "1 paint", "1 cross", "1 less", "2 to", "2 gain", "3 increase"}
Dim newstring As String = "", endstr As String = ""
Dim c As Integer = 1, num As Integer
Dim newnum As Boolean = True
For i = 0 To arr.Count - 1
If i > 0 Then
If Integer.TryParse(arr(i).Substring(0, i.ToString.Length), num) And num = c Then
If newnum = True Then newstring += num.ToString & " "
newstring += arr(i).Substring(i.ToString.Length + 1, arr(i).ToString.Length - i.ToString.Length - 1)
End If
If (i + 1) <= (arr.Count - 1) Then
If Integer.TryParse(arr(i + 1).Substring(0, (i + 1).ToString.Length), num) And num = c Then
newstring += ", "
newnum = False
Else
endstr = newstring
newstring = ""
newnum = True
End If
Else
endstr = newstring
newnum = True
End If
c = num
Else
endstr = arr(i).ToString
newnum = True
End If
If newnum = True Then Debug.Print("##### : " & endstr)
Next i
|
|
|
|