4,901 Posted Topics
Re: Perhaps the behaviour is different in VB6 and earlier but in VB 2010 the items in the ListView are not editable. Are you sure you mean **ListView** and not some other control? | |
Re: Does it help if you navigate away from that page then return to it? | |
Re: How would you define "active contributors"? Anyone can make large numbers of posts. They don't have to be quality posts. Would that person be an active contributor? Should he/she be allowed to award endorsements even though nothing of value has been contributed? It's difficult to devise a system that is … | |
![]() | Re: >I'm going to start sending out mass-emails to community members who have been around awhile. I don't have a problem with this. I seriously doubt that Dani is going to abuse this by filling my inbox with spam. |
Re: Ideally, the customer name should not appear more than once. What you should have is an Orders table that contains (possibly) the fields OrderNo CustomerName OrderDate etc where you have only one record per order, and an OrderItems table with one record per order item such as OrderNo PartNo Quantity … | |
Re: My Dad raised two bears from cubs. I only have dogs and cats but I enjoy the occasional glass of wine. | |
Re: I know that to load an image from a file I do Photograph1.Image = New Bitmap(filename) I can't recommend what you should do without knowing what **arr** is or what it contains. | |
Re: What error are you getting and on which line? | |
Re: In the Form Load handler you can set focus to the desired control like TextBox1.Focus When in design mode, under the **View** menu item, select **Tab Order**. This will show a number on each control. As you click on each control the tab order will be set to that sequence. … | |
Re: An easier way to loop over specific controls is For Each chk As CheckBox In Me.Controls.OfType(Of CheckBox)() so your code then becomes Dim numChecked As Integer = 0 Dim message As String = "You checked " For Each chk As CheckBox In Me.Controls.OfType(Of CheckBox)() If chk.Checked Then numChecked += 1 … | |
Re: My memories of microcode are vague but machine code (what we program in when we write Assembler code) does things like load a register from memory perform a simple operation save the register back to memory whereas microcode actually concerns itself with things like put this value on the data … | |
Re: Try this const DRIVE = "F" set fso = CreateObject("Scripting.FileSystemObject") On Error Resume Next Do set drv = fso.Drives(DRIVE) if err.Number = 0 then Exit Do If MsgBox("Drive " & DRIVE & ": is not available, Please mount the drive", vbRetryCancel, "Test") = vbCancel Then Wscript.Quit End If err.Clear Loop … | |
Re: Of course it is possible, but if you are at the point in your education where you are doing a thesis then you are also at the point where you should 1. know enough to get a good start on the project 1. know that you shouldn't expect others to … | |
Re: Why do you have duplicate records? When someone "takes" 2 items from location A, how do you determine if they are to be removed from record 1 as opposed to record 2, 4, 5, etc? Also, when you select sum(supplies) from store where storedlocation ='" & textbox1.Text & "'" the … | |
Re: I'm curious as your choice of words. You said you set Virtual memory to zero on that drive. Do you mean you set it to **none**? Or did you set it to the number **zero**? if **none**, did you reboot after? I have found a couple of drives (external USB) … | |
Re: Typically, a company will have a payroll table which contains a record for each paycheque issued. One of the fields on that record will be the employee's base salary. You could determine the dates of all salary changes by doing a SELECT DISTINCT on that field. There would also (usually) … | |
Re: If you've installed SQL Management Studio then you can find the current location of your files by right clicking the server instance in the left pane and selecting **Properties**. Select **Database Settings** in the window that appears and the folders for Data and Logs will be displayed. You can attach … | |
![]() | Re: You don't need a For loop or a Do loop or any kind of loop. The number you want is intCount = Filter(strGrades,strSearchFor).Count as long as you won't have other than single letter grades. For example, if your list of grades included "A B B A A+ A-" then the … |
Re: Add another column (make the width=0) and populate it with the month numbers, then sort on that column. Or you could just add the items in month order to begin with. Or you could add your own custom sort routine for when the user clicks on the Month column header. | |
Re: Still too many commas. Try If result = DialogResult.Yes Then cmd.CommandText = "UPDATE [" & EBU2DB_LOB & "] " _ & " SET Months = ?," _ & " Brand = ? " _ & " WHERE LOB = ? " | |
Re: And please provide details. For example, what is "Sample"? I'll assume that because you use Oledb in the title it is a database but you don't say what kind of database or provide some field names. Since you want to populate a listbox I can also infer that you expect … | |
Re: I suggest you download (free) {MS SQL Management Studio](http://www.microsoft.com/en-ca/download/details.aspx?id=8961) and install it using [this procedure](http://blogs.msdn.com/b/bethmassi/archive/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010.aspx). It will greatly help in creating and managing databases. You can open a table and type the data directly into a grid. | |
Re: Instead of tracking down the source of the bug, why not just filter it for now. When you go to add login points, skip the increment if the login occurred within xx minutes of the last login. <sort of irrelevent aside but an example of "real world" fixes> On our … | |
Re: I don't have Access installed (I use MS SQL) so I created the table in MS SQL then scripted the table. The portion that might be of use to you is CREATE TABLE [dbo].[HoldInvoice]( [Barcode] [varchar](20) NOT NULL, [ItemName] [varchar](40) NOT NULL, [Quantity] [int] NULL, [Price] [money] NULL, [Total] [money] … | |
Re: If I ever get a used computer this is what I would do (and what I recommend for you) - take an image ([Macrium Reflect](http://www.macrium.com/reflectfree.aspx) is free and easy to use) - wipe the hard drive and repartition - install the operating system from scratch The image would allow me … | |
Re: The maximum size of a hard drive partition is not determined by the operating system (32 bit or 64 bit). It is determined by the file system. Thus, NTFS can manage a larger partition than FAT or FAT32. Whether the medium is solid state memory or magnetic platters is irrelevant. | |
Re: You didn't say what line was causing the error but for starters you should change cmd.CommandText = "UPDATE tblResidence " & _ ", ReId='" & Me.txtstdID.Text & "'" & _ ", Previous='" & Me.txtPrev.Text & "'" & _ ", Present='" & Me.txtPresent.Text & "'" & _ ", Reading='" & Me.txtRead.Text … | |
Re: If your textboxes are named TextBox1 through TextBix36 you can do For i As Integer = 1 To 36 Dim txt As TextBox = Me.Controls("TextBox" & i) txt.Text = "name" & i Next | |
Re: Don't worry too much about the amount of data. I developed and maintained a database that had to store over 24000 records per hour (over half a million per day) and the data had to be kept forever. At the time I retired we were up to ten years and … | |
Re: Unfortunately I have seen at least one signature stating "if you endorse me then I will endorse you", which defeats the purpose of the endorsement and, as was stated, devalues it for everyone. I think we should all strive to endorse only those people who actually deserve it. By the … | |
Re: I threw together a test project. The form has ten textbox controls named TextBox1 through TextBox10. There is one button named btnSave. When the form loads it puts ten strings inito the ten textboxes. Clicking btnSave copies all of the text from the textboxes (in order of name) into a … | |
Re: Look at lines 32-37. You open two If blocks but don't close them with End If. Please use the **Code** tool to insert code so that it gets properly formatted. I fixed it for you (this time). | |
If you have any particular topics that you'd like to see a code snippet for then please post your requests here. In order to avoid duplication of effort, if you feel inclined to respond to a request then please post here indicating that you will create the requested code snippet … | |
Re: You should be using [parameterized queries](http://www.daniweb.com/software-development/vbnet/code/445801/avoiding-sql-injection-attacks). But to answer your question, try login = "SELECT * from usernames " _ & " WHERE Username = '" & TextBox2.Text & "' " _ & " AND [Password] = '" & TextBox1.Text & "' " _ & " AND GETDATE() < ExpireDate" … | |
Re: I think you want If System.IO.File.Exists(FileToCopy) Then MsgBox("File already exists") Else System.IO.File.Copy(FileToCopy, NewCopy) End If | |
Re: That is correct. I've tried to find a way to have both the headphones and internal speakers active at the same time and was told (at least by Dell) that it would require a hardware mod. | |
Re: When you create a table, by default it has no Primary Key. When the records get inserted they appear, physically, in the order in which they are added. It is possible to have duplicate records (generally not a good idea). When you want to retrieve a record, because the table … | |
Re: You can try uninstalling the ones you seldom use, however, in my experience uninstalling still leaves around a lot of crap on the drive and in the registry. You might want to just reinstall Windows. I don't know your capabilities but this is how I typically configure - 60 gig … | |
Re: You can start by posting your question in the java forum instead of VB.Net. Consider it moved. | |
Re: I suggest you create a map. That could be a dictionary where the key is the original byte and the value is the byte you want to replace it with. Then you can loop through the original bytes and replace each byte with the mapped byte. As in Dim map … | |
Re: In my textbox the text scrolls to the left as I type when there are more characters than can be displayed. I don't have to do anything special. | |
Re: That is such an open ended question that a short answer is impossible. Please provide more details. What are the tables you want to link and how are they related? | |
Re: In order to simplify your code you might put the "please enter" text into the Tag property of each textbox, then you could write a generic routine that checks for blank fields. Something like Private Function IsBlank (txt as TextBox) If txt.Text = "") Then MsgBox(txt.Tag) txt.Focus Return True End … | |
Re: The typical way is to do something like select the count of records with the requested username if count > 0 then that name is already taken else add the name to the database end if The select would look like "SELECT COUNT(*) FROM mytable WHERE Username = 'newuser'" which … | |
Re: I changed to using phrases. It doesn't take much to remember (or to type) something like "Open the pod bay doors, Hal". I'm sure it's a lot harder to crack than 123456 or qwerty. | |
Re: **Password** is a reserved word. Try passwordchange = "UPDATE Student SET [Password] = '" & newpass & "' WHERE Username = '" & username & "';" | |
Re: Here's how to insert a new record. Dim con As New OleDbConnection("Provider=SQLNCLI10;Server=.\SQLEXPRESS;Database=mydb;Trusted_Connection=Yes;") Dim cmd As New OleDbCommand("", con) cmd.CommandText = "INSERT INTO myTable (Firstname,Middlename,Lastname) VALUES(?,?,?)" cmd.Parameters.AddWithValue("@FirstName ", Firstname.Text) cmd.Parameters.AddWithValue("@MiddleName", Middlenameame.Text) cmd.Parameters.AddWithValue("@LastName ", Lastname.Text) con.Open() cmd.ExecuteNonQuery() con.Close() An update query requires that you be able to identify a particular record first. … | |
Re: When I google PFO I get - Patent foramen ovale (PFO) is a hole between the left and right atria (upper chambers) of the heart that fails to close naturally soon after a baby is born. - A rejection letter received after an unsuccessful job interview. - A non-profit, non-denominational … | |
Re: I was in a competition once. The rules were simple. If I produced quality code in a timely manner I got to keep my job. The competition lasted 29 years. | |
Re: Try this Dim cmd As New OleDbCommand("", con) cmd.CommandText = "DELETE FROM [" & EBU2DB_LOB & "] " _ & " WHERE Brand = ? " _ & " AND LOB = ? " _ & " AND Months = ? " cmd.Parameters.AddWithValue("@Brand ", Form_Month_End_Report.Combo_LOB_Brand.Text) cmd.Parameters.AddWithValue("@LOB ", Form_Month_End_Report.Combo_LOB_LOB.Text) cmd.Parameters.AddWithValue("@Months", Form_Month_End_Report.Combo_LOB_Month.Text) … |
The End.