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...
Edited by ub3rl337ch3ch - 16 February 2005 at 10:46pm