|
Hi All
Could somebody give me a bit of advice? The problem I have at the moment is I’m sending a complex data type of about 30 bytes in length from a vb.net application to a vb.net web service every two seconds. Once the application has packaged the data into the soap \ xml request it grows in size to around 750 bytes on each request. This works out to approx 32.4mb per day of traffic to the web server. My questions is
Is there an more efficient way of streaming 30 bytes of data from an application to a web service without the overheads of the Http / XML headers.
Any info or tips would be gratefully received
Cheers
Tony G
|
|
|
|
|
I have one listbox and one textbox.
The listbox has over 300 items and you can select multiple items.
How can i make that selected items apear in textbox, and if i unselect the same item that its not in textbox annymore. Thanx
|
|
|
|
|
Well I guess you could be clever and keep a reference to all the selections but I have found that using the Stringbuilder Class takes a lot of overhead out of string manipulation - note each time a selection/deselection is made then a complete rebuild is done - beats having to keep track of other stuff - great advantage of the StringBuilder is SPEED. There is another more fancy way for handling this using Predicates and Actions as described in the new article (worth a read)http://msdn.microsoft.com/msdnmag/issues/06/09/AdvancedBasics/default.aspx
Anyway to keep things simple....Hope this helps...
Private mstrbld As New StringBuilder
Private mcolSelectedObjects As ListBox.SelectedObjectCollection
Private mobjSelectedObject As Object
Private Sub lstListBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstListBox.SelectedIndexChanged
mstrbld.Length = 0
mcolSelectedObjects = Me.lstListBox.SelectedItems
For Each mobjSelectedObject In mcolSelectedObjects
mstrbld.Append(mobjSelectedObject.ToString & vbCrLf)
Next
Me.txtTextBox.Text = mstrbld.ToString
End Sub
|
|
|
|
|
Where can I get some code samples using NTgraph with Visual Basic 6.0
to perform 2D plots?
|
|
|
|
|
I'm publishing a VS 2005 Visual Basic application and I want the updates published to our server to be checked automatically and installed.
It works well, but the app shows a messagebox to the user and asks if they want to install the update or skip.
I don't want them to skip. Can you force the update. I don't see any settings in the publish options.
Any help is greatly appreciated
Lost in the vast sea of .NET
|
|
|
|
|
How do I view the generated code in my form? In .net 1 it was there in the code window but in .net 2 it seems to be hidden.
|
|
|
|
|
Expand the Form's node in the Solution Explorer and they'll be a code file called Form.Designer.vb. This contains all the designer code. It's part of the new partial class concept in .NET 2, it's pretty useful once you get to know it.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
In VS 2005 I'm not sure why there is a Publish Version and an Assembly Version. Shouldn't they be the same? I have a help about box that I picked up off of Code Project that I use in all my apps. This help box picks up the AssemblyVersion which is not changed each time I publish even though the Publish version changes.
Any insight on this would be greatly appreciated...
Lost in the vast sea of .NET
|
|
|
|
|
Hello,
I wanted to know can we add two or more data adapters in same form for e.g. if incase i want to search by first name with button1 and want to search last name with button2 on same form with same or different data tables or data source or different connections. Even wanted to create datasets for different connections. Is it possible Please let me know. I would be really very greatful
Bye....
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hello All,
I'm trying to create a good drag and drop effect for my user control. My user control is basically a panel with some labels and textboxes and it has area which you can click to drag and drop it. I was able to implement the drag&drop functionality but it is horrible and too basic, you don't see the control "shape" while you're dragging it, and when you drop it, it was like you had clicked right in the center of it.
Main question, do you guys have a nice example of drag and droping user controls? Showing that shadowed shape while you're dragging it? Just like when you drag and drop any window in the microsoft windows?
Best Regards
|
|
|
|
|
Hi All
I need to compare the difference between 2 time intervals...
label1.text has a start time hh.mm.ss and label2 has an end time. I need to compare the time between the two.
Is there a timeDiff like the dateDiff???
Please Help...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
hi
check the TimeSpan class
Tamimi - Code
|
|
|
|
|
Was to quick asking the question.
<br />
Dim TimeStart As Date<br />
Dim TimeStop As Date<br />
<br />
TimeStart = CDate(labStartTime.Text)<br />
TimeStop = CDate(labStopTime.Text)<br />
labTimeDiff.Text = "Days from today: " & DateDiff(DateInterval.Second, TimeStart, TimeStop)<br />
<br />
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
i have created a 'XYZ.txt' text file in 'C:\Sasmi' folder by using vb6 as per user requirement. i want to open the selected 'C:\Sasmi' folder automaticaly for user so that he\she know where is the file created and the format of the file (As provided in the ZIP Folder Extraction wizard where user can see the selected folder by selecting the option 'Show Extract File')
Can any one help me regarding this.
Sasmi
|
|
|
|
|
Hi
You can set the "Path" property of the filelist box. Hope this helps!
Kanniah
|
|
|
|
|
How to convert in vb.net a '07' hexa value to '00000111' bit sequence?
|
|
|
|
|
|
hi,
Everyone know how to create the daily employees OverTime hour report in listview which mean the listview must included with some columns eg: Name, Age, Day1, Day2....... Day31!
So, the output is something like this:
Name Month Day1 Day2 Day3 ........ Day31
Steven Dec 1hour 2hour 0.5hour 1 hour
Marry Dec 5hour 1hour 2 hour 3 hour
. . . . . .
. . . . . .
So, i want create a new application which using the vb.net with m.access and the output record is look something like the "calendar" but it is using the "listview " to list the everyday record data for each employee!
Please help!!!
charleslau2855
|
|
|
|
|
I having a weird problem now... all the function run correctly, but the msgboc just didnt show out... it may make my user confuse is the function been run or not.
when i test it the function just run correct, save item if there is no record of it which mean Add new record, if there is record in it then dont perform anything.
Do
On Error Resume Next
temp = rs![custNO]
rs.MoveNext
Loop Until (rs.EOF)
If ccustno.Text <> rs![custNO] Then
rs.AddNew 'Add detail to record
rs.Fields("CustNo") = ccustno.Text
rs.Fields("Customer") = UCase(ccus.Text)
rs.Fields("Area") = UCase(carea.Text)
rs.Fields("Address") = UCase(caddress.Text)
rs.Fields("Tel") = cphone.Text
rs.Fields("Fax") = cfax.Text
rs.Fields("Name") = UCase(cattn.Text)
rs.update 'update u record
rs.MoveFirst
MsgBox ("Customer Information Recorded")
Else: MsgBox ("Customer already been create, please use the UPDATE function for update"): Exit Sub
End If
---
i have edit the code, it works well now
'move the return the database at first data if not it will have no current record error
'using DO loop to set the value to temp then compare it again and perform action with another ifelse outside the loop.
rs.MoveFirst <br />
Do<br />
If ccustno.Text <> rs![custno] Then<br />
ElseIf ccustno.Text = rs![custno] Then<br />
temp = rs![custno]<br />
End If<br />
rs.MoveNext<br />
Loop Until (rs.EOF)
<br />
If ccustno.Text <> temp Then<br />
....
-- modified at 22:52 Tuesday 5th September, 2006
|
|
|
|
|
You are mistaken, the function doesn't run correctly at all.
When you exit the loop the recordset will always be read to the end, so when you try to use rs![custNO] , you will get an error as you can not read anything from the recordset beyond the last record.
You are using On Error Resume Next, but you are not checking for errors anywhere, which means that you silently ignore anything that goes wrong.
---
b { font-weight: normal; }
|
|
|
|
|
ok now i have cancel the on error resume
I having error on handle my error control, when user try to save a new data which alreayd been create in database then i will show an error msg out with IF -ELSE but i not sure y the error keep pop out ask me to debug as it said there is duplication in the database.
I have already put the If else statment to control it ....but not really work...
If ccustno.Text <> rs![custno] Then
rs.AddNew 'Add detail to record
rs.Fields("CustNo") = ccustno.Text
rs.Fields("Customer") = UCase(ccus.Text)
rs.Fields("Area") = UCase(carea.Text)
rs.Fields("Address") = UCase(caddress.Text)
rs.Fields("Tel") = cphone.Text
rs.Fields("Fax") = cfax.Text
rs.Fields("Name") = UCase(cattn.Text)
rs.update 'update u record ------->highlight ERROR
rs.MoveFirst
MsgBox ("Customer Information Recorded")
ElseIf ccustno.Text = rs![custno] Then
MsgBox ("Customer already been create, please use the UPDATE function for update")
Exit Sub
End If
|
|
|
|
|
when user try to save a new data which alreayd been create in database then i will show an error msg out with IF -ELSE
What code do you use to make that check?
campbells wrote: but i not sure y the error keep pop out ask me to debug as it said there is duplication in the database.
The reason is very simple. You get the error message for the reason that is clearly stated in the error message. You are trying to create a duplicate in the database.
---
b { font-weight: normal; }
|
|
|
|
|
When i put the "on error resume next" my function work well REcently i just use that for temporary atleast my function work well.., cause i see the result myself. When user save something that already been save it will not save any change, if the record no exist then Add the new record. But the problem here is it always pop up the msgbox that record been save even when the record didnt save at all. suppose it have to pop up the other msgbox about the data didnt save in my elseif statement ccustno.Text = rs![custno].
|
|
|
|
|
campbells wrote: When i put the "on error resume next" my function work well
It only works well as long as there is no error. If there is an error, it doesn't work, but you don't notice it. At least not until later...
When user save something that already been save it will not save any change
That is because you are ignoring the error. Handling errors by ignoring them is not a good way to handle them. That is like turning the radio up when the car starts to sound funny...
But the problem here is it always pop up the msgbox that record been save even when the record didnt save at all.
That is because you ignore the error.
---
b { font-weight: normal; }
|
|
|
|
|
This just doesn’t make any sense what so ever.
[Warning This is Pseudo Code!]
Why not do a
Select Count(CustNo) as CountOfCustNo from Table where CustNo = ccustno.Text
[The above sql query doesn’t protect again SQL injection attacks.]
Then you can just do a simple
Int iCount
iCount = rs.Fields("CountOfCustNo”).Value
if iCount > 0 then
Msgbox “Customer Number in use”
Else
Update the record
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|