Click here to Skip to main content
15,908,661 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Imports Microsoft.Win32.security Problem Pin
Colin Angus Mackay6-Nov-07 10:24
Colin Angus Mackay6-Nov-07 10:24 
QuestionDataGridView Column Order Display Index Issue Pin
Kschuler6-Nov-07 8:44
Kschuler6-Nov-07 8:44 
Questionheadset mic Pin
break_day6-Nov-07 7:54
break_day6-Nov-07 7:54 
AnswerRe: headset mic Pin
Christian Graus6-Nov-07 8:53
protectorChristian Graus6-Nov-07 8:53 
Questionmy dataset isnot refreshing [modified] Pin
Motajo Tolu6-Nov-07 7:03
professionalMotajo Tolu6-Nov-07 7:03 
AnswerRe: my oledbdataadapter isnot refreshing Pin
Kschuler6-Nov-07 7:09
Kschuler6-Nov-07 7:09 
GeneralRe: my oledbdataadapter isnot refreshing Pin
Motajo Tolu6-Nov-07 9:57
professionalMotajo Tolu6-Nov-07 9:57 
GeneralRe: my oledbdataadapter isnot refreshing Pin
Kschuler6-Nov-07 10:14
Kschuler6-Nov-07 10:14 
Do you have the .SelectCommand.CommandText set in the OleDbDataAdapter1 object before you retrieve data from the database? It should be the same as your SELECT when you are using the OleDbDataReader. You also must have the connection set, but I'm assuming you just didn't show us that code. So how are you tying the DataSet to the textbox/navigation controls? Are they showing the OLD data, or do they just get cleared after you perform an update?

You should try to put a breakpoint on the line right AFTER you've filled the DataSet. Then quickwatch the dataset and look at the data you have brought back. Here you will be able to see if the DataSet is actually bringing back the updated data. If the data is the updated data, then the problem is however you are connecting your textboxes to the DataSet.

I do things very different than you, so I'm kind of confused by your code in general. If you are just going do an execute non query you can do that with just a Command object, you don't need the DataAdapter. Like this:
mycmd = "Insert into Assets(AssetID,AssetDescription,AssetCategory,Department,DateAcquired,Cost,ModelNumber,DepreciationPercent,MaintenanceType,comment,Location) Values ('" & assetId & "','" & assetdescription & "', '" & assetcategory & "', '" & department & "', #" & dateacquired & "#, '" & costprice & "', '" & modelnumber & "', '" & depreciation & "', '" & maintenancetype & "', '" & comment & "','" & location & "')"
conn.Open()
mycommand.Connection = conn
mycommand.CommandText = mycmd
mycommand.ExecuteNonQuery()
conn.Close()
Also, you may want to look into using parameters for insert statements like this, to avoid SQL Injection. And there are ways to update the DataSet and have it automatically generate the proper Insert or Update or Delete statements for you. You may want to look at some articles about this if you are interested.
GeneralRe: my oledbdataadapter isnot refreshing Pin
Motajo Tolu6-Nov-07 10:47
professionalMotajo Tolu6-Nov-07 10:47 
Questionpassing string array to C++ fromVB.net Pin
xyhan6-Nov-07 6:22
xyhan6-Nov-07 6:22 
QuestionHow can i send text to another application textbox? Pin
IRBoy6-Nov-07 5:48
IRBoy6-Nov-07 5:48 
QuestionVB Form Pin
railay296-Nov-07 3:22
railay296-Nov-07 3:22 
Question,VB Form Pin
railay296-Nov-07 3:19
railay296-Nov-07 3:19 
QuestionSpeech to text Pin
Bismark Appah6-Nov-07 3:12
Bismark Appah6-Nov-07 3:12 
AnswerRe: Speech to text Pin
Guffa6-Nov-07 6:10
Guffa6-Nov-07 6:10 
GeneralRe: Speech to text Pin
Paul Conrad6-Nov-07 18:16
professionalPaul Conrad6-Nov-07 18:16 
QuestionVlookups in Excel Pin
nick46-Nov-07 0:57
nick46-Nov-07 0:57 
QuestionRegistry Accessing Pin
SekharOne5-Nov-07 22:37
SekharOne5-Nov-07 22:37 
AnswerRe: Registry Accessing Pin
AliAmjad5-Nov-07 23:08
AliAmjad5-Nov-07 23:08 
GeneralRe: Registry Accessing Pin
SekharOne11-Nov-07 20:06
SekharOne11-Nov-07 20:06 
QuestionCrystal Report 9 VB6 Pin
aqui_i5-Nov-07 22:01
aqui_i5-Nov-07 22:01 
QuestionIs OOPS concept in Visual Basic 6? Pin
KETAN K.5-Nov-07 21:27
KETAN K.5-Nov-07 21:27 
AnswerRe: Is OOPS concept in Visual Basic 6? Pin
Christian Graus5-Nov-07 22:09
protectorChristian Graus5-Nov-07 22:09 
AnswerRe: Is OOPS concept in Visual Basic 6? Pin
Guffa6-Nov-07 6:06
Guffa6-Nov-07 6:06 
Questionmy oledbdataadapter in not refreshing [modified] Pin
Motajo Tolu5-Nov-07 21:18
professionalMotajo Tolu5-Nov-07 21:18 

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.