Click here to Skip to main content
15,860,859 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net20-May-22 6:26
mvaJo_vb.net20-May-22 6:26 
QuestionRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 8:10
professionalEddy Vluggen20-May-22 8:10 
AnswerRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net20-May-22 8:56
mvaJo_vb.net20-May-22 8:56 
SuggestionRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 23:02
professionalEddy Vluggen20-May-22 23:02 
QuestionUpdating datagridview with image Pin
Jake Mazur17-May-22 3:23
Jake Mazur17-May-22 3:23 
AnswerRe: Updating datagridview with image Pin
Richard MacCutchan17-May-22 3:30
mveRichard MacCutchan17-May-22 3:30 
QuestionUpdating datagridview with image Pin
Jake Mazur17-May-22 3:20
Jake Mazur17-May-22 3:20 
AnswerRe: Updating datagridview with image Pin
Richard Deeming17-May-22 4:10
mveRichard Deeming17-May-22 4:10 
If you're not getting any errors, but your database is not being modified, then either there is no record in your database with the specified ID, or you're updating the wrong database.

One common problem is having a copy of your Access database as part of your project, and setting it to copy that file to the output directory. This will overwrite any changes you have made whilst your application was running.

You need to debug your code - in particular, check the value returned from the ExecuteNonQuery method, which will tell you the number of rows which were affected. In this case, it should return 1 - anything else indicates a problem with your data or your @ID parameter.

Quote:
VB.NET
Dim fs As FileStream
fs = New FileStream(imgName, FileMode.Open, FileAccess.Read)
Dim picturebytes As Byte() = New Byte(fs.Length - 1) {}
fs.Read(picturebytes, 0, System.Convert.ToInt32(fs.Length))
fs.Close()
You can simplify that block to a single line:
VB.NET
Dim picturebytes As Byte() = File.ReadAllBytes(imgName)




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

Questionxml with control createinfo Pin
JR21214-May-22 19:59
JR21214-May-22 19:59 
AnswerRe: xml with control createinfo Pin
Richard MacCutchan14-May-22 21:02
mveRichard MacCutchan14-May-22 21:02 
AnswerRe: xml with control createinfo Pin
Dave Kreskowiak15-May-22 4:58
mveDave Kreskowiak15-May-22 4:58 
GeneralRe: xml with control createinfo Pin
JR21216-May-22 8:26
JR21216-May-22 8:26 
GeneralRe: xml with control createinfo Pin
Richard MacCutchan16-May-22 9:09
mveRichard MacCutchan16-May-22 9:09 
GeneralRe: xml with control createinfo Pin
Dave Kreskowiak16-May-22 9:58
mveDave Kreskowiak16-May-22 9:58 
GeneralRe: xml with control createinfo Pin
JR21218-May-22 23:16
JR21218-May-22 23:16 
Questionhow to make .OBJ 3D model viewer for vb.net 2010 Pin
Android Oyunları9-May-22 7:12
Android Oyunları9-May-22 7:12 
AnswerRe: how to make .OBJ 3D model viewer for vb.net 2010 Pin
RedDk9-May-22 10:40
RedDk9-May-22 10:40 
Generalthat link isnt for vs2010 Pin
Android Oyunları22-May-22 5:48
Android Oyunları22-May-22 5:48 
Questionhow to view obj with direct x 8 vb6 Pin
Android Oyunları28-Apr-22 7:42
Android Oyunları28-Apr-22 7:42 
AnswerRe: how to view obj with direct x 8 vb6 Pin
Richard Andrew x6428-Apr-22 8:01
professionalRichard Andrew x6428-Apr-22 8:01 
GeneralRe: how to view obj with direct x 8 vb6 Pin
Android Oyunları28-Apr-22 8:27
Android Oyunları28-Apr-22 8:27 
JokeRe: how to view obj with direct x 8 vb6 Pin
Mycroft Holmes28-Apr-22 11:49
professionalMycroft Holmes28-Apr-22 11:49 
AnswerRe: how to view obj with direct x 8 vb6 Pin
CHill606-May-22 5:10
mveCHill606-May-22 5:10 
QuestionOperator '=' is not defined for type for 'DBNull' and string '1' Pin
LohJane20-Apr-22 23:13
LohJane20-Apr-22 23:13 
SuggestionRe: Operator '=' is not defined for type for 'DBNull' and string '1' Pin
Richard Deeming20-Apr-22 23:32
mveRichard Deeming20-Apr-22 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.