All source code in ASP/ VbScript Ask a ASP/ VbScript Pro Discussion Forum Categories All jobs in ASP/ VbScript
Teaches,allow,your,users,build,dynamic,statme
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 287,569. lines
 Jobs: 118. postings

 How to support the site

 
Sponsored by:
Quick Search for:  in language:    
You are in:
 
Login


 

 


Latest postings for ASP/ VbScript.
A simpla ASP Login & Logout Page of E-commerce website for Registred Users
By SJPVTLTD.COM on 2/2


A simplem ASP Login Page for Registered User
By SJPVTLTD.COM on 2/2


Click here to see a screenshot of this code!The Real Estate - Search Engine
By Talal Hussain Al-Balushi on 2/1

(Screen Shot)

A simple ASP Registeration Page for E-commerce Website
By Tejas Jayantilal Gandhi on 1/28


A simple ASP Forgot Password page for E-commerce Website
By Tejas Jayantilal Gandhi on 1/28


Simple ASP inquiry form for a simple or e-commerce website
By Tejas Jayantilal Gandhi on 1/28


A Simple ASP Change of Password Page for E-commerce Website
By Tejas Jayantilal Gandhi on 1/28


Click here to put this ticker on your site!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

ADO Database Sample

Print
Email
 
winzip icon
Submitted on: 12/25/2001 1:07:00 PM
By: Shannon Harmon 
Level: Intermediate
User Rating: By 52 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this code 68509 times.
 
(About the author)
 
     Teaches you how to allow your users to build a dynamic sql statment for searching your database, paging (nice little auto paging function I wrote included), dynamic sorting, etc... Access 2000 sample database included.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/25/2001 1:13:47 PMShannon Harmon

Please comment or vote if it helps you, thanks. Merry Christmas or whatever you celebrate!
(If this comment was disrespectful, please report it.)

 
12/27/2001 7:16:21 AMOmar Dixon (OmarSwan)

Hi, I just want to say that I love this code, especially the paging function. Please email me some similar examples if you can. Thanks and merry christmas to you and your family. BTW - you have a very nice website.
(If this comment was disrespectful, please report it.)

 
12/27/2001 2:18:45 PMShannon Harmon

Thanks alot, it's nice to know that it is useful to someone besides me. I'll send ya a couple of more samples when I get some more free time. Take care.
(If this comment was disrespectful, please report it.)

 
12/30/2001 3:03:58 AMChristian

Good, clean and fast
(If this comment was disrespectful, please report it.)

 
1/23/2002 11:48:34 AMThorgrim

Nice code, and just what I needed...
Good work.
(If this comment was disrespectful, please report it.)

 
3/10/2002 3:28:16 AMTuk

This is great, good work! Looks like here everybody is using it and nobody is saying thanks. Well, i will, thanks man!

(If this comment was disrespectful, please report it.)

 
3/10/2002 12:40:03 PMShannon

I appreciate your commment Tuk, actually, I had thought it would get better feedback myself. I don't share most any of my work and when I do, it doesn't seem to matter anyhow. Thanks for making it seem worthwhile.

Take care!
(If this comment was disrespectful, please report it.)

 
3/14/2002 8:23:41 AMArunas

Thanks from other part of the world!(Lithuania). Man, I'm a beginner in programming, and I spent so much time trying to program "partial mach" and I found it in Your code! Let God reward You for this sharing. Just interested is it possible to make it work in lithuanian - code 1257?
(If this comment was disrespectful, please report it.)

 
3/18/2002 1:51:59 PMIstari

Best ASP Database code example on this site.
Thanks for the great work.
(If this comment was disrespectful, please report it.)

 
3/28/2002 4:38:16 AMJames

Thanks for this great clean code.
(If this comment was disrespectful, please report it.)

 
5/31/2002 5:58:45 AMJeffrey de Waal

Good example voor beginners like me. Thanks.
(If this comment was disrespectful, please report it.)

 
6/4/2002 10:23:59 AMAl Tucker

Shannon,

Nice code. This is the kind of example I look for. The code is clean and well formatted. Easy to understand. Demonstrates good technique and pride in your work which is reflected in the layout of the output. For this alone I give it a 5 and I hope other coders will follow your good example.
(If this comment was disrespectful, please report it.)

 
6/17/2002 12:44:10 AMtriwul

Can u give me help about how to displaying content page by page using Oracle and ASP?..I need this....Thank's before
(Indonesian programmer...)
(If this comment was disrespectful, please report it.)

 
7/4/2002 2:44:06 AMDavid Rodriguez

Magnificent, 5 Globes.
(If this comment was disrespectful, please report it.)

 
7/9/2002 1:17:30 PMBianca

I used this code and all seems to be
working well except, when I click on
the following pages, the query does not
carry itself over...and then returns
the entire database instead of the next
10 query specific results. any
suggestions? I am using a mulitple
selection search.

and by the way...thanks...
(If this comment was disrespectful, please report it.)

 
8/14/2002 6:23:39 AMMartin Crumpton

As a newcomer to ASP I was totally at sea as to how I was going to perform tasks that, on other platforms, I can do standing on my head. Thanks for some great code - it has taught me more than most of the tutorials I have seen so far and has speeded up my "learning curve" a hundred-fold!
(If this comment was disrespectful, please report it.)

 
8/15/2002 1:05:00 AMShannon Harmon

Thanks for your nice comments, it is nice to see that this could help, makes it worthwhile.
(If this comment was disrespectful, please report it.)

 
8/27/2002 4:11:00 AMJay

The best search ever I downloaded in ASP. I like this sample, it works fast, and really flying...
keep up the good work.

Thanks,
Jay
(If this comment was disrespectful, please report it.)

 
10/11/2002 7:10:43 AM

This is the most complete search instrument I've ever found! I'm a beginner but could set it out and make it work.
Thank you for doing a so good job, and introduce os to it! Because I have to handle with Date and Time I don't know if it's enough to just write : Session.LCID=1030, and have my titles sorted by date?! Where should I place it?
And what about the the changes I made ? Is it right?


***********************************************
'--Date
If Not IsEmpty(Request(
(If this comment was disrespectful, please report it.)

 
11/8/2002 10:07:34 AM

This code is... excellent! I haven't seen something like this. Thanks, thanks and thanks. *****
BTW: Sorry for my bad English:-)
(If this comment was disrespectful, please report it.)

 
12/17/2002 11:11:55 PMJ.L. Puro

wonderful!!! I Love It....
merry Christmass....
(If this comment was disrespectful, please report it.)

 
1/9/2003 1:29:21 AMOmar Dixon (OmarSwan)

Hi Shannon Harmon, I port some of your
code to work with PHP, would you like
to have a copy?
(If this comment was disrespectful, please report it.)

 
1/12/2003 5:27:11 PM

Thank you for this code, is great!
The question is: where I'm put the string: "pwd=XXX" for open the database(.mdb) whit password? Thank you again!
(If this comment was disrespectful, please report it.)

 
1/17/2003 5:58:13 AM

excellent work, would you please mail me some omre example
(If this comment was disrespectful, please report it.)

 
2/17/2003 12:22:21 AM

Hi Shannon,
I was hoping you could help me with your code. Whenever I try adding another field to the database I am getting an unspecified error at the .Open line in the code. Is there a Maximum number of fields that it can display?
(If this comment was disrespectful, please report it.)

 
2/24/2003 7:36:59 PMnfs

Hey it looks like you have lot of programming experience.

Do you want to make money with your programming skills ? Software Objects provide following services : 1)Sell your software. 2)Post a software to be done. 3)Bid on the software projects. 4)Buy software Thanks and have a nice day. Software Objects http://www.thesoftwareobjects.com
(If this comment was disrespectful, please report it.)

 
2/25/2003 10:01:50 PM

This is a WONDERFUL example & just what I have been searching for! I have bought several books on asp that I have been inhaling but your tutorial by far exceeds them by getting right to the point. Great work!
Jenn
(If this comment was disrespectful, please report it.)

 
3/18/2003 10:06:31 PM

Hi Shannon,
This is great, good work! It looks like somebody already asked for helping to resolve this problem in case when we want to use a multiple selection search(let's say three or more fields from dB)
I used this code and all seems to be
working well except, when I click on
the following pages, the query does not
carry itself over...and then returns the entire database instead of the next
10 query specific results. Any
suggestions? I'm using a mulitple
selection search.

Thank you again!
(If this comment was disrespectful, please report it.)

 
4/2/2003 2:08:31 PM

D.AMN IT!!
your code is fabulous!! brilliant!! lovely!!
i'm a newbie in asp and your code is really (d_amn) good!!
nothing more to add since ppl b4 had said what i had in mind!! keep it up!
(If this comment was disrespectful, please report it.)

 
4/11/2003 1:49:10 PM

just what i was looking for. Excellent sample
(If this comment was disrespectful, please report it.)

 
4/15/2003 2:23:14 PM

i have adapted the code to what i need.
does anyone knows how to place a button that prints just the output from the search?
Also, how can i turn one of the columns (codeID) into a link that opens a pdf file named like the codeID plus the .pdf extension
thanks for all the help
great job
(If this comment was disrespectful, please report it.)

 
4/15/2003 2:23:14 PM

i have adapted the code to what i need.
those anyone knows how to place a button that prints just the output from the search?
Also, how can i turn one of the columns (codeID) into a link that opens a pdf file named like the codeID plus the .pdf extension
thanks for all the help
great job
(If this comment was disrespectful, please report it.)

 
4/26/2003 5:40:08 AM

I just wanted to know if it was possible to have the Price in £ because the code says Format.Currency it seems to read what ever the server has been set to hence on the server i host my pages on it shows $. If you could please email me at mits_r@hotmail.com Thanx
(If this comment was disrespectful, please report it.)

 
4/28/2003 10:50:58 PM

Thanks for the very nice code. I have a question? is it possible to have boolean search for example Product ID 1 AND 2, 1 OR 2 etc.

Thanks again
(If this comment was disrespectful, please report it.)

 
5/21/2003 1:24:40 PM

Excellent piece of code! Like others I have adapted and changed it to fit my needs but what an excellently engineered bit of code! Very Useful!!!
(If this comment was disrespectful, please report it.)

 
5/22/2003 6:54:50 PM

IT is very good web site!!!
(If this comment was disrespectful, please report it.)

 
5/28/2003 5:10:24 PM

I would like to thank you for taking the time to make this sample available to the masses. You have nice clean code that is well commented and easy to follow.

I was having a problem with paging through database records and this sample got me straitened right out. I thank you. Keep them coming.
(If this comment was disrespectful, please report it.)

 
7/4/2003 7:18:35 AM


Have you a few time to help me?
My question:
Is possible to insert a table search in a top frame and the result in a bottom frame?
Tks.
(If this comment was disrespectful, please report it.)

 
8/3/2003 12:27:04 PM

Thanks !
This is great, good work! I love U !
(Vietnamese, Ho Chi Minh City)
(If this comment was disrespectful, please report it.)

 
9/18/2003 8:01:32 PM

Hi Shannon,
Many thanks for sharing your great code. Works like a charm.

Just one question:
if u want to display more fields (than the ones already defined in your code (ID, Sku, Title, Price) from the DB table, where do you write code to define these parameters? let's say the fields are *tel*, *quantity* etc.

i know the HTML display, but i am having trouble defining additional fields in the code.
(If this comment was disrespectful, please report it.)

 
9/18/2003 8:34:18 PM

just an extra line i forgot to mention in my last post:

the extra fields that are to be displayed (other than the ones already defined in your code - ID, Sku, Title, Price) are NOT INDEXED and are Not SEARCHED th' the query. they just need to be displayed.
Where do I write code to define these
parameters? e.g. if the fields are: *tel*, *quantity* etc.

i know the
HTML display, but i am having trouble
defining additional fields in the code.

(If this comment was disrespectful, please report it.)

 
9/20/2003 12:52:47 AM

hi shannon,

thanks for your quick response. i will send you an email shortly.
(If this comment was disrespectful, please report it.)

 
9/22/2003 2:36:57 AM

Please tell me how to run the code.
I'm just a beginner. ASAP.
God Bless. I have a Dreamweaver MX.
How can I test your code?
(If this comment was disrespectful, please report it.)

 
9/22/2003 2:37:19 AM

Shannon, Dear,

Hi!
Please tell me how to run the code.
I'm just a beginner. ASAP.
God Bless. I have a Dreamweaver MX.
How can I test your code?
(If this comment was disrespectful, please report it.)

 
9/22/2003 11:05:00 PM

i am trying to post a modification to the code, but it won't let me
(If this comment was disrespectful, please report it.)

 
9/22/2003 11:15:14 PM

Modified the code in *Sample.asp* file. if you had many database fields (more than ID,Sku,Title,Price) and you wanted html display for all of them with hyperlinks for some, then-
1. add the fields from your database to the sql statement, line 49, eg
sql = "SELECT ID,Sku,Title,Price,tel,firstname,lastname,url FROM Products "
2. html display with hyperlinks:
this part of modification is in html and the planet-source-code does not permit html tags.
hence i am posting this separately with html tags put as *

(If this comment was disrespectful, please report it.)

 
9/22/2003 11:21:59 PM

modified sample.asp (part 2)html tags put as *
1. *A HREF="#" onclick="open('details.asp?recID=*%= objRs("ID").Value %*','MYWINDOW','toolbar=yes,menubar=yes,status=yes,location=no,scrollbars=yes,resizable=yes,width=60 0,height=380,top=0,left=0')"* *% response.write " " & objRs("firstname").Value & " " & objRs("middlename").Value & " " & objRs("lastname").Value & "" %* */a*
2. *%
If IsEmpty(objRs("URL").Value) or objRs("URL").Value = "" then
response.write ""
Else
response.write "*a href='" & objRs("URL").Value & "' target='_blank'*" & objRs("URL").Value & "*/a*"
End If
%*

(If this comment was disrespectful, please report it.)

 
9/22/2003 11:24:35 PM

hi shannon,

i put in some modification for your wonderful code. hope you don't mind.

DV
(If this comment was disrespectful, please report it.)

 
10/31/2003 9:55:51 AM

Bagus banget I\Oke Top Dech
(If this comment was disrespectful, please report it.)

 
11/17/2003 6:29:58 AMShannon Harmon

Newer version at can be found here.
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=8624&lngWId=4
(If this comment was disrespectful, please report it.)

 
12/29/2003 2:14:35 AM

hi shanon,
your code is very2 usefull to improve my asp coding techniq, thanks ..excellent..and very clear coding..
thanks also for sharing the code.
god bless u. pis. :)



(If this comment was disrespectful, please report it.)

 
2/8/2004 7:03:30 PM

Tnx Man .. . It's a Good Work .. . Good luck .. .
(If this comment was disrespectful, please report it.)

 
5/24/2004 2:52:57 AM

Hi !
Thanks, Very good asp code !
I would like it work with SQL Server ! Can you help me !

(If this comment was disrespectful, please report it.)

 
6/19/2004 12:42:11 AM

How to run another new SQL in your code?
(If this comment was disrespectful, please report it.)

 
7/21/2004 7:04:32 AM

One word for this code: WOW. I just didn't know how to do this. I will find this EXTREMELY useful. I love it. If you have any other samples, I would love to see them.
(If this comment was disrespectful, please report it.)

 
9/23/2004 8:07:07 PM

Many Thanks God Bless you and Increase your knowledge. I just wish the world is full of unselfish people like u.
(If this comment was disrespectful, please report it.)

 
1/25/2005 11:47:25 PM

You have made a good job...thanks by the way for helping people out there (like me)with your fabulous code...:)
Here, i would like to ask you how..if the system can find min/max price by their own.
thank u for ur help.......
(If this comment was disrespectful, please report it.)

 
1/26/2005 12:04:10 PMRonald Ottinger

Shannon, great job on the code! I had been trying to figure out the paging on some reports I display, and this did the trick. Thanks!
(If this comment was disrespectful, please report it.)

 
1/27/2005 10:14:03 AM

shanon, pls help. Microsoft JET Database Engine error '80040e14'

The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

/sample.asp, line 207

(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Games | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997-2010 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.