I am having a problem connecting to my SQL Server with the following ASP
code:
set cn = server.createob ject("adodb.con nection")
cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus;
Integrated Security=SSPI"
cn.open
But, if I use the same connection string in a VB program, I connect
successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n
cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus;
Integrated Security=SSPI"
cn.Open
Please tell me why this connection string will work successfully in VB but
not ASP/VBScript. What am I doing wrong with the ASP version? What do I do
to get a successful connection in the ASP/VBScript version?
Thank you very much!
Keith 6 11780
ASP is running under a different user context.
Turn off anonymous or put a username/pass in the conn string
--
----------------------------------------------------------
Curt Christianson (Software_AT_Da rkfalz.Com)
Owner/Lead Designer, DF-Software http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"Keith Norris" <kl******@comca st.net> wrote in message
news:5r******** ************@co mcast.com... I am having a problem connecting to my SQL Server with the following ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB but not ASP/VBScript. What am I doing wrong with the ASP version? What do I
do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith
http://support.microsoft.com/default...b;en-us;247931 http://support.microsoft.com/default...b;en-us;176380 http://support.microsoft.com/default...b;en-us;176377
HTH,
Bob Barrows
Keith Norris wrote: I am having a problem connecting to my SQL Server with the following ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB but not ASP/VBScript. What am I doing wrong with the ASP version? What do I do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith
I have tried the connection string with a username and password without
success. For example,
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus;
Integrated Security=SSPI; user id=keith;passwo rd=doodado"
assuming doodado is my valid password. This does not work. The server is
on a domain controller and the name of the domain is DOMAIN. I also tried
the following:
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus;
Integrated Security=SSPI; user id=DOMAIN/keith;password= doodado"
This still did not work. I'm still missing something. Any ideas?
Thanks,
Keith
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. ASP is running under a different user context. Turn off anonymous or put a username/pass in the conn string
-- ---------------------------------------------------------- Curt Christianson (Software_AT_Da rkfalz.Com) Owner/Lead Designer, DF-Software http://www.Darkfalz.com --------------------------------------------------------- ..Offering free scripts & code snippits for everyone... ---------------------------------------------------------
"Keith Norris" <kl******@comca st.net> wrote in message news:5r******** ************@co mcast.com... I am having a problem connecting to my SQL Server with the following ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB
but not ASP/VBScript. What am I doing wrong with the ASP version? What do
I do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith
If you are passing a user id and password, remove the integrated
security=SSPI. Also, in SQL Server Enterprise manager, right click your
server name (midatlanticus) and select properties, then on the security tab
select SQL Server and Windows Authentication.
"Keith Norris" <kl******@comca st.net> wrote in message
news:RZ******** ************@co mcast.com... I have tried the connection string with a username and password without success. For example,
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI; user id=keith;passwo rd=doodado"
assuming doodado is my valid password. This does not work. The server is on a domain controller and the name of the domain is DOMAIN. I also tried the following:
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI; user id=DOMAIN/keith;password= doodado"
This still did not work. I'm still missing something. Any ideas?
Thanks, Keith
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. ASP is running under a different user context. Turn off anonymous or put a username/pass in the conn string
-- ---------------------------------------------------------- Curt Christianson (Software_AT_Da rkfalz.Com) Owner/Lead Designer, DF-Software http://www.Darkfalz.com --------------------------------------------------------- ..Offering free scripts & code snippits for everyone... ---------------------------------------------------------
"Keith Norris" <kl******@comca st.net> wrote in message news:5r******** ************@co mcast.com... I am having a problem connecting to my SQL Server with the following
ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB but not ASP/VBScript. What am I doing wrong with the ASP version? What
do I do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith
Oh, yeah. Then you need to create a login for Keith with a password of
doodado.
Your other option is to continue to use Windows Authentication only, but
change the account that IIS runs under.
"Keith Norris" <kl******@comca st.net> wrote in message
news:RZ******** ************@co mcast.com... I have tried the connection string with a username and password without success. For example,
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI; user id=keith;passwo rd=doodado"
assuming doodado is my valid password. This does not work. The server is on a domain controller and the name of the domain is DOMAIN. I also tried the following:
cn.ConnectionSt ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI; user id=DOMAIN/keith;password= doodado"
This still did not work. I'm still missing something. Any ideas?
Thanks, Keith
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. ASP is running under a different user context. Turn off anonymous or put a username/pass in the conn string
-- ---------------------------------------------------------- Curt Christianson (Software_AT_Da rkfalz.Com) Owner/Lead Designer, DF-Software http://www.Darkfalz.com --------------------------------------------------------- ..Offering free scripts & code snippits for everyone... ---------------------------------------------------------
"Keith Norris" <kl******@comca st.net> wrote in message news:5r******** ************@co mcast.com... I am having a problem connecting to my SQL Server with the following
ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB but not ASP/VBScript. What am I doing wrong with the ASP version? What
do I do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith
Thank you! I needed to right click the particular web site in Internet
Information Services and click properties and then uncheck the allow
anonymous access check box.
"Bob Barrows" <re*******@yaho o.com> wrote in message
news:O1******** ******@TK2MSFTN GP12.phx.gbl... http://support.microsoft.com/default...b;en-us;247931 http://support.microsoft.com/default...b;en-us;176380 http://support.microsoft.com/default...b;en-us;176377
HTH, Bob Barrows Keith Norris wrote: I am having a problem connecting to my SQL Server with the following ASP code:
set cn = server.createob ject("adodb.con nection") cn.connectionst ring = "Provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.open
But, if I use the same connection string in a VB program, I connect successfully. The VB code that works successfully is as follows:
Dim cn As ADODB.Connectio n
Set cn = New ADODB.Connectio n cn.ConnectionSt ring = "provider=sqlol edb; data source=midatlan ticus; Integrated Security=SSPI" cn.Open
Please tell me why this connection string will work successfully in VB but not ASP/VBScript. What am I doing wrong with the ASP version? What do I do to get a successful connection in the ASP/VBScript version?
Thank you very much! Keith This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yop |
last post by:
All
I need to store a connection in the application object
due to the need to use MYSQL and its very poor connection
pooling.
Would someone have an example as the code below is not
working correctly.
Thanks
|
by: Samridhi Kumar Shukla |
last post by:
I am facing technical difficulti in using server connection control because
we cannot change the path once fixed ..
one way is to edit the code of the form generated code but though it allow
to manipulate but again when i open the project one day latter the
connection string
cn.connection string goes away i have again write this code. is there any
way out for this
|
by: Keith Norris |
last post by:
I cannot successfully create a connection object in a web form. In the
page_load event I try the following code:
Dim sConnection As String = "server=MIDATLANTICUS;" & _
database=Pubs;integrated security=SSPI"
Dim conTest As New SqlConnection
conTest.ConnectionString = sConnection
conTest.Open()
conTest.Close()
|
by: Yossarian |
last post by:
I have a handheld running CE .NET 4.2 and I am using c# with framework
1.1 to develop a solution for syncing data that is on the handheld with
the local pc.
Our handheld cradles only support network connections, no usb or
serial, so i have to use networking to get the data transfered.
Here's the problem. I have the server accepting connections fine, but
i'm a little confused how to actually send the server data, and then
how the...
|
by: Charles MacLean |
last post by:
We have an application that connects to a remote site's SQL server using a
VPN client. It also uses a local MS SQL database located on one of our
servers. It seems once the VPN connection is established the client machine
is always looking to the remote VPN connection/server for it's data. I
tested this out by going into the ODBC applet and doing a "TEST CONNECTION"
with the VPN client closed. The response was immediate and the...
| |
by: Jay Balapa |
last post by:
Hello,
We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .
I have the same setup and am unable to reproduce this problem. This method
just tests the webmethod with a helloworld returned.
Any help is greatly appreciated.
|
by: kafain |
last post by:
Hi,
I recently installed mysql using the connection:
server: localhost
port: 3306
username: root
password: SOMETHING
If I connect through mysql admin, I can see the databases I created.
|
by: =?Utf-8?B?ZGF2aWQ=?= |
last post by:
When I start the Visual Studio .NET 2005 on client machine, I select Tools
and database connection (Database: SQL Server, security: windows
authentication. Server: Server Machine name (not in the same domain, but in
the same local area network; even same subnet)). When test the connection, I
get error message: not associated with a trusted SQL Server connection.
Server machine is Server 2000 and SQL server 2000 with security...
|
by: Anil Gupte |
last post by:
I am using the following to try to connect to the database, but it does not
seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MediaDB;Data Source=MEDIAMACHINE\SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
|
by: Elaine121 |
last post by:
Hi i've been batteling for hours and can't seem to find the problem. When my server runs and I press the connect button the gui freezes until the client gui is terminated.. only then the gui becomes active again and displays the messages.
Here is my server code:
import java.io.*;
import java.net.*;
public class serverForm extends javax.swing.JFrame {
private PrintWriter output = null;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |