Access Problem

This is a discussion on "Access Problem" within the Classic ASP section. This forum, and the thread "Access Problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 27th, 2006, 16:28
New Member
Join Date: Jan 2006
Location: Belgium
Age: 19
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Access Problem

Hey, I got problems with updating a date and time information into an accessdatabase.

This is the code I use
Code: Select all
<%
 If Session("loggedin") <> true Then
  Response.Redirect("index.asp?login=failed")
 End If
%>
<%
 Dim username
    username = Session.Contents("username")
%>
<% 
 Response.buffer=True
 Set Connect = Server.CreateObject("ADODB.Connection") 
 Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("accounts.mdb") 
%>
Test
<%
 Dim time
 time = now()
  SQL = "UPDATE userlist SET last_login = '" & time & "' where id = '"& username & "'"
  Connect.Execute(SQL)
  
  Connect.Close
  Set Connect = Nothing
%>
But when I run the code, I get this error
Code: Select all
Test 

Microsoft OLE DB Provider for ODBC Driverserror '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. /rpg/test.asp, line 21
Reply With Quote

  #2 (permalink)  
Old Jan 27th, 2006, 21:47
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Access Problem

Which line is line 21?
Reply With Quote
  #3 (permalink)  
Old Jan 27th, 2006, 21:48
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Access Problem

Oh, and if "last_login" is a time you need to put # around it not '
Reply With Quote
  #4 (permalink)  
Old Jan 30th, 2006, 20:27
New Member
Join Date: Jan 2006
Location: Belgium
Age: 19
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Access Problem

Thanks, I already fixed it myself now.
Reply With Quote
Reply

Tags
access, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Multi users Access to Microsoft Access ish Classic ASP 0 Apr 26th, 2007 20:05
Access cheataweb Databases 4 Mar 21st, 2007 18:42
Access Denied Problem EdwardA Databases 3 Dec 27th, 2006 22:51
file access problem Colm Osiris PHP Forum 2 Jun 5th, 2006 08:22
UPDATE information in access problem KingIsulgard Classic ASP 1 Jan 31st, 2006 13:09


All times are GMT. The time now is 04:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43