Print Page | Close Window

Data source name too long

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13853
Printed Date: 30 March 2026 at 2:45pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Data source name too long
Posted By: ub3rl337ch3ch
Subject: Data source name too long
Date Posted: 16 February 2005 at 10:44pm

I'm trying to create an auto-populating dropdown box for an asp program that I'm working on. I've written the following code into a test page, and I'm getting

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC Driver Manager] Data source name too long
 
It makes no sense because I have used exactly the same connection in the mini test page and the main program (which is still working fine). The dropdown box also works in the other page.
 
Dim adoCon, vrec, sql set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.open "PROVIDER=SQLOLEDB; UID=x; PWD=x; DATA SOURCE=XXXXXX-001; DATABASE=x;"
set vrec = Server.CreateObject("ADODB.Connection")
 
sql = "SELECT BRCrops.CropType FROM BRCrops"
vrec.Open sql, adoCon <<< error
 
any help would be greatly appreciated
 
oh, and I've checked and rececked that the table and field names for the sql are right...



Replies:
Posted By: Gullanian
Date Posted: 17 February 2005 at 3:44am
How big is the path to your database?


Posted By: ub3rl337ch3ch
Date Posted: 17 February 2005 at 5:08pm
DATA SOURCE=XXXXXX-001
No path, because I'm using sql server



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net