Microsoft
Software
Hardware
Network
Question : using Update procedure to update a table in Access database
Hi,
Can you help me find the error in the following code:
I use the code to update the counter field in a table called Survey in a database also called Survey.
NewCount is an integer variable which stores the value I need to save in the counter field.
Dim con As OleDbConnection
Dim comm As OleDbCommand
Dim strQuery As String
strQuery = "Update Survey set counter = newCount Where SurveyName = '" & lblSurveyName.Text & "'"
con = New OleDbConnection("Provider=
Microsoft.
ACE.OLEDB.
12.0;Data Source=C:\Survey.accdb;")
comm = New OleDbCommand(strQuery, con)
con.Open()
comm.ExecuteNonQuery()
con.Close()
Answer : using Update procedure to update a table in Access database
how about this
strQuery = "Update Survey set [counter] =" & newCount &" Where SurveyName = '" & lblSurveyName.Text & "'"
or this
strQuery = "Update Survey set [counter] =" & newCount &" Where SurveyName = '" & lblSurveyName & "'"
Random Solutions
publishing websites in TMG 2010
how to implement virtual mode in the DataGridView control?
IIS Web site works in all browsers except Safari on Mac
Asp.Net I need help. I am not passing Date values to my the Conrol Parameters?? in a SqlDatasource using Ajax
visual studio 2008 installation issue
If folder does not exist, then create one
How to burn multiple copies with roxio creator
BESX 5.0.1.4 and Exchange 2010 Users can't activate enterprise email
Physical installation of the Exchange 2007
SSIS and variable issues