|
I am using a small vb.net program to download software update files from an internal web site (security is not an issue). The program runs periodically on the users' machines and checks for, downloads and installs new updates that have been placed on the server.
I would like the same program to upload the user name, workstation name, date, etc. to the website and have the website store this information in a text or xml file on the server so I can review it to see who is downloading the updates. It would need to handle the case where multiple people may be downloading simultaneously.
|
|
|
|
|
I would write a web service that can be called to insert the data in to the DB.
|
|
|
|
|
Thanks for the response. I do not do any web development so I need something really specific. We are not supposed to use access databases because they crash the server. I think I am limited to javascript, vbscript (I am familiar with that). I am the site author but I can't install any software to run on the server.
|
|
|
|
|
Your only other option, given your restrictions, is to construct a web page that the client can use to submit the required data. Since you've said that you can't use a database, you're only other option for storing the data is in some kind of flat file, be it text or XML, or whatever...
|
|
|
|
|
So you are saying I cannot automate the process, as in sending a web request to a specially formatted hidden web page via a vb.net standalone EXE from the client computer?
And the only way to accomplish this is to have the user physically enter the data and click a button. Is that correct?
|
|
|
|
|
GTVic wrote: So you are saying I cannot automate the process, as in sending a web request to a specially formatted hidden web page via a vb.net standalone EXE from the client computer?
No, I'm saying you CAN do this. It's not the best solution though. A better one would be a Web Service. Either way, you have to write code that runs on the web server to do the database work.
GTVic wrote: And the only way to accomplish this is to have the user physically enter the data and click a button. Is that correct?
Nope.
|
|
|
|
|
Hey everyone. I'm trying to write some automation to help me test a shell extension witten in c++(not by me).. I'm using VB, and I would like to open windows explorer to a certain folder, then create a folder structure containing files.(I've managed to get this far).. Now I would like to simulate a right click on the folder just created and select one of the options in the menu.. Can anyone suggest how to do this.. I'm not even sure what to search for online, or what I'm trying to do is called..
thanks in advance
|
|
|
|
|
This is going to be much harder than you think. This requires in-depth knowledge of how windows and mouse messages work as well as the internals of Explorer.
There are tools on the market that do exactly this, like IBM's Rational Functional Tester[^], or Mercury TestDirector[^].
|
|
|
|
|
Yah, I realize that, I actually have Rational Functional Tester available, but enjoy the challenge.. I really wanted to work with VB through VS2008 to come up with something.. I guess it isn't as simple as adding a library reference to user32.dll and call in the appropriate methods to get me were I want to go..
|
|
|
|
|
LFlindall wrote: I guess it isn't as simple as adding a library reference to user32.dll and call in the appropriate methods to get me were I want to go..
Oh no. FAR from it!
|
|
|
|
|
Hi,
I have read all items from one listview and I have stored this in another listview. However I want to use one item as group name in 2nd listview. I am able to show all items in 2nd listview but no group headers. I wonder why groups doesn't show up in 2nd listview. Where do I make mistake? All the items are getting listed under default group header.
Thanks.
Private Sub BasketOnCounter()
Dim LCounter As Int32 = 0
Dim Found As Boolean = False
ListView1.BeginUpdate()
'Here we create groups with Artist names
For Each BasketItem As ListViewItem In Form1.ListView6.Items
Found = False
If ListView1.Groups.Count > 0 Then
For Each ArtistItem As ListViewGroup In ListView1.Groups
If ArtistItem.Header = BasketItem.SubItems(0).Text Then
Found = True
Exit For
End If
Next
End If
If Found = False Then
Dim SetGroupName As New ListViewGroup
SetGroupName.Header = BasketItem.SubItems(0).Text
SetGroupName.HeaderAlignment = HorizontalAlignment.Left
ListView1.Groups.Add(SetGroupName)
LCounter += 1
End If
Next
'Here we add items in listview
LCounter = 0
For Each BasketItem As ListViewItem In Form1.ListView6.Items
Try
ListView1.Items.Add(BasketItem.SubItems(1).Text)
ListView1.Items(LCounter).SubItems.Add(BasketItem.SubItems(3).Text)
ListView1.Items(LCounter).SubItems.Add(BasketItem.SubItems(2).Text)
ListView1.Items(LCounter).Group = ListView1.Groups(BasketItem.SubItems(0).Text)
'When I enable the following line the VS2008 is crashing.
ListView1.Groups(BasketItem.SubItems(0).Text).Items.Add(ListView1.Items(LCounter)) here
Catch ex As Exception
MsgBox(ex.ToString & " " & BasketItem.SubItems(0).Text)
End Try
LCounter += 1
Next
ListView1.EndUpdate()
End Sub
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
What's the error that it comes up with??
Did you Enable Visual Styles in your Project properties?? Without it, Grouping will not work in the ListView.
|
|
|
|
|
I enabled the visual styles. I am getting a system null exception error message. I double checked to make sure that Listview has the groups. However during adding and item and then assigning a group to item suppose to list the item under the specified group. The list view list all the items under the default group.
I think I have forgotten something but no idea what it is. The problem is still persit.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Alright I am making a program for class and my problem is in the 2nd and 3rd parts to my code. The second block is a loop to read stuff from the text file and output it in the lstDisplay. My promlem is I have to figure out a "final total" as seen in the third block. Since the loop redifines the DIM'S "name, rate, hour, and gp" I cannot figure out my total amount. I basically need to add up all the gp's to find my total, however, Since it loops when it gets to the point of my total amount gp obviously only has 1 value which is the final value read from the text file. What could I do to fix this problem and come up with my final value?
Public Class frmPay
Private Sub btnPay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPay.Click
Dim sr As IO.StreamReader = IO.File.OpenText("6-PP-1.txt")
Dim dates, name, rate, hour As String
Dim gp As Double
dates = sr.ReadLine
lstOutput.Items.Clear()
lstOutput.Items.Add("Payroll Report for week ending " & dates)
lstOutput.Items.Add(" ")
Dim headerStr1 As String = "{0,-10}{1,15}{2,15}{3,15}"
Dim headerStr2 As String = "{0,-10}{1,15:C}{2,15}{3,15:C}"
lstOutput.Items.Add(String.Format(headerStr1, "Employee", "Hourly Rate", "Hours Worked", "Gross Pay"))
lstOutput.Items.Add(" ")
Do While sr.Peek <> -1
name = sr.ReadLine
rate = CDbl(sr.ReadLine)
hour = CDbl(sr.ReadLine)
gp = CDbl(rate * hour)
lstOutput.Items.Add(String.Format(headerStr2, name, rate, CStr(hour), gp))
Loop
lstOutput.Items.Add(" ")
lstOutput.Items.Add(String.Format(headerStr1, "Final Total", " ", " ", gp))
sr.Close()
End Sub
End Class
Thanks for the help,
Shawn Deprey
|
|
|
|
|
Hi,
if all you need is the overall total, why not just accumulate while you are enumerating the items, hence put totalGP = totalGP + gp inside the while loop; you need to declare and intialize your accumulating variable before entering the loop. This is elementary; wouldn't you rather buy and study a programming book?
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
|
|
|
|
|
I am just starting to learn visual basic. This VB class is my first attempt at coding. Even if it is elementary in the world of high level programming languages. I have to start somewhere I guess.
As for your advice I THINK I understand what you said however I cannot modify my files on the computer I am using so I will test them when I get home in an hour. Thank you for the speedy response Luc!
|
|
|
|
|
Hi Its Shawn again. I first declaired totalgp as a double and put it just outside the loop and then realized how the looping would continuously add gp to total gp if it were inside the loop like you said. You have been a tremendous help. TYVM!
Shawn D.
|
|
|
|
|
Hi, I am working in a Startup company as a Software Engineer.. Actually we are planning to do an ERP application in VB.Net and back end as SQL Server 2000.. Can any one please suggest me that which language is preferable to develop that application...
Thanks in advance,
Victoria
VB.Net
|
|
|
|
|
Well you have ready stated VB.NET although I would suggest you use VB.NET 2008 if you are developing with VB.NET. I would also question the use of MS SQL Server 2000. Sure 2005 or even better 2008 should be your perfered back-end.
An ERP System is a very ambishous project, especially considering you will be competing in a market dominated by the likes of SAP, Microsoft, SunSystems and may other large companies.
If I was a protential dragon investor in your company (see Dragons Den), then I would be saying "I'm out !!!"
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks for ur reply..
can i use MySql as backend DB instead of SQL Server..
Thanks in advance
Victoria
VB.Net
|
|
|
|
|
Yes, but you would need to use the System.Data.OleDbClient namespace rather than the System.Data.SqlClient namespace.
Also read the licensing document for MySQL. If you intend to use it commercially, it's not free, were as MS SQL Server Express is, but has limited functionality, but is easy to migrate to full MS SQL Server at a later date.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
wr3028 wrote: which language is preferable
* VB.NET, as you already have in-house knowledge of that language. It only needs to be converted to cash
* ANSI SQL, keep your query's simple and understandble
* English, for the much needed documentation.
If you come at a point where VB.NET "feels" insufficient, rest ensured that you can mix in some C# or even C++, without any hassle
You guys got a blog running?
I are troll
|
|
|
|
|
hi all
i have a datagridview in which i have manually bounded columns(in runtime)
i want to talk the print out of this datagridview and also need to transfer it into excel
plz tell me how to do this.
I am using vs 2008 window application.
thanks in advance
Er. Jagwinder Singh
|
|
|
|
|
|
is this the answer??
Er. Jagwinder Singh
|
|
|
|