4,901 Posted Topics

Member Avatar for iAssistant

-24C with a wind chill of -31C. It's warmer now than it's been for the last few days.

Member Avatar for Stuugie
0
4K
Member Avatar for vbshad

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 …

Member Avatar for Mr.M
0
2K
Member Avatar for Elvi

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.

Member Avatar for Elvi
0
255
Member Avatar for vbshad

If you are using OleDb then try access = "UPDATE tbl_location WHERE locid = ? SET locname = ?, locadd = ?"

Member Avatar for vbshad
0
746
Member Avatar for dw85745

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

Member Avatar for Reverend Jim
0
374
Member Avatar for henryz_box

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 …

Member Avatar for henryz_box
0
1K
Member Avatar for rikb53

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)

Member Avatar for Reverend Jim
0
232
Member Avatar for John.

>Who wants to be seen by clients discussing grey hat matters on bing? For that matter, who wants to be seen on Bing?

Member Avatar for emmaharward789
0
322
Member Avatar for henryz_box

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 …

Member Avatar for henryz_box
0
14K
Member Avatar for AQWst

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 …

Member Avatar for Reverend Jim
0
108
Member Avatar for Start4me

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 …

Member Avatar for Reverend Jim
0
334
Member Avatar for Sadaf_1

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 …

Member Avatar for Reverend Jim
0
342
Member Avatar for tirumalai

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)

Member Avatar for Reverend Jim
0
149
Member Avatar for tirumalai
Member Avatar for Centorpe

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.

Member Avatar for Centorpe
0
88
Member Avatar for asif49

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.

Member Avatar for iamthwee
0
630
Member Avatar for Ryan Huxley

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

Member Avatar for Reverend Jim
0
171
Member Avatar for Papa_Don
Member Avatar for deletedaccount
0
281
Member Avatar for akkbkht

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 …

Member Avatar for deletedaccount
0
3K
Member Avatar for tshukela.george

Please post your code. My guess is you are modifying the in-memory copy of the table but not saving it to the database.

Member Avatar for Reverend Jim
0
173
Member Avatar for Gus_19

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?

Member Avatar for Reverend Jim
0
307
Member Avatar for OTOSystem

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

Member Avatar for oussama_1
0
193
Member Avatar for airhalynn101

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.

Member Avatar for airhalynn101
0
2K
Member Avatar for Sushma Somesh

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.

Member Avatar for Sushma Somesh
0
205
Member Avatar for Dr.Lipe

There is no such thing as a SQL form, and reading information from an ini file does not require SQL.

Member Avatar for Reverend Jim
0
79
Member Avatar for Cygnus333

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.

Member Avatar for SaintAce
0
642
Member Avatar for KushMishra
Member Avatar for PerplexedB

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

Member Avatar for Reverend Jim
0
1K
Member Avatar for lavanya uppala

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.

Member Avatar for PerplexedB
0
1K
Member Avatar for prashant9928

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.

Member Avatar for Reverend Jim
0
394
Member Avatar for Nebil

Try doing a `SELECT COUNT(*)` on the record with that ID. If you get a result of 0 then the record does not exist.

Member Avatar for Nebil
0
567
Member Avatar for ahmedsa
Member Avatar for cmo3223

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 …

Member Avatar for Reverend Jim
0
171
Member Avatar for GilbertB

>filter up every Company ID on keeping only two records What exactly do you mean by this?

Member Avatar for Reverend Jim
0
222
Member Avatar for Dani
Member Avatar for Nebil

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 …

Member Avatar for Nebil
0
206
Member Avatar for ahmadzina85

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

Member Avatar for Reverend Jim
0
388
Member Avatar for mrkm1188

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 …

Member Avatar for Reverend Jim
0
188
Member Avatar for danyalempire
Member Avatar for ddanbe
0
360
Member Avatar for alpha849321

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

Member Avatar for LaxLoafer
0
411
Member Avatar for yuvjeeth

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 …

Member Avatar for yuvjeeth
0
285
Member Avatar for ddanbe

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

Member Avatar for jwenting
0
734
Member Avatar for yuvjeeth
Member Avatar for yuvjeeth
0
945
Member Avatar for Bader100

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 (?, ?, ?, ?, …

Member Avatar for Reverend Jim
0
1K
Member Avatar for Ancient Dragon
Member Avatar for Jasperious

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?

Member Avatar for Reverend Jim
0
322
Member Avatar for uDevv

You have to use a delegate. There is an example [here](http://www.daniweb.com/software-development/vbnet/code/440614/backgroundworker-ip-monitor)

Member Avatar for Reverend Jim
0
278
Member Avatar for oweniit

Sounds like you want someone to do your homework for you. That's just not going to happen.

Member Avatar for Reverend Jim
-2
323
Member Avatar for pezza

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 …

Member Avatar for pezza
0
320
Member Avatar for ahmadzina85

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 …

Member Avatar for Reverend Jim
0
200

The End.