not creating ADODB connection

M

Me

I have the following lines in my asp, but somehow
it isn't working, can someone help me resolve it?

---Comm = "DSN=HRPROD"
Server="MYSERVER"
Response.Write ("Server Name ") & Server
Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write ("After Conn ")
Conn.Open Comm

when I execute this, I do get valid response
Server Name MYSERVER

But I don't see the 2nd response "After Conn "
as a result I am unable to see any output after that.

Thanks for your help!
-Me
 
B

Bob Barrows [MVP]

Me said:
I have the following lines in my asp, but somehow
it isn't working, can someone help me resolve it?

---Comm = "DSN=HRPROD"
Server="MYSERVER"
Response.Write ("Server Name ") & Server
Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write ("After Conn ")
Conn.Open Comm

when I execute this, I do get valid response
Server Name MYSERVER

But I don't see the 2nd response "After Conn "
as a result I am unable to see any output after that.
not even an error message?? Do you have "On error Resume Next" before
this code snip? if so, comment it out and try running the page so you
can see the error.

Beyond that, we cannot help because you have failed to provide the
database type (and version) to which you are attempting to connect.

For self-help see: http://www.aspfaq.com/show.asp?id=2126
 
M

Me

Hi Bob,

Thanks for quick response. It doesn't display any error message.
No, I don't have on error clause before this.

I am using similar code in another page and its working fine. I just copied it
from the other page into this one and it doesn't work.
The other code is also on the same server. That's why I don't think
there is anything wrong with the way I have specified the connection.
But can't think why it shouldn't work.

Here is the complete string for your info ...

Comm = "DSN=MYDSN"
Server="MYSERVER"
Response.Write ("Server Name ") & Server
Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write ("Connection ")
Conn.Open Comm

Please let me know if you have ideas.
 
B

Bob Barrows [MVP]

Me said:
Hi Bob,

Thanks for quick response. It doesn't display any error message.
No, I don't have on error clause before this.

I am using similar code in another page and its working fine. I just
copied it from the other page into this one and it doesn't work.
The other code is also on the same server. That's why I don't think
there is anything wrong with the way I have specified the connection.
But can't think why it shouldn't work.

Here is the complete string for your info ...

Comm = "DSN=MYDSN"
Server="MYSERVER"
Response.Write ("Server Name ") & Server
Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write ("Connection ")
Conn.Open Comm

Please let me know if you have ideas.

Based on this, I have nothing to add.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top