Friday, March 23, 2012

Problem with Insert in to IP to Microsoft Acess by ASP

Hello
Would Anyone help me '
I want insert into Microsoft Acess visitor's IP by ASP. But It is not
working
----=
=AD--
NOT WORK
<%
.=2E....
time =3D now()
ipp =3D Request.ServerVariables("remote_addr")
strSQL =3D "INSERT INTO visitor (time,ipp) VALUES ('" & time & "','" &
ipp & "')"
Set rs =3D myConnection.Execute(strSQL)
.=2E....
%>
----=
=AD--
I tested part of the ASP script then It work very well. Below:
WORK VERY WELL
<%
.=2E...
time =3D now()
strSQL =3D "INSERT INTO visitor (time) VALUES ('" & time & "')"
Set rs =3D myConnection.Execute(strSQL)
.=2E...
%>
I created Access database. There are 2 field : time and ipp. Data type
of time is date. Data tye of IPP is text.
I think: Maybe in Access database: the field IPP was problem with data
type.=20
Thank you for your help...=20
http://www.anluc.comThis should work. What error message are you getting?
I take it you know about
Request.ServerVariables("REMOTE_ADDR")This will return the ip address in asp
pages.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<minhadd@.gmail.com> wrote in message
news:1135658733.112628.33010@.o13g2000cwo.googlegroups.com...
Hello
Would Anyone help me '
I want insert into Microsoft Acess visitor's IP by ASP. But It is not
working
----_
--
NOT WORK
<%
......
time = now()
ipp = Request.ServerVariables("remote_addr")
strSQL = "INSERT INTO visitor (time,ipp) VALUES ('" & time & "','" &
ipp & "')"
Set rs = myConnection.Execute(strSQL)
......
%>
----_
--
I tested part of the ASP script then It work very well. Below:
WORK VERY WELL
<%
.....
time = now()
strSQL = "INSERT INTO visitor (time) VALUES ('" & time & "')"
Set rs = myConnection.Execute(strSQL)
....
%>
I created Access database. There are 2 field : time and ipp. Data type
of time is date. Data tye of IPP is text.
I think: Maybe in Access database: the field IPP was problem with data
type.
Thank you for your help...
http://www.anluc.com|||Thank you Hilary Cotter .
I visit your abow link : But I can not see how to INSERT INTO DB.
IF : Request.ServerVariables("REMOTE_ADDR")This will return the ip
address in asp
pages.
THEN How do I do for insert into Access DB
I need so much to insert into DB Visitor's IP.
Thank you for your help....

No comments:

Post a Comment