ODBiC Discussion Board


INSERT TEXT Field

by John Kincaid, February 8, 2004 19:21

I am trying to check for an email address and then INSERTING the records if not found. But, I'm finding that with MS Access 2000, the variable "Email" is not inserting as we can see from the trace that it is now null

Here's the code: <!--TRACE --> <!-- OSAD_Registration.odb --> <!--DATABASE "DSN=GetUserData" --> <!--SELECT Email FROM Results WHERE Email = '$email$' --> <!--IF $row$ = 1 --> You are already registered in the database! <!--EXIT --> <!--ELSE -->

<!--INSERT INTO Results (FirstName, LastName, Company, Address, City, State, Zip, Home_Phone, Work_Phone, Cell_Phone, Email, Year1, Make1, Model1, Year2, Make2, Model2, Year3, Make3, Model3, Entry_Date, Referred)

VALUES ('$FirstName$', '$LastName$', '$Company$', '$Address$', '$City$', '$State$', '$Zip$', '$Home_Phone$', '$Work_Phone$', '$Cell_Phone$', 'Email', '$Year1$', '$Make1$', '$Model1$', '$Year2$', '$Make2$', '$Model2$', '$Year3$', '$Make3$', '$Model3$', '$date_short$' , '$Referred$') -->

<!--ENDIF --> <!--TRACEOFF -->

TRACE STUFF:

10:SQL SELECT Email FROM Results WHERE Email = 'info@oldsouthdetail.com'][10:sql_error= "No rows selected"][11:IF 0 = 1 (FALSE)] [23:SQL INSERT INTO Results (FirstName, LastName, Company, Address, City, State, Zip, Home_Phone, Work_Phone, Cell_Phone, Email, Year1, Make1, Model1, Year2, Make2, Model2, Year3, Make3, Model3, Entry_Date, Referred) VALUES ('John', 'Kincaid', 'Old South Auto Detail LLC', '107-N Ribbon Lane', 'Cary', 'NC', '27511', '919-854-2704', '919-854-2704', '', 'Email', '1989', 'Mercedes', '420SEL', '', '', '', '', '', '', '02-08-2004' , 'Direct Mail from us')][23:sql_error= "1 row affected."]



Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.