4,911 Posted Topics

Member Avatar for xHellghostx

What do you consider valid text? If you limit it to only letters and blanks then names like **Ryan O'Neal** and **Joseph Gordon-Levitt** would both be invalid. Why not just allow any characters, then parse on a blank. If you get more than two names then disallow. If the two …

Member Avatar for Reverend Jim
0
4K
Member Avatar for stultuske

>I'm not sure I see the benefit of showing who down votes, given the potential for revenge voting. >usually, it's someone who, as you call it, "takes revenge" on someone that downvoted them and did bother to explain why. You mean as opposed to the downvotes (which have been reversed) …

Member Avatar for stultuske
0
375
Member Avatar for tin.marcelino

I defined a datagridview to pull a table froom a database. The datagridview has AllowUserToAddRows set to false (otherwise there is a **Nothing** row at the end). Clicking any cell causes that entire column to be copied to the ListBox. Private Sub DataGridView1_CellClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick …

Member Avatar for Reverend Jim
0
143
Member Avatar for abdalqader.abdelhalem

You can scan through the rows with a For Each, then scroll to the row (if found). An example is For Each row As DataGridViewRow In DataGridView1.Rows If row.Cells(1).Value = txtName.Text Then row.Selected = True DataGridView1.FirstDisplayedScrollingRowIndex = row.Index Exit For End If Next

Member Avatar for kRod
0
151
Member Avatar for ScarWars9
Member Avatar for 2mhzbrain

I'd have to see your table definitions to recommend a solution but the problem is that if you want to specify two tables in a query then the tables have to be related (share a common field). Please post the table definitions and we'll see what we can do. In …

Member Avatar for 2mhzbrain
0
227
Member Avatar for Nutster

>Although I do sit in awe at those with 'Posting Guru' status. I once commented (verbally) to a friend on a beautiful, bright, moonlit/scattered clouds night that I was "awed by nature". She look back at me and said "well, I've always thought so".

Member Avatar for Reverend Jim
0
158
Member Avatar for siaosituimoloaublood

You could do (pseudocode) Dim strGrades() As String = {"F", "D", "C", "B", "A"} Dim intPoints() As Integer = {300, 350, 400, 450, 501} Dim intSearchPoints As Integer Dim intSub As Integer = 0 Integer.TryParse(txtPoints.Text, intSearchPoints) For Each entry As Integer In intPoints If intSearchPoints < entry Then Exit For …

Member Avatar for Reverend Jim
0
131
Member Avatar for Galbatorix

Try sql = "SELECT rooms.roomID, rooms.roomNumber, rooms.roomStatus,roomType.roomType, " _ & " roomType.adultRate, roomType.childrenRate, roomType.roomTypeID " _ & " FROM rooms INNER JOIN roomType " _ & " ON rooms.roomType = roomType.roomTypeID"

Member Avatar for Galbatorix
0
805
Member Avatar for kumar_g

Autocomplete will only show entries that begin with what is already entered. "Raj Kumar" will not show up because it does not begin with "Kum".

Member Avatar for QVeen72
0
1K
Member Avatar for kimangel

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?

Member Avatar for kimangel
0
3K
Member Avatar for IIM

Does it help if you navigate away from that page then return to it?

Member Avatar for IIM
0
489
Member Avatar for Ketsuekiame

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 …

Member Avatar for Reverend Jim
2
997
Member Avatar for diafol

>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.

Member Avatar for Dani
0
331
Member Avatar for Papa_Don

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 …

Member Avatar for Papa_Don
0
136
Member Avatar for rsewak

My Dad raised two bears from cubs. I only have dogs and cats but I enjoy the occasional glass of wine.

Member Avatar for TonyG_cyprus
0
740
Member Avatar for UKnod

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.

Member Avatar for UKnod
0
286
Member Avatar for jkulp4
Member Avatar for chdboy

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. …

Member Avatar for chdboy
0
213
Member Avatar for tafarie

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 …

Member Avatar for Reverend Jim
0
288
Member Avatar for Clan Onion

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 …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Siberian

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 …

Member Avatar for Reverend Jim
0
157
Member Avatar for ilovemwah

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 …

Member Avatar for monching
0
113
Member Avatar for cromz

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 …

Member Avatar for Reverend Jim
0
152
Member Avatar for glynntowler

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) …

Member Avatar for Reverend Jim
0
190
Member Avatar for chdboy

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) …

Member Avatar for Reverend Jim
0
91
Member Avatar for Papa_Don

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 …

Member Avatar for Papa_Don
0
244
Member Avatar for robert.montgomery.75054

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 …

Member Avatar for tinstaafl
0
164
Member Avatar for ImZick

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.

Member Avatar for ImZick
0
571
Member Avatar for ImZick

Still too many commas. Try If result = DialogResult.Yes Then cmd.CommandText = "UPDATE [" & EBU2DB_LOB & "] " _ & " SET Months = ?," _ & " Brand = ? " _ & " WHERE LOB = ? "

Member Avatar for Reverend Jim
0
120
Member Avatar for ImZick

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 …

Member Avatar for Reverend Jim
0
503
Member Avatar for Papa_Don

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.

Member Avatar for Reverend Jim
0
311
Member Avatar for tux4life

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 …

Member Avatar for Reverend Jim
0
514
Member Avatar for samirkhzem

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] …

Member Avatar for Reverend Jim
0
337
Member Avatar for lynn.scott.731

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 …

Member Avatar for Palebushman
0
322
Member Avatar for somjit{}

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.

Member Avatar for Palebushman
0
214
Member Avatar for jomitz03

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 …

Member Avatar for Reverend Jim
0
256
Member Avatar for Papa_Don

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

Member Avatar for TnTinMN
0
618
Member Avatar for slpefanis

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 …

Member Avatar for Reverend Jim
0
135
Member Avatar for stultuske

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 …

Member Avatar for <M/>
0
276
Member Avatar for Papa_Don

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 …

Member Avatar for TnTinMN
0
618
Member Avatar for maytham

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).

Member Avatar for maytham
0
269
Member Avatar for Reverend Jim

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 …

3
114
Member Avatar for Ashenvale

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" …

Member Avatar for Ashenvale
0
142
Member Avatar for akasekaihime

I think you want If System.IO.File.Exists(FileToCopy) Then MsgBox("File already exists") Else System.IO.File.Copy(FileToCopy, NewCopy) End If

Member Avatar for Reverend Jim
0
249
Member Avatar for thewilf

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.

Member Avatar for thewilf
0
245
Member Avatar for Papa_Don

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 …

Member Avatar for Reverend Jim
0
183
Member Avatar for Joe2

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 …

Member Avatar for Akbar ali it
0
213
Member Avatar for uknown2

You can start by posting your question in the java forum instead of VB.Net. Consider it moved.

Member Avatar for bguild
0
2K
Member Avatar for EliteNMC

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 …

Member Avatar for tinstaafl
0
198

The End.