Access Database Homepage

Type keyword or phrase to search:

 

 

 


Access Database Homepage

The know how and power behind access database

Want to teach yourself Access? Free online guide at About Access Databases
 
Connect To Your Microsoft Access Database, Using Open ...
Visit screencastcentral.com for more. in this screencast tutorial, we show you the process of connecting open office base to a microsoft access database.

Help with asp and ms access database?

Question: Help with asp and ms access database?

(Posted by: GAGAN on 2010-07-07 01:32:24)

I have made a registeration page which feeds the information to an access database. i need to find a way by which we can find a particular value in the database and carry out actions if it is present or not. The database is named form.mdb and has a table named users. It has three columns id, name, email, password I want to check the email field for the value. the asp code that writes to database is here: < % ' Declaring variables Dim name, email, password, data_source, con, sql_insert ' A Function to check if some field entered by user is empty Function ChkString(string) If string = " " Then string = " " ChkString = Replace(string, "' ", "'' ") End Function ' Receiving values from Form name = ChkString(UCASE(Request.Form( "name "))) email = ChkString(Request.Form( "email ")) password = ChkString(Request.Form( "password ")) data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & _ Server.MapPath( "form.mdb ") sql_insert = "insert into users ([name], [email], [password]) values (' " & _ name & "', ' " & email & "', ' " & password & "') " ' Creating Connection Object and opening the database Set con = Server.CreateObject( "ADODB.Connection ") con.Open data_source con.Execute sql_insert ' Done. Close the connection con.Close Set con = Nothing % >


Answers:

Posted by: TheMadProfessor on 2010-07-07, 06:37:38

You'd perform something similar to the insert except the query you'd execute would be along the lines of sql_count = "select count(*) from users where [email] = " & email If the returned count is 0, they aren't in the database.

  

Powered by Yahoo! Answers (R)


Back to Previous page

Google News will be listed here
Go Articles will be listed here

Bookmark Access Database Homepage


Want to teach yourself Access? Free online guide at About Access Databases

 

 
Sitemap | Terms of Use | Privacy Policy | Contact

© copyright 2010 Access Database.com, All Rights Reserved.

Legal Notice: This website is powered by Amazon®, Adsense, Clickbank®, Yahoo!® Answers and Youtube. All trademarks are copyrighted by their respective owners. Please read our terms of use and privacy policy.