Hi guys this is the first post on this site. I'm not a newbie regarding Kix. I use the tool to manage my users and workstations, reading registry, getting file versions, login scripts and use alot of the basic commands which have served me well up until now. Now I'm out of my comfort zone!

I have a requirement to get at information held in an Access 2000 database. The information I need is held in a table called "Person" and in a field called "Email Address". I need to check each email address entry the customers have input. The software has basically allowed a free form cell so some customers have put anything in this field. I need to check for invalid email addresses i.e. anything without a @ in it seems easiest way and disgard anything else. I also need to check for typos such as leading, trailing spaces or even a space in between. Once all that has been done then I need to output the valid addresses to a txt file with each entry delimited by a semi colon (;) or even in a simple list. I'm sure by now you have worked out why I want this data like this. Some day I'll get round to automating the mail creation script from this address file to mailshot our customers with offers.

I have searched this site and more. I've read alot of the articles written by Sealeopard regarding these functions and have done the basics which are hopefully correct. Not having any db or programming skills other than basic KiXtart leaves me at a distinct disadvantage but hey I'm here to learn.

The script below is the starting of my effort. I've created the connection, made a record set and hopefully populated it with the data from the area I identified earlier on. Each function @error code returns 0 so I'm assuming all of what I have done is correct. My problem is now where do I go from here? How do I get to the data? I can't output the recordset either to the screen or a file. I'm guessing I can either output the raw data to a file then read each line and build a new file with the end result or maybe there are commands that can be run directly on the recordset and then output the filtered data to a single txt file at the end?

 Code:
; ###############################################################################################
; 
; Kixstart Script - Client Mailing List
;
; Script purpose   : Extract email addresses from database
;                    Disgard duplicate entires 
;                    Disgard invalid email address (i.e. anything without an @ in it)
;                    Disgard spaces due to typos (beginning, middle and end of address)
;                    Output to a file each email address in a string delimited by a semicolon (;)
;
; Kix32 Version    : 4.53.0.0
;
; Script Date      : 27/03/07
; Script Version   : 1.0
;
; ###############################################################################################


; #### Set Variables ####

DIM $DSN
DIM $SQLQueryRS

$DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; UID=; PWD=; DBQ=ActinicCatalog.mdb"
$SQLQueryRS = "SELECT 'Email Address' FROM 'Person'"



; #### Open Database Connection ####

$objConn = DBConnOpen("$DSN")
? "@ERROR"



; #### Open Database Recordset ####

$recordset = DBGetRecordset("$objConn, $SQLQueryRS")
? "@ERROR"



; #### Close Database Connection ####

$retcode = DBConnClose($objConn)
? "@ERROR"