Using insert and update commands I update an access database immediately, but do not update the dataset in memory. How do I do this?
I don't think dropping the connection removes the dataset from memory?
I would have though that
dbsupport.update(dssupport, "SupportCall") would do...
I am passing a variable from one one to the another e.g.
Public Sub mysub(ByVal number As Integer)
cmdsupport = dbconn.CreateCommand
cmdsupport.CommandText = "select * from supportcall where ID = '" & number & "'"
dbsupport.Fill(dssupport, "SupportCall")
However...
I am relatively new to VB.Net and to be honest modern programming in general (long gone are the days of Turbo Pascal) and I need some help with classes.
I want to pass a variable from one form, so that it can be used as part of connection string in a new form.
I have a button that I wish to...
I want to use a string builder rather than creating the massive string as below.
sqlscript = "INSERT INTO Supportcall(ID,Contact,Description,Status,operator,customer,[date],rework,source,module)" & " VALUES('" & txtcallnumber.Text & "','" & txtcallcontact.Text &...
I use an insert script to update data in an access database and I can see the record has been amended by view the raw data.
However, unless I shut down my application and restart it the data in memory is not updated.
How do I commit the changes to memory as well as the database?
I have programmatically created a new grid style, but can not seem to get the datagrid to use it. What am I diong wrong?
Dim ts As New DataGridTableStyle()
Dim cs As DataGridColumnStyle
cs = New DataGridTextBoxColumn()
cs.Width = 20
cs.MappingName =...
Behing the form load sub,I populate some text and combo boxes with data:-
cmbstatus.DataBindings.Add("Text", dssupport.Tables("Supportcall"), "Status")
txtoperator.DataBindings.Add("Text", dssupport.Tables("Supportcall"), "Operator")...
I see it is possible to set which sub a form calls when the escape button is pressed, but is the same feature available if the user hits the form exit controller e.g. the x in the top right corner?
If it isn't, how can acheive it in code?
Why does this code never quit the application?
Dim result As DialogResult
MsgBox("Are you sure you wish to quit the application?", MsgBoxStyle.YesNo)
If result = DialogResult.Yes Then
End
Else
Exit Sub
End If
Depending on the status, certain text boxes and buttons are disable using the txtcontact.enabled = false statement.
However, this always sets the cell and button colour to the off grey. Is is possible to determine the colours used when the cell is enabled/disabled?
When connecting to an Access 2000 db using the oledbadapter from vb.net, is it possible to read the ID of the last record in the database.
What I trying to do is use a sql script to insert a new record, but can not insert since I do not know the ID to insert the new record to.
When connecting to an Access 2000 db using the oledbadapter, is it possible to read the ID of the last record in the database.
What I trying to do is use a sql script to insert a new record, but can not insert since I do not know the ID to insert the new record to.
The exe will run on the machine where VB.Net is installed no problem.
When I build the solution and run it on an XP or W2K box, even though both machines have the dotnetredist installed I get the CLR error:-
process ID = 2560, thread ID = 3956
Any thoughts?
I am tring to use an inser sql to update the database.
insertSQL = "INSERT INTO Supportcall(ID,Contact,Description)" & " VALUES(txtcallnumber.text,txtcallcontact.text,txtcalldescription.text)"
where txtcallnumber.text are cells in the form.
When I run the app, the...
The following prodedure should save a new row to the database.
I can't see what the error is, but when I create the command builder, the complier does not like dbsupport.
What have I done wrong
Dim NewRow As System.Data.DataRow
Dim dsadapter As OleDbDataAdapter
Dim dr As DataRow
dr =...
The following sub is used to store in the dataset a new record/row.
With dssupport.Tables("Supportcall")
NewRow = .NewRow()
NewRow("ID") = Me.txtcallnumber.Text
NewRow("Description")=Me.txtcalldescription.Text
.Rows.Add(NewRow)
End With
However when I come to hit...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.