4,901 Posted Topics
Re: What is the current definition of the field? And if the numbers are off because you deleted the field from your program then how is it auto number? | |
Re: You haven't provided us with the relevent code. You call connection, Recordset (a bad name for a sub, by the way) and recexist. You haven't told us what line is generating the error. You haven't even bothered to ask an actual question. Please take the time to provide some information … | |
Re: This is a shot in the dark, but is it possible there is no field named "Tamil" in NameList? | |
Re: What is the layout of the new table? There is always a way to combine tables. The trick is to combine them in a way that makes sense. If you just want a table of people regardless of whether the people are students or faculty then you could SELECT * … | |
Re: It's too vague a question. | |
Re: Any sufficiently advanced technology will eventually be used as a cat toy. | |
Re: How about int factorial (int n) { return n == 0 ? 1 : n * factorial(n-1); } | |
Re: That could actually be Do Until rcdset.EOF and it would help if we knew what line was causing the error. | |
Re: Have you considered a loop? That will make the code independent of the number of words and definitions. 'using MIN ensures you don't get an error if one array is longer than the other. 'checking TRIMmed values eliminates blank entries For i As Integer = 0 To Math.Min(UBound(Keywords), UBound(Definitions)) Dim … | |
Re: If you are able to get keyboard functionality from the previous post you might be able to run system restore by executing rstrui.exe | |
Re: For the record, rubberman's post in the deleted thread which bears repeating was > You have 4 problems here. > >You posted this twice. >You posted both to the VB.NET, not the C forum. >You didn't ask a question. >We don't do your homework for you. >:-( | |
Re: I suggest you start by reading a book on vb.net and a book on SQL. When you have specific questions feel free to ask. | |
Re: Add this code Private Sub TextBox1_DragEnter(sender As System.Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter If e.Data.GetDataPresent(DataFormats.FileDrop) Then e.Effect = DragDropEffects.All End If End Sub Private Sub TextBox1_DragDrop(sender As System.Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop If e.Data.GetDataPresent(DataFormats.FileDrop) Then Dim files() As String files = e.Data.GetData(DataFormats.FileDrop) TextBox1.Text = My.Computer.FileSystem.ReadAllText(files(0)) End If End Sub … | |
Re: Those macros are obscene and should never be used in code that anyone else ever has to work with. They may make the code shorter but they obscure its meaning. They also use variables that are not passed to the macro. Blecch! | |
Re: Read the file names into a list. When you want to display a random picture, generate a random index number from 0 to FileList.Count - 1. If you use the Tag property of the PictureBox to store the currently displayed index then you can avoid a separate global variable. Your … | |
Re: @mike - The reason I prefer an IDE like Visual Studio over managing code and makefiles by manually creating config files and compiling/linking via command line is because I prefer coding to managing code. I looked at your example of git on the previous page and my first (and second … | |
Re: Try replacing your loop header where you populate the listbox with For intFill = 0 To 9 You may be reading too many lines into your arrays. You can verify by putting a breakpoint at line 32 and checking the array bounds. | |
Re: You haven't given us much to go on. I assume this application involves a database. If so you haven't said what type. Typically, if you want to get the next available value in a field you use the MAX function, then add one. Also, you'll have to get the number … | |
Re: That's not code. That's just a string. Please show us your code and include the error message (if any) and the line causing it. | |
Re: You should put single quotes around string (character) values and not around numeric values. You didn't include your field definitions for the database table so we can't tell which values are which. For example, INSERT INTO myTable (idnum) VALUES('123') where idnum is defined as INT may cause a problem because … | |
Re: I'll assume that con.Open() was successful due to the lack of an error message. Have a look at [this example](http://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks) to see how to use parameterized queries with OleDB. You are not using the correct format. While it is possible to have an INSERT where you don't specify the field … | |
Re: Is there a question? How does the code relate to the title? A datareader is not used to insert data into a table. | |
Re: Are you trying to import the data from within Excel or are you doing it from another environment such as C, C++, vb.net, vbScript, etc.? Once we get more information we can move this thread to the appropriate forum and proceed from there. | |
Re: You should not be declaring a separate variable for each keyword and definition. That's what a dictionary (also known as an associative array) is for. Private myDic As New Dictionary(Of String, String) Then you assign words and definitions as Do while more words and definitions read next word from the … | |
Re: The short (and not very useful) answer is "it depends". For vb.net apps that I write for my own use, I do not bother to create an installer. I just copy the the entire project folder to an "apps" folder and run the app directly from the bin\release folder. This … | |
Freakin' awesome. Canadian men and women rock it again! | |
Re: First of all, that's not a question. Second of all, we don't do your homework for you. And lastly, read this first before posting questions. | |
Re: First of all, that's not a question. Second of all, we don't do your homework for you. And lastly, read [this first](http://www.daniweb.com/software-development/vbnet/threads/424836/please-read-this-before-posting) before posting questions. I see this is the second post in a row from you saying "do this for me". You won't learn anything by getting others to … | |
Re: I liked the post. Simple examples that illustrate one or two (at most) techniques are the best. I learned ADO as an access technique when I started developing DB apps years ago. Recently I stumbled upon an article which reflected my opinion on Microsoft's data access philosophy. It stated (in … | |
Re: It would help if you showed us the code that you are using. Please provide the exact query. qry = "INSERT INTO mytable (fld1,fld2) " & " VALUES(" & TextBox1.Text & " ," & TextBox2.Text & ")" probably won't help because the actual query depends on the values from the … | |
Re: You can try [Perry's ID3 Tag Library](http://glassocean.net/perrys-id3-tag-library/). It is a free, open-source ID3v1 and ID3v2 tag parsing utility for MP3 files. | |
Re: If you declare a variable in a function that has the same name as a global variable then the local variable masks or overrides the global one. If you need to reference the global variable from within the function you can refer to it as Me.varname. Public Class Form1 Private … | |
Re: You can create a dictionary to hold the keywords and definitions. Dim Words As New Dictionary(Of String, String) The key is the word and the value is the definition. Then create a list from just the words. To randomize the list in the display you can do while the list … | |
Re: I can't help you but this just reinforces what I believed all along. The only secure place to store stuff is locally. If you store in the cloud then you risk losing it. Granted, you can lose it locally, but at least you control the level of backup and the … | |
Re: Definitely Stardock's [ModernMix](http://www.stardock.com/products/modernmix/). | |
Re: You need to declare the number of tokens at the class level to prevent it from going out of scope (and losing its value). You can initialize it to 100 either in the form load event or in the handler for a **Reset** or **New Game** button (if you have … | |
Re: You have to create the object by Dim appXL As New Excel.Application **CreateObject** is how you would do it in vbScript, not vb.net. See [here](http://www.daniweb.com/software-development/vbnet/code/464769/export-listview-to-excel-spreadsheet) for an example. You also have code that appears outside the Sub/End Sub (Err_Handler:). Not good. I assume that somewhere you have an **On Error … | |
Re: If you use proper indentation then the solution becomes more obvious. Dim decCharges As Decimal Dim intHours As Integer Const decA As Decimal = 9.95D Const decB As Decimal = 14.95D Const decC As Decimal = 19.95D inthours = CInt(txtHours.Text) If radA.Checked = True Then If intHours >= 10 Then … | |
Re: Keep in mind that chat is not the best option for getting help for anything other than the simplest problems. | |
Re: If you enjoyed Face Off (or even if you didn't) you have to watch [The Nostalgia Critic review](http://thatguywiththeglasses.com/videolinks/thatguywiththeglasses/nostalgia-critic/41915-faceoff) | |
| |
Re: Instead of trying to build this into your program you might consider a program like Qliner Hotkeys. I've been using it for years. You can assign the program to a hotkey (like WINDOWS-F12) and when that hotkey is pressed, the program 1. starts and comes to the front if it … | |
Re: I can sympathize with people for whom English is a (distant) second language. They want help but have trouble describing the problem in an unfamiliar language. Simple communication is difficult enough. Technical communication is near impossible. However, I would rather put the onus on the person posing the question to … | |
Re: As is typical with sample code/controls like the one referenced in the previous post, it is written in an older version of Visual Studio. Loading it into Visual Studio 2010 (which is what I am using) results in nothing usable. There are also no instructions on how to rebuild the … | |
Re: It's not clear (at least to me) how you are rearranging the data. | |
Re: What is your question? Does your code work? If not, are you getting an error? If so then what is the error and what line is causing it? If you are just asking for suggestions then I suggest you use parameterized queries. You can find an example [here](http://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks) in the … | |
Re: Try qry = "SELECT Product_id, Name, Description, Quantity, " & " Unit_Price, Quantity*Unit_Price AS TotalCost " & " FROM myTable" |
The End.