Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Correct Syntax for ASP
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 19 August 2001 :  17:56:20  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Hi,

Firstly, here is the code I have already:


Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSQL = "INSERT INTO " & strTablePrefix & "ONLINE (UserID,UserIP,DateCreated,CheckedIn,LastChecked,M_BROWSE) VALUES ('"
strSql = strSQL & strOnlineUser & "','" & strOnlineUserIP & "','" & strOnlineDate & "','" & strOnlineCheckInTime & "','" & strOnlineCheckInTime & "','" & strOnlineLocation & "')"
my_Conn.Execute (strSql)


Now, I would like to add a new field to the 'Insert Into' statement above named 'M_CHATTER', with a value of '1' but am having trouble getting the correct syntax. So, can anyone help me do this?

Many thanks!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *

Doug G
Support Moderator

USA
6493 Posts

Posted - 19 August 2001 :  18:04:44  Show Profile
Unless I'm missing something, you just need to add the field name to the field list, and the value for the field in the corresponding position in the value list.

Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSQL = "INSERT INTO " & strTablePrefix & "ONLINE (UserID,UserIP,DateCreated,CheckedIn,LastChecked,M_BROWSE,M_CHATTER) VALUES ('"
strSql = strSQL & strOnlineUser & "','" & strOnlineUserIP & "','" & strOnlineDate & "','" & strOnlineCheckInTime & "','" & strOnlineCheckInTime & "','" & strOnlineLocation & ",1')"
my_Conn.Execute (strSql)



======
Doug G
======

Edited by - Doug G on 20 August 2001 22:57:58
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07