Components of HDD

Monday, August 17, 2009
The components of the hard disk are very simple to understand by every one. The whole process begins with a steel case that on a side has the operating board that it contains coils, processors and many circuits, and on the other side it is written the capacity the speed and the way to use the hard disk. Inside the metal case we can find some disk and two or more mechanicals arm. The disks inside are very similar to a CD but it can be written on the both sides. The disks are rotating with the help of a small motor that can reach certain speeds. On those disks the information is written with the help of the mechanical arms that on the end of it are also connected to an engine and on the other end we can found some writing heads that perform actions on the disks. The hard disk is the main non-volatile memory component of any system that brings together a personal computer. Compound by electronically and mechanical elements the hard drive is the component that can stock all of the data from your computer in non-volatile way but in the same time the data are stocked in normal and safe conditions. The main properties of the hard disk are the access speed for the transmission of the data and the hard capacity. Just like in the RAM memory if the hard disk has a bigger capacity and it is faster the better for your computer.If you want to choose a hard disk that runs better on your computer you must first know what programs will run more often on your computer and you may consider the next example a better way to make the difference when you by a new hard disk: if you like to work with video recordings you will need a hard disk that is bigger in the stocking module or if you want to create a server files on your computer you will need a hard disk that runs in great speeds usually like the aspect of a RAID system.Another main characteristic of a hard drive is the dimension of the memory tampon (buffer). This property is always forgotten but it will need some general attention from you because it helps the hard disk to temporary record some data on your hard disk. The bigger the buffer is you will notice that the computer is faster because the data that you are trying to access can be found in that zone so the performances are greatly increase. One thing you must know before we can continue, the hard disk are the weaker components in the computer even today when it cams to searching/riding/writing that takes place on the hard disk. For better understandings of the hard drive we will take all of the main properties of the hard drive and give some information about them:- the mainframe of connection – this option depends on your type of motherboard. The hard drives can have two different interfaces like P-ATA or S-ATA. The difference between them is the speed of the data on transmission from the motherboard to the hard disk. Of course the S-ATA has a greater speed for the transmission of the data but this option is available only your motherboard can sustain it.- the capacity – this is an option that you must decide first what are you going to use your PC first.- the buffer – the buffer is usually measured in MB and it indicates the dimension of a tampon memory in witch we can find some data that where recently access. The bigger the buffer the better for your computer but this option usually makes the hard disk more expensive.- the speed – the speed of the hard drive is measured in RPM (rotation per minute)
read more “Components of HDD”

How do I know if I have bad sectors

Let’s speak about how we can find out if we have some bad sectors on our hard disk. A simple read error that appears like this “Error reading from source” should be a problem that you really need to give a special attention. This type or error can appear when you try to run a application, a video game, a movie, etc. and it means that the information that is on your hard disk is no longer accessible for the computer, this can be a part of the application and still we will get the same error. Bad sectors maybe already on our computer but now we need to find out if that problem is software or hardware. An error in the FAT system can create the reading error and the problem is not so big if we just re-write it. The serious problem appears only when you reinstall the operation system and still get the same error over and over again. In this case we must reboot and in the DOS mode we must run the application called Scandisk (Scandisk from Windows can trick us in this case and it might show us some false values) and this will check every cluster and sector on the hard disk and will indicate witch are the bad sectors, how big they are and in what partition of our hard disk exists. Another way that we can concern if we have bad blocks is if we get for no reason the all ready know blue screen (remember also when we try to run an application). Many of us don’t even think of the blue screen error that it could be from the bad sectors and only after a full scan of the computer, finds out. The free space that is indicated by the operation system can be another way to tell if we have or don’t have bad sectors. Let’s say that we have a partition of 10 gigabits and it is absolutely empty and the amount of free space, when we ask for this option, is shown that the partition has only 8.5 gigabits. In this case you must run a bad sector program over that partition to see if everything is ok. Do not get trick because of the safety space that every hard disk have. The safety hard disk is the measure of the hard disk for writing down the files. Surely every one of you knows the safety space but just didn’t know that this is its name. The safety space is the space that is not indicated by any operation program, for example: you buy a 100 gigabits hard disk and when you install it the operation system will show only 99.2 gigabits. Why? Well let’s just say that is more of technical information and is harder to explain. When you install the operation system on your computer or any other application on the computer you might get the error report that looks just like this “cant copy to source” can also indicates the apparition of some bad blocks. Know we must see if the bad sectors are in the FAT sequence or a partition. So if you don’t have any kind of the errors that we speak about it doesn’t mean that you don’t have bad sectors on your hard disk. For your safety and lack of concern it is better that once in a while to run a Scandisk or another application that identifies the bad sectors. Conclusion: we can never say that we don’t have bad sectors until we check with a license application specially designed to find those problems.
read more “How do I know if I have bad sectors”

What bad blocks are

Every plane of the hard disk has the both writable sides on to a number of tracks and every track is divided on sectors. The planes are adjusted perfectly and the 0 track from plane 1 can be exactly over the 0 track of plain 2 and 3. To gain access to any track on one of the plains the arm that sustains the reading head will move to that specific track. Because this method requires only one moving part in to the hard disk simplifies the working method and there are cheaper hard disks. But it is a major disadvantage because if we want to access certain information all of the reading heads will be moved in that direction and if the hard disk is required more information per minute it will be unable to fulfill our request and then the risk of errors increase very much and the logical errors appear.
Structural errors This type of errors appears on the allocation table of files and folders. The most know error that happens to every one of us (we are sure that every body has encountered the problem but they didn’t know what is it) is the information about the available space on our hard disk. We all know that in time the working status of the hard disk can create a few problems. Actually the physically space on the hard drive is divided on blocks and if a certain area is affected then the entire block become unstable. Let’s say that you are saving something on you hard disk just in the same place where a bad block is. When you write it may not give you a warning about the bad block and continue but when you will try to access the information or to copy it you will get the an error message because the head readers are understanding other information then the previous that was written on it.The computer does not know what was previous written there but you can verifies throw a control key if the initial data that where written are debased. Practically the entire program that was installed becomes unstable. A hard disk has thousands of blocks, so a few bad blocks don’t mean anything. But you must know that once the bad blocks appear on a hard disk their tendencies are to multiple. You can still use your hard disk for a long period of time whit the condition to identify the bad blocks, mark them, and in that way you will indicate to the hard disk to avoid that portion for the writing process. You can do the indication process by using a physically scan. This will take some time because every block is tested by writing some information on it and then red them to see the condition of the block and if the information is correctly returned. The time that you need to this operation is directly proportional whit the size of your hard disk and it is recommended to do it once a year or when reading problems appear on your hard disk. In a conclusion the bad blocks are parts of your hard disk that can not be used anymore because that part of the platens is destroyed. The bad blocks are unfortunate parts of our hard disk that can create errors and destroys the right functionality of our programs. There are some files that will help the bad blocks to multiply such us movie files or a single file that are larger then 300 megabits. Those files are written from one sequent and if there are written over an already created bad block the entire file can not be read but also increase the chance when we try to run it, to create a bad block on the correct blocks on the platens.
read more “What bad blocks are”

Why bad sectors appear

Why the bad sectors appear? That is a very debate problem as the engineers are struggling to explain it. But some general ideas of why the bad blocks appear to the hard disk have every person that has this problem. The reasons that they appear are explained in long forums discussions and also explained in the specialty magazines.
Let’s begin by telling you some generals reasons for which bad sectors appears:- the reading heads are sustaining them self over the platens for that little distance whit the help of the air flow that creates from the high rotation of the platens; when the platens are stopped the air flow disappears and the reading head are gently touch the surface of the platens whit no risk for the hard drive. However, if the reading heads are touching themselves on a high speed that will create a disaster for the hard drive and also the bad sectors appear.
- another factor that can create bad sectors on your hard drive is the mechanical shocks. Hit the hard drive or accidentally drop it from your hand increase the apparition of the bad sectors. Also if the mechanical shock must not be applied directly to the hard drive and still creates bad sectors, for an example lets say that your entire tower case drops from the support. In the mechanical sector we must include the vibration. If you have the tower case of your computer opened and the hard drive is running, if you move it from its place or lean it from one side to another can also increase the chances of the creation of the bad sectors. The hard drive can sustain vibration by only a couple of grams and if you drop your hard disk on the floor consider yourself lucky if you don’t get some multiple bad sectors.
- heat can create bad sectors; inside your hard disk the platens are moving with speeds between 4400 rpm to 15000 rpm. Because of this speeds the hard disk is producing a very important quantity of heat and does not eliminate very much of it throw a standard cooling system on the computers. Is you notice that the hard drive is very hot when working you can consider installing an additional cooling fan especially for the hard disk. So the high temperatures can make some components of the hard disk not to work properly and so it leads to the apparition of bad sectors.
- the mechanical and electronic parts of the hard disk can create bad sectors if they malfunction. Most of you already know that the hard disk has a board full whit electronic piece. If some of those transistors or coils are not working in normal parameters and dos not transmits the right information or the right induction currents that where meant to be it can lead to a malfunction of the reading heads and so to the creation of the bad sectors.
- the demagnetization of the hard disk platens can also create bad sectors. The demagnetization can appear because of the cheap quality offered from the manufacturers or because of the head slap. If the hard drive is accidentally hit some particles on the reading heads can detach from them and creating a small and fine dust that will remain on the platens and when the reading heads are returning to that sector to perform a different action it will be stopped by that dust. You can already understand that the spot where the dust is already is transformed to bad sectors.
- one factor that was creating more hard disk bad sector then no other (that of course if we look in past, for the actually hard disk that are on the market is no longer available) is the power clinch. The newer hard disk has safety pieces to prevent damage from the clinch but is not always working for all of the hard disks.
read more “Why bad sectors appear”

Old Hdd vs New Hdd

From 5 megabytes to 1 terabit. That’s the story of the progression of the hard disks that was reach in only 20 years. The hard disks are always remarketed when some problems appears at them. Older hard disks, newer hard disk there was always a common problem that it is not solve even today with al of the technology and that problem is bad sectors. The older hard disk where more exposed to the apparition of bad sectors because of many factors, and that factors where eliminated on the way of progress. In the factors area the common problem was the big size of the hard disks. A bigger case that protects the hard disk means more protection from eliminating the heat that is generated from the moving parts. This heat can only create bad sectors. Actually the case of the hard drive was actually so big and they reach a weight of even 3-4 kilograms. The new hard disks are protected from the heat problem because they have safety measures for this problem and the risk of apparition of bad sectors because of the heat was minimize but not eliminated. The new hard disks have safety measures when the computer is being shutting down. That only ensure a better ergonomic function of it, and the risk of apparition of bad sector when the computer stops is also at a minimum level; the older hard disk did not have the protection system for the off line mode and when the computer stops the hard disk also stops because of the lack of power. Shorter said when we cut down the power the reading heads are dropped exactly where they ware and so the apparition of bad sectors increases. But an advantage did appear at the oldest hard disks and that is the speed of platens (rpm); even if they have a very reduce capacity 600 megabits to 3 gigabits the rotation per minute was smaller and that decreases the chance that two of the reading heads to hit each other (then the speed was at a maximum 3400 rpm) so decreasing the bad sectors apparition. In our days the high performance hard disk of 1 terabits are reaching speeds of 10400 rpm, a tremendous speed but with that speed also cams the risk of the bad blocks. If we can speak of another difference between the old hard disks bad block and the bad blocks of the new ones that surely must be the functions that each other is completing. A older disk model has very few functions but that is not the aspect that we are interested of but the fact that the less function it has the smaller chances that those parts to malfunction. In the new generation the hard disks have all kinds of option and function but if one of them stops working can easily lead to the creation of the bad sectors. To understand better the chances to broke one function from ten are smaller then to break one function from 50. Of course if we generalize the discussion the risk that the new hard disk to create bad sector is significantly smaller; otherwise the older hard disks where more predicted to create bad sectors. But bad sectors remained bad sector even in the apparition of the hard disk and even today we can minimize the risk of their apparition not entirely eliminate. In the end we can say that in the past the bad sectors where created easier then in our time but still bad sectors remains.
read more “Old Hdd vs New Hdd”

Popular Programs Software

HDD Regenerator is one of the programs that quarantines the repair of bad sectors and the technology was developed Dmitriy Primochenko. It has a huge data base of the hard disk even if they are old or new and will identify your hard disk for sure. The most important thing is that it not only repairs the bad sector that is on your hard disk but also recovers the data that was previous write there. more…
Flobo HDD Repair – Is a very generous program when we speak about tools. It includes a bad sector restoration tool, it can test your hard disk speed, test your SMART information, can perform surface test for the stability of the hard disk and also can test the controller data transmission if that is working properly. And the most important aspect of Flobo is that it includes a DDB ad Sector Repair. more…
Disk Repair has the property to repair and remove in a physical way bad sectors. It also can repair a vital part of the hard disk that is called Track 0. The importance of this track is that here all of the main programs like Windows of Linux or Unix etc. are installing there main configuration in that area of the hard disk. And we must remember that once the bad sectors appear they spread very fast. more…
ADRC Data Recovery Tools v1.0 have a special attention for the DIY to repair and re-used the data that where written. It can support a variety of drivers and all of the file systems: (FAT12, FAT16, FAT32 and NTFS) for Windows 95/ 98, Windows ME, Windows NT, Windows 2000, Windows XP and Windows 2003 server. more…
THE HARD DRIVE MECHANIC is a program for crash data that creates the bad sectors. This program can analyze the data that created the bad blocks, fix the bad blocks, and also can remove the data that create this problem. But the disadvantage of it is that in only works for FAT32 and NTFS hard drives. more…
Partition Table Doctor creates an option for you that permits the identification of the bad sectors repairs them and also verifies the hard disk identification. The boot sectors can be also repair and the best option that you can have with this program is that in 30 days if you are not satisfied by it you will get your money back. more…
Disk Patch Partition Repair is an old style repairer for the bad blocks. It operates in DOS but even if is still in old style menu the chances increases to get ride of your bad blocks. The program can repair even a mass data lost (when a partition is totally lost) and can create a MBR, Partition Tables and LDM. more…
read more “Popular Programs Software”

How to fix bad sectors

Let’s try to explain the question that grinds us all when in cams about the hard disk. Can we actually repair a bad block? Before of the answer you must find some information about what is a hard disk, how does it work, what are bad blocks. After that you must identify them because you will need the exact location of the affected sectors. After you have done that you must run a few steps:
- before you try to resolve the problem with the bad sector you must extract the data that was written to that block. To do this you must run a Recovery program that you can find freeware on the net. - bad sectors are unreadable parts on your hard disk but the nature of them must not be always physically and that part of the platens to be destroyed. The bad sectors can be simulated by some programs. This means that some programs installed on your computer can interrupt the reading process on to another segment of the platens. That is in the most happier cases but the chances that the bad sectors are cause by this is less then 10 percent. In this case is difficult to resolve the problem because even the Scandisk or other identification programs used to discover bad blocks will give a rapport that nothing is wrong with your hard disk. The best way is to uninstall the latest programs applied to the computer. - lets supposed that you have a 20 gigabits partition on your hard disk that has bad blocks. After the identification program it will indicate you where are the blocks situated on the partition. So this way you can isolate them in to another partition that you must never use again. Another scenario can be created and the bad sectors can be at the beginning of the partition in the middle of it and at the end of the partition. Know it’s a little bit tricky because you can’t just go on and create three new partitions to eliminate the bad sectors from use. In this case most of the new hard disk has a spare space available just for this type of scenarios. You must access the CASH memory of the hard disk and indicates to the hard disk that instead of writing down on the effected blocks it must write to the spare blocks. - another to restore the hard disk is to use the low level format option. Many of you think that low level format is a program. Wrong, the low level format option is set for any BIOS and can be easily use if you know some command line programming. The low level format can take to be complete a very long period of time but in the most cases we can obtain marvelous results. Actually the low level option takes every cluster of the hard disk and identifies them again (throw a thermal process) and writes down on the memory of the hard disk what sectors can be written and witch blocks are un-writable. This procedure is the best that can be because it will need no effort from your side to try and avoid the bad blocks that already exists and the hard disk itself know where the bad blocks are. In conclusion the bad blocks can’t be fixed. The problem is a permanent one and we can only try to use the hard disk until it is broken down for good. But if you are having financial problem this is a best way to keep going with your old hard disk.
read more “How to fix bad sectors”

What is bad sectors

First of all we must understand what an error is and how errors can appears. The misapprehension between the data and between the boards and the compatibility of them can result in an error. All of the errors are supported by the hard disk and can be very destructive to it.
To make it easy for all of to understand what a bad sector is we will try to explain it away from the technical terms. Consider you have a piece of paper and the entire paper is the writable zone where your hard disk saves information. On this piece of paper we draw lines to divide it in small squares. One small square represents a sector of your hard disk, and if we divide one square in to 4 squares we can obtain, imaginary of course, 4 cluster. Ok know you want to write a sentence on the paper. You will notice that there no room to write the sentence in only one small square and you will need a certain amount of squares from different portions of the paper; know write down your sentence.
After that take scissor and cut a word from the sentence in the middle of it. You as a person can still read the sentence because we can realize what word is messing from the sentence but a computer to show you that sentence needs all of the words to reproduce it for you. The part that you cut from the sentence is our bad block, and now you can understand how the hard disk functions. And all of you know that on the driver is more then a sentence written, and that it contains millions of letters and numbers and also holds information about all of the boards, along whit their drivers, that are in your personal computer.
Some surface errors have connections whit the hardware equipment of the computer directly and can create physically bad sectors on the hard drive, and that means a cluster from the hard disk sector is unreadable. The writing action on the hard disk is possible thanks to a “writing head” that floats at a distance of 0.3 microns over the writable layer of the disk. If one or more heads actually touch the writable disk the chance to destroy that cluster is almost 100%.
The bad sectors are in definition a portion of the hard disk writable part that can not be change (read or write). So because of this definition the data that are on the bad sectors may be lost forever. You can be easily be trick to think that your hard disk have bad sectors, most of the time are errors that appear because of the over churching of the partition or of the Windows directory.
Bad sectors also known as simple as “bad” can appear to any hard disk after a time of function. In most of the cases the bad sectors that appear are not in a bigger quantity from your stocking space (about 0.01% for newer hard disk). For the new gene ration of hard disk there are some spare clusters just for these problems. When a bad sector appears the safety measure remove the information that it contains to a spear cluster and that way avoids the lost of data or the corruption of the data.
In a generally idea a bad sector is a big problem for your hard disk and for your entire computer. There are some programs that can repair them if there are not physically and are from data corruption but that is another story about the hard disks.
read more “What is bad sectors”

SMTP Server List - SMTP Servers Free

Saturday, August 15, 2009
SMTP Server List - SMTP Servers
If you are going to be forwarding on mail from a POP3 account you will need a SMTP server to do the forwarding. Remember though that you need to pay to get access to Yahoo and several other POP3 servers. Detailed below is a searchable list of SMTP servers for various ISP and E-Mail providers. In order to avoid any chance of problems when using GetMail For Hotmail we would recommend using the corresponding SMTP server to the POP3 server which holds your account i.e. the account you are forwarding from.
However, a lot of people don't realise that you can actually run your own SMTP server for less than $5 a month! This gives you access to your own POP3 and SMTP server (using your own custom domain name ) and 1000 mail accounts that you can use however you like!
Besides using your mail providers SMTP server, a number of services are available that will allow you to use their SMTP server no matter where in the world you are, we recommend the SMTP2Go Worldwide SMTP Server (also great for travelers). This SMTP server will allow you to send e-mails without worrying about where in the world you are.

Provider SMTP Server

12 012.net.il
191 mail.191.biz
191.it mail.191.it
Access4Less smtp.access4less.net
Active Network smtp.activenetwork.it
Actrix Networks mail.actrix.co.nz
Adelphia mail.adelphia.net
akfree smtp.akfree.it
Albacom smtp.albacom.net
albacom smpt.albacom.net
Albacom relay.albacom.net
alcotek smtp.alcotek.it
alice out.aliceposta.it
aliceposta.it mail.tin.it
alise outmail.f2s.com
AOL smtp.aol.com
Arnet smtp.arnet.com.ar
Aruba smtp.aruba.it
AT & T Wireless smtp.attwireless.net
AT & T Worldnet imailhost.worldnet.att.net
atlanet smtp.weblinea.it
atlanet smtp.atlavia.it
Auna smtp.auna.com
Bahrain Telecommunications Company batelco.com.bh
Barak I.T.C mail.barak.net.il
basilicatanet.it mail.basilicatanet.it
bella.ci bella.ci
Bellsouth mail.bellsouth.net
Bezeq International mail.bezeqint.net
Bezeqint mail.bezeqint.net
Bitstop pangasinan.com
Blu.it smtp.blu.it
Bluebottle mail.bluebottle.com
bluelight.com smtp.mybluelight.com
Bluewin mail.bluewin.ch
BlueYonder smtp.blueyonder.co.uk
bol.com.br smtp.bol.com.br
BRTURBO smtp.brturbo.com.br
BT Internet mail.btinternet.com
BT Openworld mail.btopenworld.com
BTClick smtp.btclick.com
BTTB mail.bttb.net.bd
BusinessServe smtp.businessserve.co.uk
Cable One mail.cableone.net
Cableinet smtp.blueyonder.co.uk
Caiway smtp.caiway.nl
Callsouth - Broadband smtp2.callsouth.net.nz
Callsouth - Dial up smtp.callsouth.net.nz
Cantv.net mail.cantv.net
cegetel smtp.cegetel.net
Chariot Netconnect mail.vic.chariot.net.au
charter pop.charter.net
Charter mail.charter.net
cheapnet smtp.cheapnet.it
chello.pl mail.chello.pl
ciaoweb ciaosmtp.ciaoweb.it
Cingular smtp.mymmode.com
Ciudad smtp.ciudad.com.ar
Claranet relay.clara.net
Clear Net smtp.clear.net.nz
click21 smtp.click21.com.br
Club-Internet smtp.club-internet.fr
collegeclub collegeclub.com
Colt.net (Germany) smtp.ipmail.colt.net
Columbia Power and Water mail.cpws.net
Comcast smtp.comcast.net
Cox - Central smtp.central.cox.net
Cox - East smtp.east.cox.net
Cox - West smtp.west.cox.net
Cultura smtp.cultura.com.br
CWCom smtp.ntlworld.com
Datamat mail.datamat.it
Demon post.demon.co.uk
Digitel Italia smtp.etmail.it
Dinajpur www.dinajpur.biz
Dream Net Internet mail.dreamnet.co.nz
Earth Link smtpauth.earthlink.net
Easynet smtp.easynet.co.uk
eircom.net mail2.eircom.net
Elitel smtp.elitel.biz
Email.it smtp.email.it
Euronet NL smtp.euronet.nl
everybodycanadd itsverybad
Excite smtp.tiscali.it
EzySurf smtp.ezysurf.co.nz
FastMail mail.messagingengine.com
fastweb pop.fastwebnet.it
Fastweb mailbus.fastweb.it
Fastweb smtp.fastweb.it
Fastweb smtp.fastwebnet.it
fibertel.com.ar smtp.fibertel.com.ar
Free smtp.free.fr
Free Telecom smtp.free.fr
Freedom2surf outmail.f2s.com
Freemail smtp.freemail.it
freemail.it mail.freemail.it
freemail.it (supereva) mail.freemail.it
freenet mx.freenet.de
freenet.de mx.freenet.de
Freeserve smtp.freeserve.co.uk
Galactica.it smtp.galactica.it
Genie mail.genie.co.uk
GIGA smtp.giga.net.tw
Globe Net Communications smtp.globe.net.nz
gmail smtp.gmail.com
GMX mail.gmx.net
Go Daddy smtpout.secureserver.net
go.com smtp.go.com
Haier Electronics smtp.haier-electronics.com
HiNet ms1.hinet.net
Hinet msa.hinet.net
HOTMAIL (Please see Windows Live Homtail) hotmail.co.uk
hotmail (Please see Windows Live Homtail) mx2.hotmail.com
Hotmail.com (Please see Windows Live Homtail) mx1.hotmail.com
Hotmail.com (Please see Windows Live Homtail) mx1.hotmail.com
Hotmail.com (Please see Windows Live Homtail) mx2.hotmail.com
HotPOP.com smtp.hotpop.com
I4U Internet Services mail.i4u.net.nz
ic24 smtp.ic24.net
IG smtp.ig.com.br
IHUG smtp.ihug.co.nz
INET inet.it
Infinito mail.infinito.it
InfoStructure -- GRR Technology smtp.grrtech.com
InfoStructure -- InfoStructure smtp.mind.net
InfoStructure -- Klamath Falls Internet smtp.kfalls.net
InfoStructure -- Medford Internet smtp.medford.net
InsightBB mail.insightbb.com
Interbusiness (TI Easynet) mail1.cs.interbusiness.it
INTERFREE mail.interfree.it
Internet Zahav sout.zahav.net.il
internetlibero smtp.internetlibero.it
inWind mail.inwind.it
IOL mail.iol.it
Iomart smtp.domain.ext
IPrimus Australia smtp.iprimus.com.au
Iprolink smtp.iprolink.co.nz
istruzione.it istruzione.it
ItalyMAIL mail.italymail.biz
ixpres.com smtp.ixpres.com
jumpy mail.jumpy.it
Juno smtp.juno.com
Katamail smtp.katamail.com
Kataweb smtp.katamail.com
la poste smtp.laposte.net
Le neuf smtp.neuf.fr
Libero mail.libero.it
Lillinet smtp.weblinea.it
Lineone smtp.lineone.net
Lycos smtp.lycos.co.uk
lycos.it smtp.lycos.it
Mac.com smtp.mac.com
Madasafish smtp.madasafish.com
mail.quizil.net mail.quizil.net
mail.ru smtp.mail.ru
Mailsnare mail.mailsnare.net
Maktoob Mail mira0.maktoob.com
McLink mail.mclink.it
Mediacom mail.mchsi.com
Mistral smtp.mistral.co.uk
Momax smtp.momax.it
ms15.hinet.net ms15.hinet.net
msoft.it smtp.weblinea.it
mtel mail.mtel.net
NamesToday smtp.namestoday.ws
NamesToday smtp.namestoday.ws
nerim.net astralblue@nerim.net
netcabo smtp.netcabo.pt
Netexplora Chile mail.netexplora.com
Netlink mail.netlink.co.nz
netscape smtp.isp.netscape.com
Netscapeonline mailhost.netscapeonline.co.uk
netvigator mail.netvigator.com
Netvisão (Portugal) mail.netvisao.pt
Netvisão (Portugal) mail.netvisao.pt
NetZero.com smtp.netzero.com
neuf telecom smtp.neuf.fr
NGI smtp.ngi.it
Nildram smtp.nildram.co.uk
Noos smtp.noos.fr
novis (portugal) mail.novis.pt
ntl (uk) smtp.ntlworld.com
NTLWorld smtp.ntlworld.com
OneTel mail.onetel.net.uk
oNo smtp.ono.com
ono wanadoo.fr
Optonline (Cablevision's Optimum Online) mail.optonline.net
Orcon mail.orcon.net.nz
outgoing.verizon.net tchrshelli
P.C.T.S. ns.pcts.sk
Paradise Net smtp.paradise.net.nz
PCHome smtp.pchome.com.tw
People PC smtpauth.peoplepc.com
People PC mail.peoplepc.com
Pipex smtp.dsl.pipex.com
Pipex smtp.dial.pipex.com
pixius smtp.citilink.com
Post Man mail.postman.net
Poste.it relay.poste.it
postino.it smtp.postino.it
Previdencia kiwi.previdencia.gov.br
prodigy xasa.com
Prodigy(TELMEX)(México) smtp.prodigy.net.mx
promo.it smtp.promo.it
Purplenet smtp.purplenet.co.uk
Quipo quipo.it
R (cable Galicia) smtp.mundo-r.com
Radio Deejay Mail smtp.deejaymail.it
RCP (PERU) amauta.rcp.net.pe
Reteitaly smtp.reteitaly.com
Rogers smtp.broadband.rogers.com
RunBox smtp.runbox.com
Sapo (Portugal) mx.sapo.pt
SBC Global (Yahoo Powered) smtp.ameritech.yahoo.com
SBC Global (Yahoo Powered) smtp.nvbell.yahoo.com
SBC Global (Yahoo Powered) smtp.sbcglobal.yahoo.com
SBC Global (Yahoo Powered) smtp.prodigy.yahoo.com
SBC Global (Yahoo Powered) smtp.swbell.yahoo.com
SBC Global (Yahoo Powered) smtp.wans.yahoo.com
SBC Global (Yahoo Powered) smtp.pacbell.yahoo.com
SBC Global (Yahoo Powered) smtp.snet.yahoo.com
SBC Global (Yahoo Powered) smtp.flash.yahoo.com
SBC Yahoo DSL smtp.sbcglobal.yahoo.com
sbcyahoo.dsl smtp.sbcglobal.yahoo.com
Scarlet or Scarlet.be smtp.scarlet.be
Screaming.Net smtp.tiscali.co.uk
SFR (French mobile telephone) smtp-auth.sfr.fr
Shaw Canada shawmail.cg.shawcable.net
Shylex Telecomunicaciones smtp.shylex.net
SiFree.it smtp.simail.it
sify.com mail.satyam.net.in
skynet relay.skynet.be
Skynet.be relay.skynet.be
Slingshot smtp.slingshot.co.nz
softhome.net mail.softhome.net
SouthNet smtp.southnet.co.nz
Southwestern Bell mail.swbell.net
SprintPCS smtp.sprintpcs.com
Spymac mail.spymac.com
StofaNet.dk mail1.stofanet.dk
sunrise (CH) smtp.sunrise.ch
Supanet smtp.supanet.com
supereva mail.supereva.it
SuperFree.it smtp.superfree.it
sympatico smtp1.sympatico.ca
Tag Comunicazioni 64.94.0.31
TalkTalk smtp.TalkTalk.net
Tariffe.it smtp.tariffenet.it
TDC backup-mx.post.tele.dk
tele2.fr smtp.tele2.fr
tele2.it smtp.tele2.it
Tele2Internet virtual.everyday.com
telecom mail.cs.interbusiness.it
Telecom (Alice) mail.tin.it
Telecom ADSL (Business) mail.191.it
Telecom ADSL (Business) smtp.191.it
telecom italia 191.it
Telecom Smart mail.tuttopmi.it
Telecom Xtra smtp.xtra.co.nz
Teleconomy Internet mail.191.it
TELEDISNET.BE mail.teledisnet.be
telefonica smtp.telefonica.net
Telenet (belgium) uit.telenet.be
telenet(belgium) uit.telenet.be
telepac smtp.telepac.pt
Telepac ADSL (Portugal) smtp.telepac.pt
telewest smtp.blueyonder.co.uk
Telewest smtp.blueyonder.co.uk
telkom smpt.telkom.net
Telkomsa.net smtp.telkomsa.net
Telus smtp.telus.net
Telus.net mail.telus.net
Telvia.it smtp.telvia.it
Terra smtp.terra.es
Terra - BR smtp.sao.terra.com.br
Terra - BR - Recife smtp.rec.terra.com.br
Terra - España smtp.mailhost.terra.es
Terra - España smtp.mailhost.terra.es
Terra - España mailhost..terra.es
Tesconet mail.tesco.net
TIM.it mail.posta.tim.it
timenet ADSL smtp2.xdslnet.it
TimeWarner (Unknown At This Time)
Tin.it out.virgilio.it
TIN.IT free (funziona con Alice) mail.clubnet.tin.it
Tiscali smtp.tiscali.co.uk
Tiscali smtp.tiscali.it
Tiscali.de smtp.tiscali.de
tiscali.es smtp.tiscali.es
Tiscali.nl smtp.tiscali.nl
Tnet mail.tnet.it
t-online mailto.t-online.de
Totalise mail.totalise.co.uk
tre smtp.tre.it
Tugamail mail.tugamail.com
TuttoGratis.it smtp.eutelia.it
Tvtel tvtel.pt
UKGateway smtp.ukgateway.net
unitedemailsystems smtp.unitedemailsystems.com
unitedemailsystems unitedemailsystems.com
UOL smtp.uol.com.br
UOL Sinectis Argentina relay.uolsinectis.com.ar
US Cable smtp.warpdriveonline.com
USA.net smtp.postoffice.net
utenti interbusiness telecom mail.cs.interbusiness.it
Utopia Systems smtp.utopiasystems.net
utu.fi smtp.utu.fi
V 21 smtp.v21.co.uk
Verizon DSL outgoing.verizon.net
videobank videobank.it
virgilio out.virgilio.it
Virgin smtp.virgin.net
Vispa mail.vispa.com
Vivacity pop.Vivacity.it
Vodafone.it smtpmail.vodafone.it
Waitrose smtpmail.waitrose.com
wanadoo smtp.wanadooadsl.net
wanadoo (France) smtp.wanadoo.fr
wanadoo España smtp.wanadoo.es
wanadoo.nl smtp.wanadoo.nl
Web.de smtp.web.de
Webmail.is smtp.emailsrvr.com
Which Online mail.which.net
Windows Live Hotmail smtp.live.com
wooow.it smtp.wooow.it
World-Net mail.world-net.co.nz
Worldonline smtp.tiscali.co.uk
www.gmail.com smtp.gmail.com
www.qos.net.il mail.qos.net.il
www.tol.it smtp-tol.it
www.tol.it smtp.tol.it
X-Privat mail.x-privat.org
XS4ALL smtp.xs4all.nl
xs4all.nl mail.xs4all.nl
Xtra smtp.xtra.co.nz
Ya.com smtp.ya.com
Ya.com ADSL smtp2.adsl.ya.com
yahoo yahoo.es
yahoo smtp.mail.yahoo.com.cn
Yahoo smtp.mail.yahoo.com
Yahoo (autentication needed) smtp.mail.yahoo.com
Yahoo Argentina smtp.mail.yahoo.com.ar
yahoo.co.uk smtp.mail.yahoo.co.uk
yahoo.com.tw smtp.mail.yahoo.com.tw
yahoo.com.tw stmp.mail.yahoo.com
Yahoo.de smtp.mail.yahoo.de
yahoo.es smtp.correo.yahoo.es
yahoo.it smtp.mail.yahoo.it
ZeelandNet mail.zeelandnet.nl
zero.ad.jp zero.ad.jp
Zonnet smtp.zonnet.nl

Can't find the SMTP server you're looking for? We highly recommend a service called SMTPstore. They can supply you with authentication details for their SMTP server which will allow you to send e-mails from anywhere in the world, from any device that supports SMTP (Laptops, PDA's, iPhones etc). You keep your existing e-mail addresses and just use their server to do the sending, it's as simple as that.

Why The Need For A List Of SMTP Servers?In an ideal world a list of SMTP servers like the one above would not be needed. ISP’s would take their responsibilities towards providing an e-mail platform seriously and we could all happily e-mail without trouble. SMTP does stand for Simple Mail Transfer Protocol after all. It’s not an ideal world and it is ISP’s that bring around 99% of the need for this list.
To start of with a large number of ISPs bury the details of their SMTP servers deep within their websites. This either needs a degree in advanced Google or perhaps just blind luck to find. I have no idea why they are so secretive, I assume it has something to do with them believing that it will stop spammers abusing their SMTP servers, something totally not needed as long as they are using authentication.
The next problems are connected. Some ISPs do not allow you to send mail over Port 25 (the port for SMTP) unless it is through one of their servers. They only allow SMTP relay through what they can directly control. This is all fine and dandy except for when they don’t make those details easily accessible (see the point above) or when you decide to travel on business or for a vacation. Because when they do this many ISPs also only allow you to send through their SMTP when you connect to the internet using their connection. This means that when you travel you have no way of sending e-mail using their server, the SMTP server that you’ve been forced to use from home. So you’re away on business but when you send an e-mail you get a dreaded “can not send” error message. Your ISP has forced the need for you to have access to another SMTP relay server. The list above helps by providing the SMTP details of many of the free and paid mail services that abound on the internet.
So as you can see the reason for the SMTP Server list is simple, it’s to help you find the SMTP server for your ISP/Mail provider and perhaps more importantly to give you options when you are travelling.
read more “SMTP Server List - SMTP Servers Free”

Executing All or None queries : ASP Transactions


Executing All or None queries : ASP Transactions

Introduction
In this article we will learn on how to use database transactions in ASP. This will allow us to execute all database queries or none at all. How many times have you wanted to insert, update a lot of records collectively wanting that either all of them get executed or if there is an error then none is executed at all ? Well, if you haven't this need yet, you will have it in near future.
What are transactions ?"A transaction is an atomic unit of work that either fails or succeeds as a whole." In a transaction there can be any number of things to do, like update one thing, send email, do that thing and so on. If transaction is successful, all of these things will be done or executed as the case may be, or if transaction fails then none of them will be executed.
When a transaction is successful it is said that this transaction has committed and all the tasks that it had to do will be done. If there is some error then the whole transaction will be brought back to it's original state and none of the task that it had to do will be completed, it is called rolling back of the transaction.
Transactions are very simple as you might have learned by now. They are a means to allow us to do many tasks or not to do any of them. There is no such thing in a transaction that one task is done and other is not. Transactions are always executed as a 'whole'.
In this article we will learn a part of these transactions, database transactions. Where we will be able to execute all of the SQL queries or if some error occurs then rollback all the actions and no query gets executed. We will also build a very useful Function to track database errors and show them to the user if some error occurs. We will use this Function to see if there have been any errors in executing any query, if not then commit the transaction otherwise rollback!
Our Access DatabaseCreate a new Access database and save it as db.mdb. Now create a new table in 'design view' as follows :







Save this table as TestTable. After that populate this table as follows :


Now we are ready to build the ASP Database error tracking function we talked about and learn some more about database transactions.
ErrorsFound FunctionWe will now look at the ErrorsFound ASP Function that will track database errors and report it to the user. You don't need to create a new ASP page now, we will do that on the next page. For now just have a look at this Function and see how easy it is to track database errors.
Function ErrorsFound(mycon) Dim myError
If mycon.State <> 1 Then eStr = " " & _ " " & _ "
ErrorDatabase not found.
Page" & Request.ServerVariables("SCRIPT_NAME") & _ "
Date & Time" & FormatDateTime(Date, 1) & _ " " & Time & "

"
ErrorsFound = True
ElseIf mycon.Errors.Count > 0 Then For Each myError in mycon.Errors
If myError.Number <> 0 Then eStr = " " & _ " " & _ "" & _ " " & _ " " & _ "
Error PropertyContents
Number" & myError.Number & _ "
Native Error" & _ myError.NativeError & "
SQLState" & myError.SQLState & _ "
Source" & _ myError.Source & "
Description" & _ myError.Description & "
Page" & _ Request.ServerVariables("SCRIPT_NAME") & _ "
Date & Time" & FormatDateTime(Date, 1) & _ " " & Time & _ "

"
ErrorsFound = True End If Next Else ErrorsFound = False End If
End FunctionThis Function will return True if an error is found and False if none. Note this Function can also detect the error if you remove or rename the database.
ExplanationI will only explain the important parts of the Function above.
If mycon.State <> 1 ThenConnection.State property tells us that whether the connection to the database is open or not. If connection is open then it is equal to 1 and if closed then it is equal to 0. So in the above line we check this property to detect if database could be opened or not, if not then we show appropriate error message and exit the Function.
ElseIf mycon.Errors.Count > 0 Then For Each myError in mycon.Errors If myError.Number <> 0 ThenNext we check to see if Connection.Errors.Count is greater than 0 or not. Note that if any errors occur then this error count will be greater than 0. So if there is a non-zero error count then iterate through the Connection.Errors collection and show all the information we have about the error.
'trans.asp' ASP pageCreate a new ASP page and save it as trans.asp in the same directory where you kept the db.mdb database. Copy the following code into and save it again :
<% Option Explicit Response.Buffer = True On Error Resume Next Dim connStr, eStr connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("db.mdb") Function ErrorsFound(mycon) Dim myError If mycon.State <> 1 Then eStr = "" & _ "" & _ "
ErrorDatabase not found.
Page" & Request.ServerVariables("SCRIPT_NAME") & _ "
Date & Time" & _ FormatDateTime(Date, 1) & " " & Time & _ "

" ErrorsFound = True ElseIf mycon.Errors.Count > 0 Then For Each myError in mycon.Errors If myError.Number <> 0 Then eStr = "" & _ "" & _ "" & _ "" & _ "" & _ "
Error PropertyContents
Number" & myError.Number & _ "
Native Error" & _ myError.NativeError & "
SQLState" & myError.SQLState & _ "
Source" & _ myError.Source & "
Description" & _ myError.Description & "
Page" & Request.ServerVariables("SCRIPT_NAME") & _ "
Date & Time" & _ FormatDateTime(Date, 1) & " " & Time & _ "

" ErrorsFound = True End If Next Else ErrorsFound = False End If End Function %><% Dim con Set con = Server.CreateObject("ADODB.Connection") con.Open connStr Response.Write "Opening Connection...

" con.BeginTrans Response.Write "BeginTrans Called...
" con.Execute("insert into TestTable(name) values ('Salim Elahi')") Response.Write "Trying to insert records .no1...
" con.Execute("insert into TestTable(name) values ('Arshad Khan')") Response.Write "Trying to insert records .no2...
" If ErrorsFound(con) = False Then con.CommitTrans Response.Write "Committing Transaction...
" Response.Write "Records added successfully...

" Else con.RollbackTrans Response.Write "Rolling back transaction...
" Response.Write "Records were not added...

" End If con.Close Response.Write "Closing Connection...
" Set con = Nothing Response.Write "Setting Con = Nothing...


" If Len(eStr) Then Response.Write eStr End If ' ADO Constants Const adCmdText = &H0001 Const adCmdTableDirect = &H0200 ' Recordset Object Dim rs, query query = "TestTable" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open query, connStr, , , adCmdTableDirect If Not rs.EOF Then ' Creating the table Dim i, j Response.Write "" & vbcrlf Response.Write "" Dim Item For Each Item in rs.Fields Response.Write "" Next Response.Write "" Dim ds ds = rs.GetRows End If rs.Close Set rs = Nothing If IsArray(ds) Then ' Showing Each Row For i = 0 To UBound(ds, 2) Response.Write "" & vbcrlf ' Showing Each Column For j = 0 To UBound(ds, 1) If ds(j, i) = False Then Response.Write "" Next Response.Write "" & vbcrlf Next Response.Write "
" & Item.Name & "
" ElseIf ds(j, i) = True Then Response.Write "green;font-weight:bold;"">" Else Response.Write "" End If Response.Write ds(j, i) Response.Write "
" Set ds = Nothing End If %>
ExplanationAlthough the code that I provided in the last page looks a lot, but if you take a closer look it is very simple and most of the things you will already be able to understand. con.BeginTrans
Response.Write "BeginTrans Called...
"
After opening the connection to the database, we execute the Connection.BeginTrans method to start the transaction.con.Execute("insert into TestTable(name) values ('Salim Elahi')")
Response.Write "Trying to insert records .no1...
"
con.Execute("insert into TestTable(name) values ('Arshad Khan')")
Response.Write "Trying to insert records .no2...
"
Then we execute two SQL queries to enter two names in the database. Note that the database field 'name' does not allow two identical names.If ErrorsFound(con) = False Then
con.CommitTrans
Response.Write "Committing Transaction...
"
Response.Write "Records added successfully...

"
Else
con.RollbackTrans
Response.Write "Rolling back transaction...
"
Response.Write "Records were not added...

"
End If
Next we use the ErrorsFound Function that we created earlier to check if any errors occured, if not then commit the transaction, otherwise do rollback.
Then we close the connection and show the error message ( if any ) and then the records.
The point to note is that the two queries we ran as a transaction will only be executed if no database errors occur, if they do then the queries will be rolledback and no changes will be produced in the database.
Running the ASP pageYou should place both the db.mdb and trans.asp files in the same directory. Assuming that you placed both of them under /trans/ directory under your virtual directory, you should use http://127.0.0.1/trans/trans.asp URL to see your ASP page on your local computer.
Notice the database error and how it is displayed. At the bottom, all the records inserted so far are displayed in a tabular fashion.
What we learned ?We built an ASP page which uses ASP-Database transactions to either execute all of the queries or none at at all depending on the condition that any database errors are produced or not.
We also built a very useful Function which you can use to track database errors and display them in a feasable way to the user. Not only this function allows to show database errors if you want, you can use it transparently without showing any erros to check if any database errors occured or not and then committing and rolling back the transactions accordingly.

read more “Executing All or None queries : ASP Transactions”

DSN vs DSN less Database Connections

Introduction
In this article we will learn the two ways of connecting to database :
via DSN ( Data Source Name ) without DSN DSN ConnectionsIn my earlier article on Accessing the database from ASP I explained connecting to database via DSN in a step by step mannner. So there is no need to repeat that again, you can see it from there.
DSN stands for 'Data Source Name'. It is an easy way to assign useful and easily rememberable names to data sources which may not be limited to databases alone e.g Excel spread sheet etc.
I will now skip the steps of creating and assigning DSN to a database, you can see them by clicking here. Once you are done creating a DSN for your data source ( database lets say ), you can connect to it using following code :
Dim con Set con = Server.CreateObject("ADODB.Connection")
con.Open "DSN=mydsn" ' Now database is open and we are connected ' Do some thing
here 'We are done so lets close the connection con.Close Set con = Nothing


ExplanationIf you have been following my tutorials then above code will be nothing but a piece of cake for you. The only significant point to see is that we have used "DSN=mydsn" to connect to our database using our DSN which in this case is mydsn.
DSN less ConnectionDSN less connections don't require creation of system level DSNs for connecting to databases and provide an alternative to DSNs. We will now see how to connect to a database via ASP using Connection String in place of DSN name.

Dim con Set con =
Server.CreateObject("ADODB.Connection")
con.Open
"Provider=Microsoft.Jet.OLEDB.4.0; Data" &
_ "Source=c:\path\to\database.mdb"
' Now database is open
and we are connected ' Do some thing here 'We are done so lets close
the connection
con.Close Set con = Nothing

ExplanationThe only change is use of a Connection String in place of a rather easy to remember DSN. Above code connects to an imaginary Access database. Connection Strings for other databases are different.
How to construct a Connection String for Access and SQL Server Databases ?
For Access database :-With native OLE DB Provider ( preferred ):Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\path\to\database.mdb
Using ODBC connection without specifying a DSN :Driver={Microsoft Access Driver (*.mdb)}; DBQ=c:\path\to\database.mdb
Note, always use the first Connection String that uses native OLE DB provider because it is faster than the second one. 'Data Source' or 'DBQ' are absolute path to the database. If you have relative path then you can obtain absolute path by using Server.MapPath("/relative/path/to/database.mdb") e.g.

Dim conStr Set conStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("/dbo/database.mdb")

For SQL Server :With native OLE DB Provider ( preferred ):-
Provider=SQLOLEDB; Data Source=server_name; Initial Catalog=database_name; User Id=user_name; Password=user_password
Using ODBC Provider :Driver={SQL Server}; Server=server_name; Database=database_name; UID=user_name; PWD=user_password

Why to use DSN Connections ?
Provides easy to remember data source names. When there are lots of data sources to think of and you want a central repository to hold the collection of data sources without having to worry about the actual site and configuration of the data sources. Why to use DSN less Connections ?
When you can't register DSNs yourself e.g. when you are running a virtual hosting account on other's server. Stop emailing system administerator, connect to your databases directly. Provides faster database access because it uses native OLE DB providers, while DSN connections make use of ODBC drivers. My ExperienceI always use DSN less connections on my site and examples :).

read more “DSN vs DSN less Database Connections”

Displaying Images from an Access Database using plain ASP

IntroductionThis is the 2nd article in a series of articles about inserting binary data ( files, images etc ) into database ( Access Database ) and then displaying that binary data from the database using ASP. I am going to assume here that you have read the 1st article, Uploading Files into an Access Database using plain ASP. Quite a lot of important background information and detail has been covered there, so better give it a reading beforing continuing with this article.
That article described how to upload a binary file via ASP into the database. In this article I am going to talk about the second part, displaying that binary data from the database.
File Uploading with ASP.NETIf you have the privilege of using ASP.NET then you should read these comprehensive tutorials regarding file uploading using built-in ASP.NET server controls:
File uploading to server hard disk. File uploading to Microsoft Access database. Uploading images, determining size, width & height and resizing image files. In the 1st article I deliberately left two files, show.asp and file.asp Those two files are going to be the ones we create in this article.
Show.aspOpen notepad and create a new file. Name it as show.asp. Copy the following code and paste it into the newly created show.asp file and hit the save button :
' -- show.asp -- ' Generates a list of uploaded files Response.Buffer = True ' Connection String Dim connStr connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("FileDB.mdb")

Showing Binary Data from the Database
To insert data click here


' Recordset Object Dim rs Set rs = Server.CreateObject("ADODB.Recordset") ' opening connection rs.Open "select [ID],[File Name],[File Size],[Content Type]," & _ "[First Name],[Last Name],[Profession] from Files " & _ "order by [ID] desc", connStr, 3, 4
If Not rs.EOF Then Response.Write " " While Not rs.EOF Response.Write " " rs.MoveNext Wend Else Response.Write "No Record Found" End If rs.Close Set rs = Nothing
" Response.Write "No. of records : " & rs.RecordCount Response.Write ", Table : Files
" Response.Write "
" Response.Write rs("ID") & "" Response.Write "" Response.Write rs("File Name") & "" Response.Write rs("File Size") & "" Response.Write rs("Content Type") & "" Response.Write rs("First Name") & "" Response.Write rs("Last Name") & "" Response.Write rs("Profession") Response.Write "
Explanation
' -- show.asp --' Generates a list of uploaded files Response.Buffer = True
Set the buffering of the show.asp page to True.
' Connection StringDim connStr connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("FileDB.mdb")
Next we declare a variable connStr as our connection string and set it's value to the path of FileDB.mdb database. Note that FileDB.mdb is the database we have been using to store binary data.
show.asp
' Recordset ObjectDim rsSet rs = Server.CreateObject("ADODB.Recordset")
' SQL StatementDim sql_selectsql_select = "SELECT [ID],[File Name],[File Size],[Content Type] "sql_select = sql_select & "FROM Files ORDER BY [ID] desc"
' opening connectionrs.Open sql_select, connStr, 3, 4
We create a Recordset object and run a SELECT query to retrieve all the records from the Files table.
If Not rs.EOF ThenResponse.Write ""Response.Write "No. of records : " & rs.RecordCountResponse.Write ", Table : Files
"Response.Write ""
If the retrieved Recordset is not empty, meaning that there are some records in the Files table, we write the headers of an HTML table to show these records.
While Not rs.EOFResponse.Write ""Response.Write rs("ID") & ""Response.Write ""Response.Write rs("File Name") & ""Response.Write rs("File Size") & ""Response.Write rs("Content Type")Response.Write ""
rs.MoveNextWend
Using a While...Wend loop we display all the records in the Files table.
ElseResponse.Write "No Record Found"End If
rs.CloseSet rs = Nothing
If the Recordset was empty, meaning there are no records in the Files table we display a "No Record Found" message. Next we close the connection to the database and Set Recordset object to Nothing.
Notice that in the all the records that we displayed we linked each record to file.asp page, file.asp is going to be the actual file to display binary records from the database.
file.aspOpen notepad and create a new file. Name it as file.asp. Copy the following code and paste it into the newly created file.asp file and hit the save button :
' -- file.asp -- ' Retrieves binary files from the database Response.Buffer = True ' ID of the file to retrieve Dim ID ID = Request("ID") If Len(ID) < 1 Then ID = 7 End If ' Connection String Dim connStr connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("FileDB.mdb") ' Recordset Object Dim rs Set rs = Server.CreateObject("ADODB.Recordset") ' opening connection rs.Open "SELECT [File Name], [File Data], [Content Type] FROM Files " & _ " WHERE ID = " & ID, connStr, 2, 4
If Not rs.EOF Then Response.AddHeader "Content-Disposition", "filename=" & _ rs("File Name) Response.ContentType = rs("Content Type") Response.BinaryWrite rs("File Data") End If rs.Close Set rs = Nothing
Explanation
' -- file.asp -- ' Retrieves binary files from the database
Response.Buffer = True
' ID of the file to retrieve Dim ID ID = Request.QueryString("ID")
Sets the buffering to True. Next we create a variable named ID and set it's value to the Request.QueryString("ID").
' Connection StringDim connStr connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("FileDB.mdb")
Next we create a connStr variable as the connection string to the database and set it's path to FileDB.mdb database.
' Recordset ObjectDim rs Set rs = Server.CreateObject("ADODB.Recordset")
' SQL SELECT Statement Dim sql_select sql_select = "SELECT [File Name], [File Data], [Content Type] " sql_select = sql_select & "FROM Files WHERE ID = " & ID
' opening connection rs.Open sql_select, connStr, 2, 4
Create a Recordset object and run a SELECT statement to retrieve the File Name, File Data and Content Type of the given file.
Note that File Data field contains the saved binary data for the file, while Content Type field contains the content type for the file. We need both of them to display the file. The "Content-Disposition" header is necessary to send the file with the correct name back to the browser.
If Not rs.EOF Then Response.AddHeader "Content-Disposition", "filename=" & _ rs("File Name) Response.ContentType = rs("Content Type") Response.BinaryWrite rs("File Data")End If
If Recordset is not empty i.e, there is a file with given ID, then we set the Content Type of given ASP page to file's Content Type. Next we use Response.BinaryWrite method to write the binary data to the client browser. The file will thus be shown to the client.
rs.Close Set rs = Nothing
We close the connection to the database.
On the next page I summarize the steps involved in displaying binary data from the database.
SummaryThis article was second in the series of articles about manipulating binary data via ASP and storing it in the database. In this article we built files which were missing in the ASP-Database file uploader application in the first article. show.asp simply displayed a list of all the files in the database. file.asp was the actual file which will send the binary data back to the client.
You must have noticed that how easy it is to write binary data from the database via ASP to the client. There are two things to keep in mind while doing that. First, always properly set the Content Type of the page using Response.ContentType property. Secondly, use one ASP page to display only ONE file like we did with file.asp. And that page should not write anything else to the browser i.e, don't try to write text in an ASP page as we do in other ASP pages when you've already used the Response.BinaryWrite method.
Well that's it for this article. You should continue your reading and read the other two articles of this series; "inserting binary data to the database" and "uploading binary data ( files ) to the server hard disk". That'll be enough.
read more “Displaying Images from an Access Database using plain ASP”

Adding records to the database with ASP

Adding records to the database with ASP

Overview

No matter what kind of site you have got, you will need your ASP pages to access databases. ASP makes it easier to work with databases by providing support for ADO ( Activex Data Objects ). You already know how to build DSN ( Data Source Name ) and then access database, if you don't then you might want to check out my tutorial on Accessing Databases via ASP.
In this article I will build on that tutorial to show you how to add records to the database. We will begin by exploring the insert statement provided by SQL ( Structured Query Language ). After that we will see the two basic ways we can use to add records to the database.
I will assume here that you have read the Accessing Databases via ASP tutorial and are comfortable creating DSNs and simple Access Databases. I will also assume that you have got access to Microsoft Access Database, PWS / IIS with a notepad to write ASP pages.
SQL Insert StatementSQL is the standard language to deal with databases World wide. It provides us with select, insert, delete and update statements to show, add, delete and update the records in the database respectively. We will only study the insert statement since we are only dealing with adding records to the database here. It will be very helpful to us when we are adding records, as we'll see later.

Syntax
insert into table_name (field1, field2, field3) values ('value1',
'value2', 'value3';


The insert statement as you have seen above is very simple to understand. It takes three arguments; table, fields and values. table_name is the name of the table in the database into which you want to add records. fieldn are the names of the columns in that table into which you want to add records. valuen are the values which will be inserted into specific fields. Note field names and values can be one or more than one but the table name will always be one.

Example
insert into books (author, title) values ('Faisal Khan', 'Add
Records';


When run the above query results in the insertion into two fields of table books, author and title values Faisal Khan and Add Records.

Table Name =
books Fields Values author Faisal
Khan title Add Records


Now after you are familiar with the insert statement and have seen how it works, it is time to move forward to see the two ways by which we can easily add records to our database via ASP.
We manipulate databases in ASP through ADO ( Activex Data Objects ). ADO is a set of pre made data components which makes things a lot easier for us when it comes to accessing data stores. Wondering why did I say data stores and not databases ? well, database is only one of the data stores and ADO can help us access more than that e.g. XML. We'll not go into what ADO can do for us, instead we'll restrain ourselves to the discussion of adding records to database via ASP.
There are two ways to add records to the database. We'll discuss each of them now.
Via Connection ObjectIt is the easiest and fastest way to add records to the database.

Here is how we add records with Connection Object :
' Setting
variables Dim con, sql_insert, data_source
data_source =
myDSN sql_insert = "insert into books (author, title) values " &
_ "('Faisal Khan', 'Adding Records')"
' 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%


The above results in the creation of Connection Object which opens the database and inserts the records into specific fields of the table according to the SQL insert statement. See, didn't I say before it was going to be easy.
Via Recordset ObjectRecordset is another very useful Object which allows us to select, add, update and delete records without using SQL statements. Here is how we add records with Recordset Object.

' Setting variables Dim rs, data_source
data_source =
myDSN
' Creating Recordset Object and opening the database Set rs
= Server.CreateObject("ADODB.Recordset")
' Lets open books
table rs.Open "books", data_source
rs.AddNew ' Now adding
records rs("author") = "Faisal Khan" rs("title") = "Adding
Records" rs.Update
' Done. Now Close the
Connection rs.Close Set rs = Nothing


We didn't use any SQL insert statement here but added the records.
So what should you use ? Connection or Recordset Object, for adding records. Well Connection Object is fast and uses less server resources while Recordset Object is resource heavy. So if you have to add records to the database then Connection Object is usually the preferred way. Whichever you choose is up to you.

read more “Adding records to the database with ASP”

Accessing database from an ASP page

Accessing database from an ASP page

Databases are a way of organizing and keeping your data. The data stored in databases can be anything from user email addresses to binary files. Databases have become so popular in the past decade that it is almost unimaginable to not to use them on the web.

In this tutorial I will guide through the creation of a simple Microsoft Access database to incorporating it in to your ASP web pages. Creating and making use of a database on the web is so very much easy that it will be only after reading this article you will realize the same and will then hopefully start creating databases according to your own needs and then playing with them from the web pages.

Requirements
You are required to have Microsoft Access database ( any version will do the trick, 97, 98 2000 ), MDAC 2.0 or above ( latest is MDAC 2.5 ), either PWS 4 or IIS 4.0, Windows platform and a web browser. Don't worry if you don't know about MDAC ( Microsoft Data Access Components ), you can check if you have already got them by going to Start -> Settings -> Control Panel. There you will find a small icon 'ODBC 32'. If you can see the icon then you have got MDAC but if you cannot find the icon then you will most probably have to download them from Microsoft's site. If you are running Windows2000 Professional then you can find the "Data Sources ODBC" icon in the "Administrative Tools" section of the control panel. For displaying our database contents on the web browser we will be using Microsoft's Active Server Pages technology. For that either PWS 4 or IIS 4 ( or above ) will be required. Both of them are free and can be downloaded from www.microsoft.com.

As you would have most probably guessed by now, I am assuming that you are a newbie and don't know much about this stuff. So if you have got what it required ( above ) then we are ready to move on to the tutorial.

In the next few pages we will create a simple Access database and add some content to it, then create a ODBC System DSN for it and show the contents of that database on our web page. The tutorial is pretty much simple and you will learn a lot from it, so I advise you to go through the next pages one by one and complete each page's tasks. Good luck!

Ok, we begin by creating a simple Access database.

Step 1 : Start Microsoft Access by clicking 'Microsoft Access' icon in the Program Files menu. Start -> Program Files -> Microsoft Access.

Step 2 : Microsoft Access will start with default windows opening up at start up. Click 'cancel' to exit any windows that appear.

Step 3 : Click the File -> New button at the top left main windows of Access. This will bring up a 'New' dialog box window. Of the two tabs click the 'General' tab and then the 'Database' icon. This will select 'Database', then hit the 'OK' button.

Step 4 : This will bring up 'File New Database' dialog box. It will ask for the database name and location to store that database to. Type 'odbc_exmp' in the 'File Name' input box and give it any location to store that database to. For this tutorial we will assume that our database 'odbc_exmp.mdb' was saved at c:/stardeveloper/db/odbc_exmp.mdb . Then hit the 'Create' button.

Step 5 : Our database 'odbc_exmp.mdb' is now created. But it is empty and we will need to populate it a bit so that we can later use it. In the Microsoft Access, you will now be seeing a 'odbc_exmp : Database' dialog box showing quite a lot of options on the left column and three options in the right column. Double click the 'Create table in Design view' option in the right column.

Step 6 : This will bring up 'Tabe1 : Table' dialog box. Just in case if you don't know, data is stored in tables in a database. There can be many tables within one database. Tables in turn consist of Fields ( columns ) and rows ( records ). Fields ( columns ) do not accept accept data of all type. We have to specify the data type that a Field ( column ) will hold and then we can add records for that data type in the rows. It is this 'Design View' in Microsoft Access that is used to specify the number of columns our table will have and what data type that Fields ( columns ) will hold. Ok now type the 'Field Names' and 'Data Types' exactly as shown below. Note that you can select 'AutoNumber' and 'Text' from the drop down options in the 'Data Type' column as required. There is no need to edit any values in the 'General' and 'Lookup' tabs in the 'Field Properties' section of the 'Table Design View'. Now click the File -> Save button. A 'Save As' dialog box will prompt you to enter the name for this table, type 'names' in that dialog box and hit 'OK'.










Step 7 : Close the 'names' table design view window. Now you will see 'names' table being added to the right column of the 'odbc_exmp : Database' window. Double click the 'names' table. This will bring up the 'names : Table' window showing an empty row and three columns with 'Field Names' which we specified earlier. It is used to add data to the table. We will add five names to our 'names' table. There is no need to add anything to the 'id' Field as it will autoincrement one number upon the addition of records to the rows one by one. If you don't understand what I mean by autoincrementing then just leave this field for a moment and you will come to know what it does later when we add records. Ok now add five names ( first, last ) in the empty row under their respective Field Names as shown below.





See the numbers in the 'id' Field. Thats what autoincrement does. It adds the numbers in a sequential way. Now hit the 'save' button to save the records which we have added in our 'odbc_exmp.mdb' database. This completes our task of creating a simple Access database.
You have just seen that how easy it is easy to create a database. You have also learned what are tables, rows and columns. You have also learned what 'Data Types' are and how to specify a 'Data Type' in the table column. You have also added records to the database. Now we will move forward and will register our database in the System registry by assigning it a Data Source Name ( DSN ). Well done, now continue to the next page.
DSN stands for Data Source Name. Data source can be a database, spreadsheet, text file etc. We assign DSN to a data source so that irrespective of the data source details and location, we can use that data source; add, modify or delete records, just by knowing it's DSN.
To assign DSN to our 'odbc_exmp.mdb' database, follow the steps below :
Step 1 : Open 'Control Panel' ( Start -> Settings -> Control Panel ). Double click the 'ODBC 32' icon. If you are running Windows2000 then double click the 'Administrative Tools' icon in the 'Control Panel' and then double click the 'Data Sources (ODBC)' icon. If you cannot find the 'ODBC 32' or 'Data Sources (ODBC)' icon then please see the discussion at the start of this tutorial.





Step 2 : By double clicking the 'ODBC 32' or 'Data Sources (ODBC)' icon on Windows2000 a window 'ODBC Data Source Administrator' will appear. It will contain many tabs on the top e.g. User DSN, System DSN, File DSN and so on. As far as ASP ( Active Server Pages ) are concerned, we will use System DSN. Click the 'Add' button. A window will appear like below :












Step 3 : Select the Microsoft Access Driver (*.mdb) from the list and hit the 'Finish' button.
Step 4 : You will now see another dialog window asking you the location and name of your new Microsoft Access database. In the 'Data Source Name' field type 'odbc_exmp' and then hit the 'Select' button. Now browse to the location where you have saved the 'odbc_exmp.mdb' database we created earlier. Once you find the location select the 'odbc_exmp.mdb' name and then hit ok. You will eventually see 'ODBC Microsoft Access Setup' dialog box like below :






Click the 'OK' button in the window above. You will now get back to your System DSN windows. You will now see odbc_exmp added to your System DSN list. We have successfully created a System DSN for our 'odbc_exmp.mdb' database.
In this chapter you saw how easy it is to assigning DSN to a database. In the next chapter we will create a simple .asp page in which we will show the contents of our 'odbc_exmp.mdb' database.
We have created a database and assigned it a DSN, we will now show our database's contents on our web page using Microsoft's Active Server Pages technology. Active Server Pages or simply called ASP are pages which use a server side scripting language e.g. VBScript, to bring dynamic content to a web page. All of the processing is done on the server side and then output is generated like an ordinary HTML page which any browser can understand and view. We will not go into details of ASP in this tutorial but will only touch those parts of ASP which will help us understand how to access a database from ASP.
Step 1 : Open Notepad ( Start -> Program Files -> Accessories -> Notepad ). Copy the code below and paste it into your Notepad. Don't worry if you cannot understand what this code is doing. I'll explain that in a moment, for now just copy all the code below to your Notepad.

Step 2 : After pasting the above code into your Notepad, save this page as 'odbc_exmp.asp' and give it any location where you can run .asp pages, usually in PWS/IIS that location is c:/Inetpub/wwwroot/ .After saving the file and giving it above location you can see it in your browser.
Step 3 : Start the PWS ( or IIS ) if it's not already running. Now open your favorite browser and type the following in your URL box of your browser :

http://127.0.0.1/odbc_exmp.asp

Note that above URL will only work if you have saved the 'odbc_exmp.asp' file at c:/Inetpub/wwwroot/ ( or where ever your wwwroot directory is present ). If you have put it in a 'temp' directory e.g. c:/Inetpub/wwwroot/temp/ then the URL to put in your browser URL box will be 'http://127.0.0.1/temp/odbc_exmp.asp'. Ok after putting the above URL in your browser URL box hit enter. If all id done right you will see a list of first and last name along with their IDs of all the entries ( five ) we made in our 'odbc_exmp.mdb' database. If you can see the following you are done.

ID : 1
First Name : Faisal
Last Name : Khan
ID : 2
First Name : John
Last Name : Lee
ID : 3
First Name : David
Last Name : Doshambey
ID : 4First Name : Marvin
Last Name : DeboyID : 5
First Name : MichaelLast Name : Chang

If you know some HTML then you would have guessed that in our code ( see above ) all of the tags are simple HTML tags except tags. Every thing inside the tags is the ASP code. We will now simply touch the ASP code we wrote to help you understand how we were able to output database content on our web page.
read more “Accessing database from an ASP page”