Accessing Database from Web Server


I have added a data connection in Visual Interdev. In the Data View I can see all my tables, fields and so on. My database resides on a SQL 7 server and my Web application is on the IIS 4 server. My problem is that I keep getting this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'SMIWEBIUSR_SMIWEB'. /Test/Page2.asp, line 24 

I have this code on my ASP:

Set oRs=Server.CreateObject("ADODB.Connection")oRs.Open Application("Connection1_ConnectionString"),Application("Connection1_RuntimeUserName"),Application("Connection1_RuntimePassword")	oRs.Execute ("Select * From tblDetail&qout;)


This is one of the most common mistakes made by programmers.

When you are developing, you can see all the tables of a database because you have an ODBC DSN (Data Source Name) set up on your computer. This is set up so that Visual InterDev can see the database.

When your application is running from a Web Server Computer, it is looking for the YOUR computer's DSN on the Web Server Computer. When it does not find one, it fails. You need to set up the same DSN on the Web Server computer. Test the DSN when you have created it to make sure the database can be accessed succesfully.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a