AusGamers Forums
Show: per page
1
.NET Website Aids
jmr
Brisbane, Queensland
7268 posts
Trying to move this website and it is returning this error

C:\inetpub\sup
C:\inetpub\sup\_dbase\module00.mdb

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/_includes/connections.asp, line 29

I am assuming some data source needs to be set up through ODBC? Am I on the right track?
12:08pm 02/08/11 Permalink
adBot
ads
Internet
--
ads keep websites free
12:08pm 02/08/11 Permalink
Skitza
Brisbane, Queensland
9464 posts
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.

This usually happens in one of the following scenarios:
you referenced your connection incorrectly (e.g. spelled the DSN name, or one of the DSN-less string components wrong);
you referenced a DSN that doesn't exist;
the user connecting to the DSN or DSN-less connection doesn't have access to the information stored in the registry (see KB #306345);
you used an English or localized driver detail for your connection string when your system is not set up in that language (see KB #174655); or,
you are missing the connection string entirely (this can happen if you maintain your connection string in a session variable, and your sessions aren't working; see Article #2157).

Check your DSN's or if they are still there, point them at the correct location.
12:40pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7270 posts
It is a fresh install, no DSN's set up, do I need SQL ?
01:23pm 02/08/11 Permalink
Skitza
Brisbane, Queensland
9465 posts
Ah well you will need to add them. Well I'll assume yes, what was there before?
01:31pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7271 posts
It is coming from a hideous WebCentral hosting package so I can't see shit in terms of the settings currently
01:38pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7272 posts
Dim objConn00, strConn00
Sub Openmodule00()
Set objConn00 = Server.CreateObject("ADODB.Connection")
strConn00 = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & varServer & "\_dbase\" & varControllerDBname &";u='';p=''"
objConn00.Open (strConn00)

I think this is the problem here,
02:20pm 02/08/11 Permalink
Opec
Brisbane, Queensland
7295 posts
2 things:

1) You'll need to ensure that that folder is writable by IIS process. Just put in a request at Webcentral and tell them to make that folder writeable.

2) Not having seen the full function definition, you should still change your function to


Sub Openmodule00(varControllerDBname )
dim path, objConn00
path = Server.Mappath("./_dbase/" & varControllerDBname)
strConn00 = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & path &";u='';p=''"
Set objConn00 = Server.CreateObject("ADODB.Connection")
objConn00.Open (strConn00)
End Sub


Given that the function has not declared strConn00 , objConn00 I assumed this person just use all global scope var for everything.... pretty sucky way to code.
02:25pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7273 posts
No it is coming from Webcentral to a clean Windows 2008 Server

The error:
C:\inetpub\sup
C:\inetpub\sup\_dbase\module00.mdb

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/_includes/connections.asp, line 29

Line 29 is : objConn00.Open (strConn00)
from
Sub Openmodule00()
Set objConn00 = Server.CreateObject("ADODB.Connection")
strConn00 = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & varServer & "\_dbase\" & varControllerDBname &";u='';p=''"
objConn00.Open (strConn00)
02:29pm 02/08/11 Permalink
Opec
Brisbane, Queensland
7297 posts
Oh ok Win2k8 eh, you might need to download the driver then:


http://www.microsoft.com/download/en/details.aspx?id=13255


To use this download:
1.If you are the user of an application, consult your application documentation for details on how to use the appropriate driver.
2.If you are an application developer using OLEDB, set the Provider argument of the ConnectionString property to “Microsoft.ACE.OLEDB.12.0”
◦If you are connecting to Microsoft Office Excel data, add “Excel 14.0” to the Extended Properties of the OLEDB connection string.
3.If you are application developer using ODBC to connect to Microsoft Office Access data, set the Connection String to “Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path to mdb/accdb file”
4.If you are application developer using ODBC to connect to Microsoft Office Excel data, set the Connection String to “Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=path to xls/xlsx/xlsm/xlsb file”
To remove this download:
02:35pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7274 posts
Sorry where does the connection string go?
02:57pm 02/08/11 Permalink
Opec
Brisbane, Queensland
7300 posts
The connection string is correct the problem I think is that W2k8 doesn't ship with correct MDAC / ODBC driver that's why you're getting that error?

If it's a brand new Win2k8 you'll need to download the driver in the link above and I think that code should work.
03:01pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7275 posts
Nup :( Check your PM
03:07pm 02/08/11 Permalink
Opec
Brisbane, Queensland
7302 posts
Sent you the solution but I'll post it here for other people's benefits perhaps:

Using Classic ASP with Microsoft Access Databases on IIS 7.0 and IIS 7.5
http://learn.iis.net/page.aspx/563/using-classic-asp-with-microsoft-access-databases-on-iis-70-and-iis-75/


This is a generic error triggered by the Access driver that may occur for a variety of reasons, but incorrect permissions is a common cause. More specifically, the ability to work with Microsoft Access databases is implemented through the Microsoft JET Database Engine, which creates various temporary and lock files when it connects to an Access database. The following sections will discuss some of the reasons why this may occur and how to resolve those situations.
Working with 64-bit Systems

Unfortunately there are no 64-bit ODBC drivers, so on 64-bit systems you will have to run your applications in 32-bit mode. To do so, use the following steps:

On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
In the Connections pane, click Application Pools.
Highlight the application pool for your application, then click Advanced Settings... in the Actions pane.
In the Advanced Settings dialog, specify True for Enable 32-Bit Applications.
Click OK to close the Advanced Settings dialog.
04:06pm 02/08/11 Permalink
Hogfather
Cairns, Queensland
10292 posts
Just FYI, this is not a .Net problem. This is an ASP Classic issue.

.Net was built to avoid the sort of aids you are experiencing (web.config connection strings instead of shitty, shitty ODBC etc)
10:06pm 02/08/11 Permalink
jmr
Brisbane, Queensland
7276 posts
Sweet,

Sorry to payout on your friend .NET

Thanks to Opec for the fix :)
10:15pm 02/08/11 Permalink
Hogfather
Cairns, Queensland
10293 posts
.Net has herpes, not aids.
10:19pm 02/08/11 Permalink
Opec
Brisbane, Queensland
7304 posts
Just FYI, this is not a .Net problem. This is an ASP Classic issue.

.Net was built to avoid the sort of aids you are experiencing (web.config connection strings instead of shitty, shitty ODBC etc)


Well more specifically shitty 32 bit ODBC connection for Microsoft which itsn't natively supported on 64bit OS hence the problem - it'll still work just not as standard out of the box config.

If it's SQL2005 then classic ASP will still work on Win2k8 64 bit out of the box just fyyyyyne baaayybeeeee.
10:43pm 02/08/11 Permalink
Hogfather
Cairns, Queensland
10295 posts
My point was that ODBC-controlled connections are anathema to a .Net environment, hence the thread title is wrong.

If the website was actually written in .Net the problem wouldn't have arisen!
09:56am 03/08/11 Permalink
Jimbo
Brisbane, Queensland
683 posts
I know that is why I said sorry for offending your friend .NET, but not sorry enough to change the thread title

(jmr)
10:04am 03/08/11 Permalink
Hogfather
Cairns, Queensland
10297 posts
I'm not talking to you right now jmr.

My friend is very, very hurt over this, and I'm sorry but I have to take sides on this one.
10:05am 03/08/11 Permalink
Jimbo
Brisbane, Queensland
684 posts
haha
10:09am 03/08/11 Permalink
Dazhel
Gold Coast, Queensland
3720 posts
That .NET bloke is pretty resilient though. I reckon he'll shrug off the slight from the thread title and laugh at how old and crusty classic asp sites are while continuing on with the business of powering a bunch of fully-functional websites.
12:12pm 03/08/11 Permalink
Opec
Brisbane, Queensland
7305 posts
^^^ I also hear my other mate COBOL is still powering a lot of banks and stuffs too those old blokes sure are resillient! heh
02:32pm 03/08/11 Permalink
adBot
ads
Internet
--
ads keep websites free
02:32pm 03/08/11 Permalink
AusGamers Forums
Show: per page
1
This thread is archived and cannot be replied to.
 

Advertise with Us | Download Media Kit | Privacy Policy | Contact Us
© Copyright 2001-2012 AusGamers™ Pty Ltd. ACN 093 772 242.
A Mammoth Media web development, hosted by Mammoth VPS.