floydslist.com
Home About Us Privacy Terms & Conditions Add Your Link Add Your Article
Search:   
Get Free Links
 
   

Automotive

   

Food & Recipe

   

Recreation

   

Self Enhancement

   

Travel & Accommodation

   

Health & Therapy

   

Children

   

Banking & Finance

   

News & Events

   

Games & Play

   

Business & Commerce

   

Policies & Law

   

Academics & Learning

   

Society & Communities

   

Art & Culture

   

Research & Science

   

Home Family & Garden

   

Medicine & Treatment

   

Jobs & Employment

   

Sports & Adventure

   

Online Shopping

   

Relationship & Lifestyle

   

Property & Estate

   

Internet & Computers

 

  Home –› Internet & Computers –› PC Resources
   
 

Various Connection Strings to Connect to an Access DB

   

If you want to call a database from within an asp page the that is to tell your asp page where your database is. Here are a few samples of database connection strings that could be used to help you connect to your database I have also indicated where the code starts and finishes. I have used [] as the normal < > makes it impossible to see the code in the finished article as the page thinks it is real code so does not display it. If you want to use any of the code remember to change the square brackes [] to <>

OLE DB Method for SQL

'code start
[% set cnn = server.createobject("ADODB.Connection") cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=dbname.mdb " %]
'code finish

DSN-Less connection for Access

'code start
[% set cnn = server.createobject("ADODB.Connection") cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:yourdatabase.mdb" %]
'code finish

OLE DB Method for Access

'code start
[% set cnn = server.createobject("ADODB.Connection") cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:yourdatabase.mdb" %]
'code finish

File DSN Connection Method for Access

'code start
[% set cnn = server.createobject("ADODB.Connection") cnn.open "FILEDSN=AccessDSN" %]
'code finish

Don't forget when you download an application this info should be included. Remember to RENAME the database as others can download the application from where you did and see what the default name is if your page is live ie on the web and you have not renamed the database they could easily download your database and add or change information contained in the database. I had this happen a few years ago and all the links pointed to porn sites luckily I did not have many visitors in those days. So remember change the database name and possibly the directory that the database is in.

Author: John Hutchison
 
Author Bio:
John Hutchison is a noted author. John likes to create articles about this area.
 
 
 

Related Articles

 
Motorola E895 Cell Phone ?C Get Power, Speed and Flexibility For All Your Multimedia Needs
 
The Affiliate Model - How To Make Money As An Affiliate
 
Living in Mexico: Telephones
 
Network Support Contracts Can Provide Personal Help
 
Top Ten eBook Mistakes and How to Correct Them (Part 1)
 
AdSense used as a web search engine optimization (SEO) detection tool
 
The Developing Field of Search Engine Reputation Management
 
Top Ten Ways to Attract Targeted Local Customers With Online Marketing
 
Is The Rich Jerk A Scam: A Review
 
How To Become an SEO Expert - 5 Secrets That Will Allow You to Outperform 95% of All Webmasters
 
 
 
 
 

Why The One-Pronged Website Promotion Method Doesn't Really Work

Web site promotion relies on several components to make it successful. And if you're just using one ... - Tinu Abayomi-Paul
 

Online Discounts: Shopping for Electronics, Fragrances, and Even As Seen on TV Items

Shopping online is a great way to receive discounts on the items that you need or want and would buy ... - Chris Robertson
 

Scrap Booking Online: Word Perfect or Corel Graphics Suite?

Scrapbooks are very popular these days. I think that almost everyone wanted to capture family histor ... - Kristina Chu
 
 

7 Most Popular Money-Making Models On The Internet

One of the biggest problems people have before beginning their internet business is simply this: The ... - Ewen Chia
 

Can You Make Money Selling Web Hosting?

There is a new fad in the web hosting market. Reseller hosting. In this article I will show you what ... - Bedrich Omacka
 
 
Home -> Privacy -> Terms & Conditions  
© 2006-2008 www.floydslist.com All Rights Reserved Worldwide.