|
Thanks keith,
its work
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I believe the function you are looking for is a tokenize function (split a string by a delimiter(separator))
EDIT: I tried to write one here for you but got confused, I will tommorow when I got more time.
EDIT AGAIN: Mine doesn't fit in memory.
-- modified at 3:12 Saturday 1st September, 2007
All of my programs are downloadable at fahadsadah.co.nr
|
|
|
|
|
Hi All
As my subject suggest i have a vb.net Application. Whilst its running does not allow my computer to logoff. I have tried this on two other machines to no avail. Any suggestions. ??
I didnt include code because I don't think its necessary .
Cheers
Dom
|
|
|
|
|
Windows would prefer all applications to end cleanly when it shuts down. It therefore waits until they do so. But after a while it should pop up a dialog asking if you want to "End Now" which forces the application to close.
The application is obviously not responding to the shutdown event. This could be because it is performing an extended operaration without responding to events.
Why type of application is this?
|
|
|
|
|
Hi Colin thats what I thought so something must be wrong.
Its a windows app.
Its starts off with a form starting at runtime named Hidden
here is the code that triggers at load
<br />
Private Sub Hidden_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
xSock.UDP_Listen(10080)<br />
AddHandler xSock.DataArrival, AddressOf UDPArrival<br />
End Sub<br />
in the above code it calls a class method as below
<br />
Public Shared Function UDP_Listen(ByVal Port As Integer) As Boolean<br />
Try<br />
UDP_Server_Port = Port<br />
UDP_Server = New UdpClient(Port)<br />
thdUdp = New Thread(AddressOf GetUDPData)<br />
thdUdp.Start()<br />
Catch e As Exception<br />
RaiseEvent Sock_Error(e.ToString)<br />
End Try<br />
<br />
End Function<br />
<br />
Private Sub UDPArrival(ByVal vData As String)<br />
TextBox1.Text = vData<br />
txtText.Text = vData<br />
xSock.UDP_Send("127.0.0.1", 10090, vData)<br />
End Sub<br />
so can you see how i can resolve this issue ?
THanks so far
|
|
|
|
|
you're problem is (I think) you start a new threat but never stop and close it so this thread still exists and on shutdown (of windows) windows does not know what to do with it (I think)
try the following (just a guess)
in the formclosing of you're main form put application.exit this should close all threads at once
or you could just close the thread when it has finished
hope this helps
|
|
|
|
|
yep gave it a try but no luck unfortunately
I have a sneeky feeling the form_closing is not firing when i try to exit or lof off..
surely someone knows why my crappy code is not working
thanks anyway TDDragon =)
|
|
|
|
|
Is there not an event on the application class that fires when Windows issues a shut down command? (It's been a while and I might be a bit rusty on that)
|
|
|
|
|
nothing i can see thats fairly obvious.
anyone else
thanks Colin anyway
|
|
|
|
|
It would appear your UI thread is blocked somewhere, but it's not obvious in the code you've posted. Single step through the execution of your server and watch the code run, line-by-line. If the debugger gets to a statement where it stops and doesn't execute the next line, you've found the block.
|
|
|
|
|
I am having a report folder which is based on crystal reports 4.3. I want to make this folder as virtual folder to the people who are all using the application.It's urgent.
Sivaraman.
|
|
|
|
|
What do you by a "virtual folder"??
sivaraman_sankaranarayanan wrote: It's urgent.
So what? If you want "urgent support", go pay Microsoft for it.
|
|
|
|
|
sivaraman_sankaranarayanan wrote: It's urgent.
How rude and makes people less inclined to help.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hello guys, im having trouble to write the code to select the next row in the datagrid.
Looked around and found this but it doesnt work;
datagrid.Select(1)
fyi: im on vb .net 2005 sp1
thanks in advance!
|
|
|
|
|
Hi,
Try this Me.BindingContext.Item(dg.DataSource, dg.DataMember).Position += 1
*dg = DataGrid
hope this helps
|
|
|
|
|
Hello,
VS 2005
I have a datagridview (order details) that is bound to a combo box (orders). Both controls are bounded using the bindingsource (bsOrders, bsOrderDetails)
The user will select a order from the combo box, and all the order details will be displayed in the datagridview.
The problem I am having, is that the user can edit the cells in the dgv, when they select another order from the combo box, those edits will disappear when they select that order again.
I don't want the cell changes to be commited to the database, only that they stay in the cell when the user selects from the combo box.
I have tried using the dgv.EndEdit() in the selectChangedCommitted event of the combo box. But this doesn't seem to have worked.
Many thanks for any suggestions,
Steve
|
|
|
|
|
VB6 HTML elements offsetParent recursive problem
How to recursively go through all parent elements of the current element on html page?
I do this and get error
While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _
elem.id & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent
Wend
|
|
|
|
|
This code snippet doesn't call itself, so how is this recursive?? This is just enumerating the elements at a single level. Perhaps a bigger snippet would help?? One that shows the rest of the code this snippet shows up in.
|
|
|
|
|
I have dropped all my emails into an access database, and now building a vb.NET windows app to query to return needed email bodies. The application runs through the database dataset function and returns 0 rows. I console.writeline the connection string and SQL statement and am able to pull records from the database. I can't see what I have wrong in the code. The function hitting the database is listed below. Please any help would be a really great thing. Thanks in advance.
Public Function GetSelectAnd2Records(ByVal strTableName, ByVal strCriteria1, ByVal strCriteria3) As DataSet
Dim ds As New DataSet
Dim strSQL As String
Dim dbConn As New OleDbConnection
dbConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NovaEmailKB\KNOWLEDGE BASE SSC.mdb;"
strCriteria1 = "*" & strCriteria1 & "*"
strCriteria3 = "*" & strCriteria3 & "*"
strSQL = "SELECT [ID], [Subject], [Body], [Received], [From] " & _
"FROM " & strTableName & " " & _
"WHERE (((Body) Like """ & strCriteria1 & """ And (Terminals.Body) Like """ & strCriteria3 & """)) " & _
"ORDER BY Received DESC; "
Dim cn As New OleDbConnection(dbConn.ConnectionString)
Dim cmd As New OleDbCommand(strSQL, cn)
Dim da As New OleDbDataAdapter(cmd)
Console.WriteLine(dbConn.ConnectionString)
Console.WriteLine(strSQL)
Try
cn.Open()
Console.WriteLine(cn.State)
cmd.Connection = cn
cmd.CommandText = strSQL
cmd.ExecuteNonQuery()
da.Fill(ds, "SelectAnd2Rtn")
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Dispose()
cn = Nothing
da.Dispose()
da = Nothing
Catch ex As Exception
MsgBox("An unexpected MS Access error has occured: " & ex.Message)
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Dispose()
cn = Nothing
da.Dispose()
da = Nothing
Return Nothing
Exit Function
End Try
Return ds
End Function
|
|
|
|
|
I'd start by picking a single method to fill a dataset and sticking with it. You've got two different methods in here. And I detest using string concatentation to build an SQL statement. Simplify it!
Public Function GetSelectAnd2Records(ByVal strTableName, ByVal strCriteria1, ByVal strCriteria3) As DataSet
' Are you sure Access uses asterisks as wildcards???
' I don't know because I don't use Access anymore...
strCriteria1 = "*" & strCriteria1 & "*"
strCriteria3 = "*" & strCriteria3 & "*"
Dim strSQL As String = String.Format("SELECT [ID], [Subject], [Body], [Received], [From] " & _
"FROM {0} WHERE [Body) Like ""{1}"" And (Terminals.Body) Like ""{2}""" & _
"ORDER BY Received DESC", strTableName, strCriteria1, strCriteria3)
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NovaEmailKB\KNOWLEDGE BASE SSC.mdb;")
Dim comm As New OleDbCommand(strSQL, conn)
Console.WriteLine(strSQL)
Try
Using da As OleDbDataAdapter = New OleDbDataAdapter(comm)
da.Fill(ds)
End Using
Catch ex As Exception
MsgBox("An unexpected MS Access error has occured: " & ex.Message)
End Try
Return ds
End Function
|
|
|
|
|
Thanks so much for the advise, however using your code for the function I am still returning 0 rows. When I put the query directly into Access I return 8 rows. Again thanks so much for your thought and advise, I'll keep plugging along.
|
|
|
|
|
It's not obvious in the code. Either the query string your using directly in Access is different than the one generated by the code or the table name your passing in is different, or the database the app is using is different from the one your direct query is using.
|
|
|
|
|
Thanks once again for your thoughts. I ran console.writeline on both the connection string and the sql statement then using start run opened the database and ran the query that was placed in the output window. What I have found is when I take out the like and run an equal to where I get results in the datagridview on my form. It is becoming obvious that my problem has to do with like in the query which allows it to run in Access but not through the application. My next move is to try % as the wildcard not *. I sure wish I could use SQL Server but that is just not in the cards.
Again thanks for all your help.
|
|
|
|
|
Hi,
I have been trying to load the google toolbar in a custom web browser. But when it comes to the following line:
System.Reflection.Assembly.LoadFrom("C:\Program Files\Mozilla Firefox\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\components\googletoolbar.dll")
It says:
"Could not load file or assembly 'file:///C:\Program Files\Mozilla Firefox\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\components\googletoolbar.dll' or one of its dependencies. The module was expected to contain an assembly manifest."
I'd appreciate any help on how this can be done.
Thanks,
Ahmad
|
|
|
|
|
The last few months I have been developing a windows application for my company .The development was first implemented with Visual Studio 2005 Team edition ( 180 trial version ). The company decided to buy VSTO 20005 last month . Why am i saying all this ? Three months ago we installed to all our clients our application using ClickOnce , so that we could support them with frequent updates . But when i tried to publish some changes using VSTO , i got an error that "my certificate was not in my certificate store" . After a lot of search i realised that when you publish an application using clickOnce your manifest file is being signed with a test certificate , it doesn't matter if you choose to sign clickonce or not ( i was not choosing to sign my clickonce application ) , in your applications properties . That certificate not only is for testing purposes but IT EXPIRES after 1 year . So , after the certificate is expired , the users can still use the application , but you can no longer use the clickonce setup you created before. I tried to create a new certificate , publish again , and it all worked great . But , for my surprise , we can no longer support , send updates to our customers , because the first clickonce installation and the second one DO NOT HAVE the same certificate ! The solution that microsoft offers is simple .... Uninstall the old one and install the new one . Thankfully i found some articles how to create a new certificate , that expires in any years i want , but the big issue remains .
How to update the old installations with the new certificate . Sorry for my long message but i believe that such a good effort creating click Once installation should not face that kind of troubles .
You can create your own certificate using http://msdn.microsoft.com/library/en-us/seccrypto/security/makecert.asp
and exporting it using http://msdn.microsoft.com/library/en-us/seccrypto/security/certmgr.asp
A very good article about Click Once http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnwinforms/html/clickoncetrustpub.asp
If anyone have any ideas how to overcome such an issue , without reinstalling everything , it would be much appreciated .
Thank you
|
|
|
|