Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   not creating ADODB connection (http://www.velocityreviews.com/forums/t802110-not-creating-adodb-connection.html)

Me 09-29-2006 05:35 PM

not creating ADODB connection
 
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




Bob Barrows [MVP] 09-29-2006 05:52 PM

Re: not creating ADODB connection
 
Me wrote:
> 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



--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Me 09-29-2006 06:15 PM

Re: not creating ADODB connection
 
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.


"Bob Barrows [MVP]" wrote:

> Me wrote:
> > 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
>
>
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>


Bob Barrows [MVP] 09-29-2006 06:17 PM

Re: not creating ADODB connection
 
Me wrote:
> 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.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.




All times are GMT. The time now is 03:49 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.