ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 21st, 2013, 04:15 PM
flowerpot flowerpot is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 flowerpot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 19 sec
Reputation Power: 0
Unhappy Access database connection?

I have a script that has worked perfectly with my former hosting company but not work with my new hosting provider.

The section that I think might be causing the problem is below. The original script is
[code]
'database path
strDBPath = "/dbase/database.mdb"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = " & Server.MapPath(strDBPath) & ";" & _
"User Id=Admin;" & _
"Password="


The new hosting provider has this in their knowledge base:

How to connect to a MS Access database from an ASP Script

Please use the following sample code to connect to a MS Access .mdb file:

<%
Dim ConnectionString
ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ=C:\path\to\file.mdb;DefaultDir=;UID=;PWD=;"

Dim Connection
Set Connection = Server.CreateObject("ADODB.Connection")

Connection.ConnectionTimeout = 30
Connection.CommandTimeout = 80
Connection.Open ConnectionString
%>


Can anyone adapt the original code with this other code info?
I am not good with access databases connection issues

Reply With Quote
  #2  
Old January 22nd, 2013, 02:45 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 43 m 55 sec
Reputation Power: 4445
The hosting company is illustrating a connection using the older ODBC access drivers, which I don't recommend using. Your original connection looks ok, if it doesn't work it's probably some issue with the location of the .mdb file on the new host not matching your script
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Access database connection?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap