4,901 Posted Topics
Re: -24C with a wind chill of -31C. It's warmer now than it's been for the last few days. | |
Re: You do the INSERT when there is no value entered for locid. Is this really what you want? Also, why are you using ExecuteReader for the INSERT? Use ExecuteNonQuery instead. You use ExecuteScalar when you are returning one value or ExecuteReader when you are returning more than one value. In … | |
Re: Regardless. You are still asking for someone to do your homework for you. You haven't shown us that you have put in any effort. | |
Re: If you are using OleDb then try access = "UPDATE tbl_location WHERE locid = ? SET locname = ?, locadd = ?" | |
Re: Nobody can say with any certainty what languages will still be around in 20 years. Even 5 years is difficult with some. If you want to port old VB programs with as little difficulty as possible I suggest just going to vb.net. I think you'll find porting vb to C++ … | |
Re: Let's look at the statement Dim MySQLStatement As String = "INSERT INTO player_log (Last_Name, First_Name) VALUES (' " & TxtLastName.Text & " ' , ' " & TxtFirstName.Text & " ')" If we plug in values "Jim" and "Jones" it evaluetes to INSERT INTO player_log (Last_Name, First_Name) VALUES (' Jones … | |
Re: You can find lots of good stuff in the [Code Snippets](http://www.daniweb.com/software-development/vbnet/code/_/58) section such as how to [Export ListView to Excel Spreadsheet](http://www.daniweb.com/software-development/vbnet/code/464769/export-listview-to-excel-spreadsheet) | |
Re: >Who wants to be seen by clients discussing grey hat matters on bing? For that matter, who wants to be seen on Bing? | |
Re: You don't need a datareader. All you need to know is if you have a record that matches the username and password. cmd.CommandText = "SELECT COUNT(*) FROM userinfo" & " WHERE usname = '" & textbox1.Text & "'" & " AND [password] = '" & textbox2.Text & "'" If cmd.ExecuteScalar … | |
Re: Question 1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Cursor.Position = MousePosition + Button2.Location - Button1.Location End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Cursor.Position = MousePosition + Button3.Location - Button2.Location End Sub Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click … | |
Re: The reason is that Me.Controls("CheckBox" & i) evaluates to a generic control and while a generic control has a **Visible** property, it does not have a **Checked** property. That is why you have to cast it to the correct control type first. You could also use a more specific for … | |
Re: You could use the COALESCE function. Given two or more parameters, it evaluates to the first parameter that is not null. SELECT fieldName = COALESCE(fieldName,0) FROM myTable SELECT fieldName = COALESCE(fieldName,'0') FROM myTable will replace all null values with 0 or '0' in the returned data depending on whether the … | |
Re: Judging by the other post I'm assuming MS Access. I suggest you have a look at the [W3 SQL Tutorial](http://www.w3schools.com/sql/sql_intro.asp) | |
Re: And even if it is read only you can still set the background colour to anything you want. Or you could just use a label control. | |
Re: Have you considered a career in technical writing? Your thoughts are clear and well organized and you seem to have a good grasp of proper grammar. There is a demand for people with those skills. ![]() | |
Re: We are not going to teach you everything you need to know about databases. I suggest you do a little googling. You can start with [W3 SQL Tutorial](http://www.w3schools.com/sql/default.asp?PHPSESSID=300ae3404d5fa2612f238abeebb8869c). | |
Re: Try googling how to create custom control in vb.net 2010 ![]() | |
Re: As far as I know you can't override that behaviour from within the application. Access to system folders is restricted to protect your system. If it could be overridden from with the application with some code then the system would not be aable to protect itself from malicious code. There … ![]() | |
Re: Please post your code. My guess is you are modifying the in-memory copy of the table but not saving it to the database. | |
Re: The statement Not_Business = True & MessageBox.Show("missing dob") is invalid. MessageBox returns type DialogResult. You have to compare that result to something to get a boolean. Example If MessageBox.Show("missing dob") = DialogResult.yes What are you trying to accomplish with that statement? | |
Re: What is the code behind **Knock()**? You could always create a sound file that has the desired sound repeated. Then you would only have to call the routine once as KnockKnock() | |
Re: Do you mean that when you bring up a blank form (so you can create a new entry) the ID number of the record that will be added is displayed? The answer depends on whether or not there is only one user hitting the database at a time. | |
Re: Try rec.Open "select * from Body_Markings_new where [Part Number] like '%" & txtsearch.Text & "%' ", conn, adOpenDynamic, adLockOptimistic It's my own preference, but I always avoid putting spaces in field names. It always leads to problems like this. | |
Re: There is no such thing as a SQL form, and reading information from an ini file does not require SQL. | |
Re: I use [DIVX Converter](http:\\www.divx.com) but I have also used [virtual dub](http://www.virtualdub.org/index.html) which can be run from the command line so you could build a batch file or script it to scan and convert a folder. | |
Re: He was speaking to people who believe in heaven. | |
Re: I think a better way to do this would be Private Sub TextBox1_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = vbCr Then Me.SelectNextControl(Me.ActiveControl, True, True, True, True) e.Handled = True End If End Sub Private Sub TextBox2_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress If e.KeyChar = … | |
Re: A handy reference for regular expressions can be found [here](http://www.regexr.com/). It also includes an area for interactive testing of regular expressions. You can use the provided sample text or paste your own sample text and refine the expression until it gives you the results you want. | |
Re: A handy reference for regular expressions can be found [here](http://www.regexr.com/). It also includes an area for interactive testing of regular expressions. You can use the provided sample text or paste your own sample text and refine the expression until it gives you the results you want. | |
Re: Try doing a `SELECT COUNT(*)` on the record with that ID. If you get a result of 0 then the record does not exist. | |
Re: I have a feeling that this is a homework assignment. | |
Re: To start with, you do strInput = InputBox("Please Enter Test Scores", "Enter Score") which prompts the user to enter the test scores. Then (supposedly once the user enters the scores) you ask for 10 more scores in For intCounter = 1 To 10 Step 1 Before the loop you set … | |
Re: >filter up every Company ID on keeping only two records What exactly do you mean by this? | |
Re: Please start a new thread for this question. | |
Re: Try removing the single quotes from the numeric fields as in qry = "SELECT * FROM [per_diem_accomodation] " & " WHERE [project number] = " & projcode & " AND [employee number] = " & empcode & " AND [current month] = '" & resultdate & "'" Also, you didn't … | |
Re: In the last week or so I posted a new tutorial on creating and managing background threads. You can find it [here](http://www.daniweb.com/software-development/vbnet/tutorials/477520/how-to-use-backgroundworker-to-create-threads). | |
![]() | Re: Go to a command prompt (running as administrator) and type icacls /? I think you want the /remove[:[g|d]] Sid removes all occurrences of Sid in the ACL. With :g, it removes all occurrences of granted rights to that Sid. With :d, it removes all occurrences of denied rights to that … |
Re: Of course it only works on individual words. What did you expect? | |
Re: You could download and burn a Linux LiveCD, boot from it, then copy the folder/files to a FAT32 partition. Then delete the original files and copy the copied folder/files back to their original locaion. That should kill the original ACLs (access control lists). | |
Re: I find the easiest way to figure this out is to place the controls in the IDE then look at the <form>.Designer.vb file that is created when you save. If you do that the sequence becomes (with a little rearranging for personal taste) 1. Create the tab control and add … | |
Re: >At best, it's nothing more than a placebo. And at worst it can prevent people from choosing legitimate and possibly life-saving treatment. Also, it takes valuable public health dollars out of the system. Correct me if I am wrong but I believe homeopathy has been officially endorsed by Prince Charles … | |
Re: There are a thousand ways that an application can "not work". What happens when you run it? | |
Re: You can make the code a lot cleaner and safer by using [Parameterized queries](http://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks). Here is an example using your INSERT cmd.CommandText = "INSERT INTO Product ([Item ID], [Item Name], " & "[Item Type], [Quantity], [Min Shelf Stock], " & "[Purchase Price], [Note]) " & "VALUES (?, ?, ?, ?, … | |
Re: I did a palm-to-forehead when I read that as well. | |
Re: We can't say whether or not you are doing it right if you don't show us what you have so far. You say you want to find the average of an arbitrary number of scores. Are the numbers to be entered all at once or one at a time? | |
Re: You have to use a delegate. There is an example [here](http://www.daniweb.com/software-development/vbnet/code/440614/backgroundworker-ip-monitor) | |
Re: I'm thinking you are using Parameterized Queries with OleDB. I have noticed that when I try cmd.CommandText = "SELECT au_lname,au_fname,zip FROM authors WHERE au_lname LIKE ?" cmd.Parameters.AddWithValue("@parm", "D%") my code works but when I try cmd.CommandText = "SELECT au_lname,au_fname,zip FROM authors WHERE au_lname LIKE @parm" cmd.Parameters.AddWithValue("@parm", "D%") I get **Must … | |
Re: It **is** showing you all of the results. It's just that all of the intermediate results are appearing so fast you don't get a chance to see them. I'm assuming **powervalue** is declared at the class level. In that case you could set up a timer with an interval of … |
The End.