| | |
session counter
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2007
Posts: 276
Reputation:
Solved Threads: 37
Another problem in my program is that I can't get my access database to update. It works on the other fields here is the code
I've tried a yes/no and text field but it won't update in access. Am I missing a step?
ASP.NET Syntax (Toggle Plain Text)
Public Sub Lockuser(ByVal path As String, ByVal userId As String, ByVal access As Boolean) Dim sqlConn As OleDbConnection Dim oCommand As OleDbCommand Dim stmt As String Dim param As OleDbParameter ' This sets up the connection to the database including the path passed in sqlConn = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & path & "") sqlConn.Open() oCommand = New OleDbCommand() oCommand.Connection = sqlConn stmt = "UPDATE tblUsers SET Access = @access" & " WHERE(tblUsers.UserID = @userId)" 'declare parameter objects for the command object param = New OleDbParameter() param.ParameterName = "@userId" param.Value = userId oCommand.Parameters.Add(param) param = New OleDbParameter() param.ParameterName = "@access" param.Value = False oCommand.Parameters.Add(param) oCommand.CommandText = stmt oCommand.CommandType = CommandType.Text oCommand.ExecuteNonQuery() sqlConn.Close() End Sub
I've tried a yes/no and text field but it won't update in access. Am I missing a step?
Last edited by rapture; Oct 18th, 2009 at 3:07 pm.
![]() |
Similar Threads
- Back Button problem (PHP)
- difference between session and application scope at jsp (JSP)
- Hit counter (JavaScript / DHTML / AJAX)
- Determine if session exists (PHP)
- Login used to work (ASP.NET)
- URGENT! Loading Roles From ticket.UserData (ASP.NET)
- loading roles from DB to auth cookie (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: how can I invoke browser's network authentication dialogue box in asp.net
- Next Thread: session counter
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





