Security in SQL Server, using the Connection object. -
This is just as such a question about SQL Server as it is a question about ADO . . .
I want to be able to keep my database and program secure by passing username and password in the connection's Open method. The Connection object is connecting to a SQL Server database using a DSN.
If the login in SQL Server is a Standard login (a password is specified in SQL Server), then the code works. If the login in SQL Server is a NT User, or a member of a NT Group login in SQL Server, the login does NOT work.
In other words, if I specify a password in SQL Server, the code works fine. If I use NT security for passwords in SQL Server, I always get the error -2147217843 (login failed). The username and password I enter IS correct.
Is this a problem with SQL Server? With the code? With my DSN? I don't get it.
Any help would be appreciated. Code follows.
Code:
On Error Resume Next
' try to connect to DSN, specifying username and password.
con1.Open "DSN=" & gstrDSN, txtUserName.Text, txtPassword.Text
' if err number -2147217843 occurs, then
' the user's name or password is incorrect.
If Err.Number = -2147217843 Then
MsgBox "Your username or password is incorrect.", Title:="Error Logging in"
con1.Close
Set con1 = Nothing
Exit Sub
' otherwise, print any other errors.
ElseIf Err.Number <> 0 Then
MsgBox "Error connecting to database." & vbCrLf & "Error Number: " & Err.Number & vbCrLf & _
Err.Description
con1.Close
Set con1 = Nothing
Exit Sub
End If
On Error GoTo 0
Global Connection Object -
Global Connection Object
Hi,
I am creating a client/server application in VB.
To get data from the server I have successfully created a connection object in ADO and I have
retreived the data on the forms through recordsets.
However, I have to write codes for opening the c
SQL Server 2000 Connection String Issue... -
Connection Error:
[DBNETLIB] ConnectionOpen (Connect()).] SQL Server does not exist or access denied.
Here's my connection string:
------------------------------
set Con = New Connection
con.Open "Provider=sqloledb;Data Source=Server\Wells;Initial Catalog='DPS Database';I
How to dispose an object with it's own thread -
I'm currently writing a multithreaded socket server, where each connection has it's own thread. Connections are represented by classes. Upon connection, a new instance in created, which starts a new thread for that connection, and accepts and processes the connection. The reference to
Connection Error to SQL 7.0 -
Hi everyone,
Briefly describe the problem.
Database application written in VB for MS SQL server 7.0. Connection string:
mconn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Calc;Data Source=NEWServer"
The connection op
Connection String Again -
I am trying to create a connection string to an SQL Server database from within Dreamweaver MX with the following string :
Provider=SQLOLEDB.1;
Integrated Security=SSPI;
Persist Security Info=False;
Initial Catalog=ITPSCustomers;
Data Source=TMLSERVER
The problem is that when
ADO Connection Objects -
Ok, I would like your opinions; after many hours testing; I can't figure out how the connection object works... Nor what the most efficient way of using one is...
When I create a connection object in code and then set it to a recordset object and a command object (for a stored procedu
HELP - ADO.NET connection in a Webservice -
I am trying to create a webservice that access a SQL database. I receive the following error on the connection open method: "Referenced object has a value of 'Nothing'." I have attempted using both OleDB and SQL connection objects using hard coded DSN-less/DSN, Integrated
connecting problems to remote SQL Server database -
I am trying to connect from my VB program to SQL Server Express 2005 database which is stored remotely on the test computer in my LAN.
SQL Server Express 2005 is installed on the test PC and SQL Server Browser as well as SQL Server services are running. TCP/IP protocol has been ena
netstat and ADO -
when I have a connection to my remote SQL Server via ADO, if I go to a cmd prompt and use netstat -n to see network connections, I see it made the connection to the server. When I close the ADO Connection and set it to nothing, the connection is still there when I check netstat again,
ACCESS2000 Upgrade wizard question -
I have been trying to run the upgrade wizard to take an ACCESS 2000 db to SQL Server 2000. I keep getting the following message:
Connection failed:
SQL State 28000
SQL Server Error: 18452
[Microsoft][ODBC Server Driver][SQL Server]Login failed for user'mwalter'.
Reason: Not asso
Read Only Connection -
I need to create a read only connection to Sql 7.0 DBs.
The user is allowed to create their own SQL statements to query the database. We can provide some validation to prevent them from writing statements that could potentially change data, but would also like the additional security
rdo connection object -
Hai Friends
I am using Rdoconnection object to connect my database. My data base is in Server machine, due to some problem the LAN may be disconnected. Is it possible to find out, whether the connection is currently available or not with the use of rdo connection object.
Thank you
SQL Connection String -
SQL Server 2000 Dev. / ASP.NET
I'm trying to connect to SQL server running on my machine but can't get the connection string to work. I'm used to writing connection strings that have a user & password so i'm not really sure what to do. ServerName:SQLServ2k, Database: northwind.
Secure & Centralized Connection -
Where would be the best location to place a connection object to a sql db in an asp.net project? In a class or module or ? Security is a major concern with the connection string. Second would be to centralize it so only one connection is used.
Thanks
SQL Server Express 2005 distribution -
I am using ADODB to connect to SQL Server 2005 using VB6 application that I created. My application connects fine to the database on my PC. My PC has both SQL Server 2005 Standard Edition and Express edition installed.
I am using the following connection string to connect to SQL Ser
Sql 2005 Connection questions -
I have a couple of question regarding the Sql 2005 connection. First I would like to state that I am using visual basic 2005 professional, next here are my questions.
1.) "What is the difference between Standard Security, trusted connection and
prompt user name and password&qu
ASP Connection String Security -
Hello,
I'm fine tuning an asp website from a security point of view.
Site is hosted on a DMZ and connects to a SQL Server database on the LAN , via ports 1433 , 1434.
At moment i'm holding the connection string in a header file.
The header file contains a username and passwo
Connection string security issues -
Hello. I am using a connection string to query a sql server database over a network. I want to know if it possible for someone to see or steal this connection string, because if they do then they will be able to access the sql server themselves. If they can steal the connection stri
Using Access with SQl Server -
Hi huys,
I have a Access 97 database with linked tables to SQL server 2000.
Initially, what happens is that the user goes into a VB front end which I wrote to obtain the username and password.
What I do then is shell to MS Access and open the database using a workgroup security file
SQL Server Connections -
I've got a series of applications that make connections to an SQL Server. The applications are designed to run with SQL Server 6.5 and 7.0, and MS Access databases.
(achieved through opening the MS Access databases as database objects, and the SQL Server connection as a connection obj
Connecting to SQL Server on another computer. -
Hello,
I have a windows application that uses a SQL Server 2005.
The customer wants to run my application from a computer, and connect to the SQL Server that is on another computer.
Currently the SQL server and application both run on the same computer. The connection string
Tunneling question -
Hi,
I've been reading alot about tunneling and http tunneling for security. I recently made a project post on a web site requesting someone to write a tcp central server which a desktop server app I have will connect to it and then clients connect through the central server. The pur
[2005] Problem displaying data in datagrid using sql server -
Hi,
I am having the error message sqlcmd not declared in the following code. I have no clue how to solve it. Any help is appreciated to resolve this. Regards.
CODE
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
SSL and SQL Server! -
Hi friends!
I have been trying long to make SSL to work with SQL server but not able to succeed.
I can see the SSL certificate under MMC-Certificates section and the certificate is also successfully installed.
I can use the connection string "Provider=SQLOLEDB.1;Integrated Secu
RDS + Security -
Help!
I've written a rds business object to return a disconected recordset. Wehn I run my client, it creates the object ok, but when I try to call the method that retunrs the recordse, I get Internet Server Error. If I try to run it locally on my machine, I get 'Login Failed for U
SQL 2K and Trusted Connections.... -
I run into this problem all the time and it's pretty much has pissed me off for the last time. I need some explination cause I'm obviously missing something.
My Setup
-All Systems Involved are running Win2k
-SQL SERVER 2K, no SP's installed (this is another problem, it won't
Help on COM+ Server Application role-based security -
I’m facing a problem while accessing COM+ server application from VB application where the role-based security is enabled.
My COM+ server application has following settings.
1. Checked “Enforce access checks for this application”
2. Selected security level as “Perform ac
[2005] Enterprise DataBaseFactory usage.... -
Ok,
When using the DataBaseFactory object, I asked someone and they said that the connection to sql server is automatically terminated on regular execution methods such as (executedataset,executenonquery, etc..)
But that when you use executedatareader, it doesn't, but I've been l
SQLClient connection problem -
Hi All
I am trying to use sqlclient from Pocket PC app I am developing for connecting to SQL Server 2005 database on server.
I have referance to sqlclient.
Code looks like as under..
SqlConnection s_Conn;
s_Conn = new SqlConnection("Persist Security Info=False;Integrated Se
Single Connection Object -
BACKGROUND:
I have an existing VB application that is a FAT client with all the GUI, Business and Data logic inter-mixed. This application is a simple client server application (the server is SQL 2000).
I want to break up the application so that the GUI code is seperate from the B
ADO connection -
I am trying to make my first connection to a SQL Server DB using ADO. I have simplified this code trying to find the error. But I get Runtime error “446” Object doesn’t support names arguments. I can enter almost the same code in for RDO and it runs fine. I am sure it is som
OLE DB - ADO - MsAccess over Internet -
Hi guys,
is it possible to get data by VB ADO- OLEDB connection to a MsAccess mdb file in a internet hosting server ?
I mean, How can I write a Connection String for ADODC1 object?
is it possible like ?;
Provider=Microsoft.Jet.OLEDB.3.51;_
Persist Security Info=False;User
Managing connection to SQL -
I'm somewhat new to using SQL Server and I'm wondering what the best way is to manage my connection to the server.
My application objects will be calling sp's and I guess I'm concerned about the overhead associated with the sql connection.
Can I just use a global connection objec
How to make ODBC connection through combo selection -
I'm using VB.6 & SQL server 2000. Problme is I have two data base and I want to work it on one plat form. I've connected to sql server through ODBC connection but problem is..... how can i make connection to either of Data Base through combo selection so that when i select particu
[2005] SQL and AD security in same site -
Hey Guys and Gals,
I have a security question for you gurus out there. I'm using VWD 2005 Express edition and I have a site that I've built that requires access to both AD to make changes to user information as well as a SQL database that holds computer information. I am wondering
Make SQL Connection and "Save" Information -
Hi all,
I'm new to vb.net so please bare with me.
I've got a Login form for my application where the user logs into sql server and thus initiates a connection.
How can I "save" this information in my application and remember the credentials and refer back to this c
Access DB Security Issue -
I wanted to know how to remove the security on an Access
database that is secured by System.mdw? We no longer have
the Admin password so we need to either change it somehow or
clear out the permission settings on the database and start over
with assigning security to every obje
Advice on the connection from VB to SAP -
Hi Experts,
First of all i would like to say thanks because of the time spend on my post. I have some doubts regarding the requirement on VB for the calling to SAP. For your info, i have not much knowledge on VB, please point me out if im wrong on the queries below:
1. As the inf
Socket permissions -
Anybody got experience with socket permissioning in VB.Net?
I've got the TCP/IP connection part working in theory, as I can send and return data when running the server and client on the same machine. However, I'm now trying to send data to a remote server and finding that the conne
VB / SQL Server Security -
When using Windows Integrated Security can you allow a logged on user to run an application that accesses a database but deny him access through the Management Console?
1. The connection string (in the registry) specifies Integrated Security (SSPI)
2. The user account has acces