Re: Web Applicaiton using Trusted Connections to SQL on different machine?

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 07/11/05


Date: Mon, 11 Jul 2005 13:40:37 -0400

Scott Townsend wrote:
> Thank you for your reply.
>
> I'm not sure if this is really .Net Related though. I get the Error
> if I use ASP.NET code to make the connection, or if i just use ASP
> code to make the connection.
>
> My ASP code looks like this:
>
> Set enm = Server.CreateObject("adodb.connection")
> enm.Open "Driver={SQL
> Server};Server=SERVER;Trusted_Connection=yes;Database=Northwind;"

You should use the native OLE DB provider, not ODBC:

enm.open "provider=sqloledb;Integrated Security=SSPI;" & _
"Data Source=SERVER;Initial Catalog=Northwind"

> Set rsUser = enm.Execute("SELECT * FROM customers")
> Set enm = Nothing
> I get the Error on the .Execute
>

On the Execute? If it was a problem with the connection itself, the Open
statement would be throwing the error, not the Execute.

What is the error?

Bob Barrows

-- 
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.


Relevant Pages

  • Re: Web Applicaiton using Trusted Connections to SQL on different machine?
    ... > if I use ASP.NET code to make the connection, or if i just use ASP ... > My ASP code looks like this: ... > I get the Error on the .Execute ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.iis.security)
  • Re: connection suddenly fails: mdac? pooling?
    ... i execute the web site pages now and works well.... ... >> see the example ONLY open and close a connection ... >> but executing the asp code several times ... >> dim cnx, cmd ...
    (microsoft.public.inetserver.asp.db)
  • RE: VBscript Error on SBS2k3
    ... double confirm if your router and client computer does not have incoming ... This newsgroup only focuses on SBS technical issues. ... | Accessories and Communications and Remote Desktop Connection? ... | computer and your router does not have incoming TCP port 4125 opened. ...
    (microsoft.public.windows.server.sbs)
  • Re: VPN via Wireless Broadband
    ... Please understand that our newsgroup is an issue based service, ... Additional, then you connection to SBS with VPN, the XP client ... Virtual Private Network Connection ... |>If we can not resolve the issue after we perform the above steps, ...
    (microsoft.public.windows.server.sbs)
  • [Full-Disclosure] Advanced usage of system() function.
    ... and call its arguments as a command for shell. ... as we can see we still didnt get what we want (typing exit ... Connection closed by foreign host. ... think what we want to execute. ...
    (Full-Disclosure)