Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unknown Database Error

Status
Not open for further replies.

webIntern

Programmer
Nov 22, 2002
40
0
0
US
Hi,

I'm using a DSN connection to a remote mySQL database in an ASP page. I know for sure the database exists but for some reason I get the following error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver]Unknown database 'ubb'
/ccweb/login.asp, line 53

I have the driver installed. It's not giving me a connection error, just "unknown database" when I know for sure that database exists. Here's my code:

var dbConnFor = Server.CreateObject("ADODB.Connection")
strConnection = "Driver={MySQL ODBC 3.51 Driver}; DSN=ubb-ccweb; DATABASE=ubb;"

dbConnFor.Open(strConnection)

It blows up on that last line.

Can someone help? I will post this in the MySQL forum as well...

Thanks!
 
[i don't use MySQL; just guessing]

Leave out the DSN=ubb-ccweb

and add:

server=
uid=
pwd=


hth,
Foxbox
ttmug.gif
 
I have to use a DSN. But thanks for the suggestion anyway.

??
 
Just a shot in the dark but I wonder if it is choking on the dash in the DSN name.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top