Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: checking box without a form


Message #1 by jake williamson 28 <jake.williamson@2...> on Wed, 01 May 2002 13:55:35 +0100
have something for you...

on my logged in page i have a SQL insert that logs when a user logged into
the site. it does this by taking a user name value from a cookie.

this is the SQL:

sql_insert = "insert into LOGGED (USERNAME, TIMEIN) values (' " &
Request.Cookies("mtmAdmin")("txtUserName") & " ', ' " & Now() & " ')"

then i got thinking it would be great to display to new users logging in who
else is logged in. so i've set up a new table called LOGGEDIN which has all
the USERNAMES in one column and a check box in a LOGGEDIN column.

how can i add to the sql statement to mark the check box as a 'yes' value?

total craze!

cheer chaps (and lass's)

jake

Message #2 by "Santhi" <santhi_maadhaven@y...> on Fri, 10 May 2002 13:42:05
Hi,
  This is the sql statement

"update LOGGEDIN set checkbox=yes"

santhi
Message #3 by jake williamson 28 <jake.williamson@2...> on Wed, 15 May 2002 10:06:50 +0100
hi santhi,

thanks for getting back to me!! i've tried to integrate the sql into my page
but it's not happy....

my table is called ADMIN and the column with the check box is LOGGEDIN.

this is how the sql statement is set up:

<%
' Setting variables
Dim con, sql_insert, data_source
data_source = "dsn=Ridgeback;"
sql_insert = "update LOGGEDIN set checkbox=yes"
' Creating the Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
' Executing the sql insertion code
con.Execute sql_insert
' Done. Now Close the connection
con.Close
Set con = Nothing
%>

any ideas of what i'm missing???

thanks again for your help,

jake


on 10/5/02 13:42, Santhi at santhi_maadhaven@y... wrote:

> Hi,
> This is the sql statement
> 
> "update LOGGEDIN set checkbox=yes"
> 
> santhi

Message #4 by "Santhi" <santhi_maadhaven@y...> on Wed, 15 May 2002 10:35:48
Hi jake,
     Loggedin is the table name and checkbox is the column name is it 
correct.In my system it is working properly.You created field with yes/no 
datatype in Access database or u created in some other.
  Whether it is giving any error on that page.Tell me


Regards,
santhi








  Return to Index