I have created a subdomain mapped to a sub - directory of the website. The default page of the sub directory (http://www.mydomain.com/foldername/default.asp) works fine, but http://foldername.mydomain.com shows error

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

The connection string is in global.asa
application("strconnectstring")="Provider=SQLNCLI;Data Source=.;Initial Catalog=mydb;User ID=XXXX;password=XXXXXX"

Can't figure out the problem
Any help?

Assuming that you are using IIS to create/manage the domains, are both enabled for ASP and SQL?

Yes, both enabled for asp and sql. Actually the subdomain is not able to read application variable in which the connection string is there

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.