| | |
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 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formview gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl





