weblistingster.com weblistingster.com weblistingster.com
Search:    Main Page :> About Us :> Privacy :> Terms & Conditions :> Add Url :> Add Your Article   
Free links exchange
 

Healthcare & Treatment

Technology & Science

Education & Learning

Property & Estate

Self Help

Culture & Art

Politics & Government

Jobs & Careers

People & Society

Cooking & Drinking

Indoor Games

Automobile & Automotive

Computers & Software

Finance & Investment

Issues & News

Shopping & Auction

Travel & Accommodation

Garden & Home

Music & Entertainment

Teens & Kids

Fashion & Lifestyle

Health & Therapy

Adventure & Sports

Business & Commerce


 

Main Page » Computers & Software » PCs
 

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 well-known scripter. John likes to create articles about this industry.
 
 
 

Related Articles

 
Google Tests Expanded Search To Include Printed Works
 
Simple Overview Of Computer
 
10 Costly Search Engine Mistakes to Avoid
 
5 Things You NEED to Know About Your AOL 9.0 Subscribers
 
The Language of Blogs
 
Internet Dial Up Access Providers
 
Affiliate Sites Can Excel When They Answer Questions
 
Microsoft CRM Conversation Gateway: VoIP - Implementation & Customization
 
Groupware: What Works the Way Businesses Do?
 
eBooks With Reseller Rights - You Can Learn To Earn Online While You Work From Home In Your PJs
 
 
 
 

Is Your Site Hungry For Traffic?

Innovative concept for driving more targeted visitors and leads to your website. - Keith Baxter
 

Learn About Spyware And How To Protect Yourself From It Efficiently For Free

Spyware is a common problem that few people know how to act against. This guide will teach you what ... - Adam Wiskar
 

Improving Your Customer Relationship Management With Blogging Technology

A blog, short of web log, is an interactive web-based journal that encourages participation from vie ... - Etienne Gibbs
 
 

Why is a Logo so Important to Your Business?

Well, a logo for your business. Why is it important? Does it matter what it looks like? Is Yours Pro ... - Anthony Jewell
 

Would a White Box Computer Make Sense for Your Business?

So-called white box computers, assembled by small local companies, have a substantial market share. ... - lovebeads
 

ERP Software Financing: the Future? - Overview for Company Owner

In our case ? we serve Microsoft Business Solutions ERP and CRM products: Microsoft Great Plains, Mi ... - Andrew Karasev
 

Build an Ecommerce Web Site

With the billions of sales posted by e-commerce Websites every year, it?s no wonder that many entrep ... - Eric Morris
 

Web Hosting : Linux vs. Windows

Do the kind of things that web servers do. You do not need to know any real detail of either to make ... - Arpit Sharma
 
 
Main Page :> Privacy :> Terms & Conditions  
© 2008 www.weblistingster.com All Rights Reserved.