dbTalk Databases Forums  

SQL CODE

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SQL CODE in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default SQL CODE - 02-26-2008 , 09:18 AM






Hi

I am kind of new at coding, i dont know if any of you guys can help. I got a
webpage with an access table and right now everytime someone visits the page
it adds the IP of the person that is visiting the page and the date but
right now i got to many of the same ips how can i stop it from adding IPs
that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #2  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM






You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #3  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #4  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #5  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #6  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #7  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #8  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #9  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
  #10  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SQL CODE - 03-07-2008 , 03:00 PM



You did not tell us the structure of your table that keeps track of the
visitors, however you could try making the IP column unique and use TRY and
CATCH block in your asp.net code to prevent errors that will occur when the
same IP is being tried to be added to the table.

Or you could write an SP which checks if there is already an existing IP
record before inserting it into the table. And you'd insert or ignore the IP
according to the result of that SP' s execution.

--
Ekrem Önsoy



"Chris" <900606900 (AT) linetor (DOT) net> wrote

Quote:
Hi

I am kind of new at coding, i dont know if any of you guys can help. I got
a webpage with an access table and right now everytime someone visits the
page it adds the IP of the person that is visiting the page and the date
but right now i got to many of the same ips how can i stop it from adding
IPs that are already in the table. Im using asp.net platform. thanks



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.