Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

recommendations?

Posted 29 Jul 2002 01:14:21
1
has voted
29 Jul 2002 01:14:21 aegis kleais posted:
I want a SQL7 DB field to hold the most data possible (cause it'll store all IPs of people who've voted in my polling system) Someone said varchar (8000) is the best idea, someone else said text. But I need to know which is the final?

8000 characters only holds approx 440-480 IPs, so I need something with a bit more. Thx.

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Replies

Replied 29 Jul 2002 01:51:12
29 Jul 2002 01:51:12 Owen Eastwick replied:
A SQL Server text field will hold about 2 billion characters, roughly 133 million 15 character IP addresses.

But why are you storing all the IP's in one field, wouldn't it be better to store each IP as a separate record?

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 29 Jul 2002 03:00:34
29 Jul 2002 03:00:34 aegis kleais replied:
So how to I declare the text? text(2000000000) ?

I'm storing all the IP's in 1 field, cause I've setup the system as such:

tblPoll
fldPollID
fldPollTitle
fldPollDescription
fldPollChoiceA
fldPollChoiceB
fldPollTallyA
fldPollTallyB
fldPollVotedIPs

I add Request.ServerVariables("REMOTE_ADDR" to the contents of fldPollVotedIPs, and then on the voting page, I SHOW the SUBMIT button only if a text string of their current IP is not found in that field. This way, I can have multiple polls (being different records) and keep a track of who voted on each one. If I'm doing this the wrong way, let me know. Thx.

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Reply to this topic