Error when creating multiple adodb.connections: "Data source name not found and no default driver specified"
Posted on 2005-03-03
Dilemma: I just found out that GoDaddy.com won't let me use Enterprise Manager to migrate my existing SQL db over to the new server-- so I need a new method to copy the data.
Uploading CSVs not working for me...
So I was going to write an .asp page to pull the info from the table on one db and insert it all into the same table in the new db -- that should work, right?
So here's my test code so far (note, it only pulls data from one of the connections, but that is where I am stuck.)
Set connDiscountASP = Server.CreateObject("ADODB.Connection")
connDiscountASP .Open "DSN=myconn1;uid=myuid1;pwd=mypwd1"
Set connGoDaddy = Server.CreateObject("ADODB.Connection")
connGoDaddy .Open "DSN=myconn2;uid=myuid2;pwd=mypwd2"
strSQL="SELECT * FROM articles"
while not rs.eof
sHeadline = rs.Fields("headline")
But I get this error:
"Data source name not found and no default driver specified"
Now, if I take out one of the connections above and try it with just one connection -- the code works fine... can I not have 2 concurrent adodb connections?
What am I missing here?